diff --git a/chains/evm/GNUmakefile b/chains/evm/GNUmakefile index 71400e1c69..c610ef40fe 100644 --- a/chains/evm/GNUmakefile +++ b/chains/evm/GNUmakefile @@ -69,8 +69,8 @@ extract-bytecode-abi: ## Extract bytecode and abi from versioned gobindings to b .PHONY: operations operations: pnpmdep wrappers - go run cmd/operations-gen/main.go -config deployment/operations_gen_config.yaml + go run github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen@v0.0.2-0.20260515181606-62d38f5a89b0 -config deployment/operations_gen_config.yaml .PHONY: operations-fast operations-fast: - go run cmd/operations-gen/main.go -config deployment/operations_gen_config.yaml + go run github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen@v0.0.2-0.20260515181606-62d38f5a89b0 -config deployment/operations_gen_config.yaml diff --git a/chains/evm/cmd/operations-gen/README.md b/chains/evm/cmd/operations-gen/README.md deleted file mode 100644 index 9935c2ce51..0000000000 --- a/chains/evm/cmd/operations-gen/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# operations-gen - -Generates Go operation wrappers for EVM smart contracts from their ABIs. - -## Usage - -From `chains/evm/`: - -```bash -make operations -``` - -Or run directly: - -```bash -go run ./cmd/operations-gen/main.go -config deployment/operations_gen_config.yaml -``` - -## Configuration - -Edit `chains/evm/deployment/operations_gen_config.yaml`: - -```yaml -version: "1.0" - -input: - base_path: ".." # Directory containing abi/ and bytecode/ folders - -output: - base_path: "." # Directory for generated operations/ - -contracts: - - contract_name: FeeQuoter - version: "1.6.0" - package_name: fee_quoter # Optional: override default package name - abi_file: "fee_quoter.json" # Optional: override default ABI filename - no_deployment: false # Optional: skip bytecode and Deploy operation (default: false) - functions: - - name: updatePrices - access: owner # Generates MCMS-compatible transaction - - name: getPrice -``` - -### Optional Fields - -- `package_name`: Override the generated package name (default: snake_case of contract_name) -- `abi_file`: Override the ABI filename to use (default: {package_name}.json) -- `no_deployment`: Skip bytecode constant and Deploy operation (default: false, useful for contracts deployed elsewhere) - -### Access Control - -- `owner`: Write uses `OnlyOwner` for direct execution vs MCMS proposals -- `public`: Write uses `AllCallersAllowed` (always eligible for direct execution when a tx is prepared) -- `authorized_callers`: Write uses `contract.IsAuthorizedCaller` (AuthorizedCallers mixin — checks `getAllAuthorizedCallers`) - -## Output - -Generates files in `deployment/{version}/operations/{contract}/`: - -- Type-safe operation structs -- Contract deployment helpers -- Read and write operation functions -- MCMS transaction builders (for owner functions) - -## Requirements - -- ABIs in `chains/evm/abi/{version}/` -- Bytecode in `chains/evm/bytecode/{version}/` - -Paths in config are relative to the config file location. diff --git a/chains/evm/cmd/operations-gen/main.go b/chains/evm/cmd/operations-gen/main.go deleted file mode 100644 index de313d481e..0000000000 --- a/chains/evm/cmd/operations-gen/main.go +++ /dev/null @@ -1,903 +0,0 @@ -package main - -import ( - "bytes" - _ "embed" - "encoding/json" - "flag" - "fmt" - "go/format" - "os" - "path/filepath" - "sort" - "strings" - "text/template" - - "gopkg.in/yaml.v3" -) - -//go:embed operations.tmpl -var operationsTemplate string - -const ( - // anyType is the fallback Go type for unknown Solidity types - anyType = "any" -) - -var ( - // typeMap maps Solidity types to their Go equivalents - typeMap = map[string]string{ - "address": "common.Address", - "string": "string", - "bool": "bool", - "bytes": "[]byte", - "bytes32": "[32]byte", - "bytes16": "[16]byte", - "bytes4": "[4]byte", - "uint8": "uint8", - "uint16": "uint16", - "uint32": "uint32", - "uint64": "uint64", - "uint96": "*big.Int", - "uint128": "*big.Int", - "uint160": "*big.Int", - "uint192": "*big.Int", - "uint224": "*big.Int", - "uint256": "*big.Int", - "int8": "int8", - "int16": "int16", - "int32": "int32", - "int64": "int64", - "int96": "*big.Int", - "int128": "*big.Int", - "int160": "*big.Int", - "int192": "*big.Int", - "int224": "*big.Int", - "int256": "*big.Int", - } - - // nameOverrides provides special case naming for specific contracts - nameOverrides = map[string]string{ - "OnRamp": "onramp", - "OffRamp": "offramp", - } -) - -// Config structures -type Config struct { - Version string `yaml:"version"` - Input InputConfig `yaml:"input"` - Output OutputConfig `yaml:"output"` - Contracts []ContractConfig `yaml:"contracts"` -} - -type InputConfig struct { - BasePath string `yaml:"base_path"` -} - -type OutputConfig struct { - BasePath string `yaml:"base_path"` -} - -type ContractConfig struct { - Name string `yaml:"contract_name"` - Version string `yaml:"version"` - VersionPath string `yaml:"version_path,omitempty"` // Optional: override folder path derived from version - PackageName string `yaml:"package_name,omitempty"` // Optional: override package name - ABIFile string `yaml:"abi_file,omitempty"` // Optional: override ABI file name - NoDeployment bool `yaml:"no_deployment,omitempty"` // Optional: skip bytecode and deploy operation - Functions []FunctionConfig `yaml:"functions"` -} - -type FunctionConfig struct { - Name string `yaml:"name"` - Access string `yaml:"access,omitempty"` // "owner", "public", or empty -} - -type ABIEntry struct { - Type string `json:"type"` - Name string `json:"name"` - Inputs []ABIParam `json:"inputs"` - Outputs []ABIParam `json:"outputs"` - StateMutability string `json:"stateMutability"` -} - -type ABIParam struct { - Name string `json:"name"` - Type string `json:"type"` - InternalType string `json:"internalType"` - Components []ABIParam `json:"components"` -} - -type ContractInfo struct { - Name string - Version string - PackageName string - OutputPath string - ABI string - Bytecode string - NoDeployment bool - Constructor *FunctionInfo - Functions map[string]*FunctionInfo - FunctionOrder []string - StructDefs map[string]*StructDef -} - -type StructDef struct { - Name string - Fields []ParameterInfo -} - -type FunctionInfo struct { - Name string - StateMutability string - Parameters []ParameterInfo - ReturnParams []ParameterInfo - IsWrite bool - CallMethod string // The method name or full signature for overloaded functions - HasOnlyOwner bool - UseAuthorizedCaller bool -} - -type ParameterInfo struct { - Name string - SolidityType string - GoType string - IsStruct bool - StructName string - Components []ParameterInfo -} - -type TemplateData struct { - PackageName string - PackageNameHyphen string - ContractType string - Version string - ABI string - Bytecode string - NeedsBigInt bool - HasWriteOps bool - NoDeployment bool - Constructor *ConstructorData - StructDefs []StructDefData - ArgStructs []ArgStructData - Operations []OperationData - ContractMethods []ContractMethodData -} - -type ConstructorData struct { - Parameters []ParameterData -} - -type StructDefData struct { - Name string - Fields []ParameterData -} - -type ArgStructData struct { - Name string - Fields []ParameterData -} - -type ParameterData struct { - GoName string - GoType string -} - -type OperationData struct { - Name string - MethodName string - OpName string - ArgsType string - CallArgs string - IsWrite bool - AccessControl string // Only for writes - ReturnType string // Only for reads -} - -type WriteOpData struct { - Name string - MethodName string - OpName string - ArgsType string - CallArgs string - AccessControl string -} - -type ReadOpData struct { - Name string - MethodName string - OpName string - ArgsType string - ReturnType string - CallArgs string -} - -type ContractMethodData struct { - Name string - MethodName string - Params string - Returns string - MethodBody string -} - -func main() { - configPath := flag.String("config", "operations_gen_config.yaml", "Path to config file") - flag.Parse() - - configData, err := os.ReadFile(*configPath) - if err != nil { - fmt.Fprintf(os.Stderr, "Error reading config: %v\n", err) - os.Exit(1) - } - - var config Config - if err := yaml.Unmarshal(configData, &config); err != nil { - fmt.Fprintf(os.Stderr, "Error parsing config: %v\n", err) - os.Exit(1) - } - - // Get the directory containing the config file - configDir := filepath.Dir(*configPath) - absConfigDir, err := filepath.Abs(configDir) - if err != nil { - fmt.Fprintf(os.Stderr, "Error resolving config directory: %v\n", err) - os.Exit(1) - } - - // Make input and output paths relative to config file location - config.Input.BasePath = filepath.Join(absConfigDir, config.Input.BasePath) - config.Output.BasePath = filepath.Join(absConfigDir, config.Output.BasePath) - - for _, contractCfg := range config.Contracts { - info, err := extractContractInfo(contractCfg, config.Input, config.Output) - if err != nil { - fmt.Fprintf(os.Stderr, "Error extracting info for %s: %v\n", contractCfg.Name, err) - os.Exit(1) - } - - if err := generateOperationsFile(info); err != nil { - fmt.Fprintf(os.Stderr, "Error generating file for %s: %v\n", contractCfg.Name, err) - os.Exit(1) - } - - fmt.Printf("✓ Generated operations for %s at %s\n", info.Name, info.OutputPath) - } -} - -func extractContractInfo(cfg ContractConfig, input InputConfig, output OutputConfig) (*ContractInfo, error) { - if cfg.Name == "" || cfg.Version == "" { - return nil, fmt.Errorf("contract_name and version are required") - } - - // Use explicit package name if provided, otherwise derive from contract name - packageName := cfg.PackageName - if packageName == "" { - packageName = toSnakeCase(cfg.Name) - } - versionPath := versionToPath(cfg.Version) - if cfg.VersionPath != "" { - versionPath = cfg.VersionPath - } - - abiString, bytecode, err := readABIAndBytecode(cfg, packageName, versionPath, input.BasePath) - if err != nil { - return nil, err - } - - var abiEntries []ABIEntry - if err := json.Unmarshal([]byte(abiString), &abiEntries); err != nil { - return nil, fmt.Errorf("failed to parse ABI: %w", err) - } - - info := &ContractInfo{ - Name: cfg.Name, - Version: cfg.Version, - PackageName: packageName, - OutputPath: filepath.Join(output.BasePath, versionPath, "operations", packageName, packageName+".go"), - ABI: abiString, - Bytecode: bytecode, - NoDeployment: cfg.NoDeployment, - Functions: make(map[string]*FunctionInfo), - StructDefs: make(map[string]*StructDef), - } - - extractConstructor(info, abiEntries) - - if err := extractFunctions(info, cfg.Functions, abiEntries); err != nil { - return nil, err - } - - collectAllStructDefs(info) - return info, nil -} - -func readABIAndBytecode( - cfg ContractConfig, - packageName, - versionPath, - basePath string) (abiString string, bytecode string, err error) { - // Determine ABI filename: - // 1. Use explicit abi_file if provided - // 2. Use package_name if provided (useful for usdc_token_pool_cctp_v2) - // 3. Otherwise derive from contract_name - var abiFileName string - if cfg.ABIFile != "" { - abiFileName = cfg.ABIFile - } else { - // Use the package name for ABI lookup - it matches the actual file names better - abiFileName = packageName + ".json" - } - - abiPath := filepath.Join(basePath, "abi", versionPath, abiFileName) - abiBytes, err := os.ReadFile(abiPath) - if err != nil { - return "", "", fmt.Errorf("failed to read ABI from %s: %w", abiPath, err) - } - - // Skip bytecode reading if no_deployment is true - if cfg.NoDeployment { - return string(abiBytes), "", nil - } - - // Bytecode file matches ABI file name (without .json, with .bin) - bytecodeFileName := strings.TrimSuffix(abiFileName, ".json") + ".bin" - bytecodePath := filepath.Join(basePath, "bytecode", versionPath, bytecodeFileName) - bytecodeBytes, err := os.ReadFile(bytecodePath) - if err != nil { - return "", "", fmt.Errorf("failed to read bytecode from %s: %w", bytecodePath, err) - } - - return string(abiBytes), strings.TrimSpace(string(bytecodeBytes)), nil -} - -func extractConstructor(info *ContractInfo, abiEntries []ABIEntry) { - for _, entry := range abiEntries { - if entry.Type == "constructor" { - info.Constructor = parseABIFunction(entry, true, info.PackageName) - break - } - } -} - -func extractFunctions(info *ContractInfo, funcConfigs []FunctionConfig, abiEntries []ABIEntry) error { - for _, funcCfg := range funcConfigs { - funcInfos := findFunctionInABI(abiEntries, funcCfg.Name, info.PackageName) - if funcInfos == nil { - return fmt.Errorf("function %s not found in ABI", funcCfg.Name) - } - - for _, funcInfo := range funcInfos { - switch funcCfg.Access { - case "owner": - funcInfo.HasOnlyOwner = true - funcInfo.UseAuthorizedCaller = false - case "public": - funcInfo.HasOnlyOwner = false - funcInfo.UseAuthorizedCaller = false - case "authorized_callers": - funcInfo.HasOnlyOwner = false - funcInfo.UseAuthorizedCaller = true - default: - return fmt.Errorf("unknown access control '%s' for function %s (use 'owner', 'public', or 'authorized_callers')", - funcCfg.Access, funcCfg.Name) - } - - // Use the potentially suffixed name as the key - info.Functions[funcInfo.Name] = funcInfo - info.FunctionOrder = append(info.FunctionOrder, funcInfo.Name) - } - } - - return nil -} - -func collectAllStructDefs(info *ContractInfo) { - if info.Constructor != nil { - collectStructDefs(info.Constructor.Parameters, info.StructDefs) - } - for _, funcInfo := range info.Functions { - collectStructDefs(funcInfo.Parameters, info.StructDefs) - collectStructDefs(funcInfo.ReturnParams, info.StructDefs) - - if !funcInfo.IsWrite && len(funcInfo.ReturnParams) > 1 { - structName := multiReturnStructName(funcInfo.Name) - if _, exists := info.StructDefs[structName]; !exists { - info.StructDefs[structName] = &StructDef{ - Name: structName, - Fields: funcInfo.ReturnParams, - } - } - } - } -} - -func collectStructDefs(params []ParameterInfo, structDefs map[string]*StructDef) { - for _, param := range params { - if param.IsStruct && param.StructName != "" { - if _, exists := structDefs[param.StructName]; !exists { - structDefs[param.StructName] = &StructDef{ - Name: param.StructName, - Fields: param.Components, - } - } - collectStructDefs(param.Components, structDefs) - } - } -} - -func findFunctionInABI(entries []ABIEntry, funcName string, packageName string) []*FunctionInfo { - var candidates []ABIEntry - for _, entry := range entries { - if entry.Type == "function" && strings.EqualFold(entry.Name, funcName) { - candidates = append(candidates, entry) - } - } - - if len(candidates) == 0 { - return nil - } - - // Parse all overloads - var funcInfos []*FunctionInfo - for i, candidate := range candidates { - funcInfo := parseABIFunction(candidate, false, packageName) - - // For overloaded functions, follow Geth's naming convention: - // - First overload (i=0): no suffix (e.g., "Curse", "curse") - // - Second overload (i=1): suffix "0" (e.g., "Curse0", "curse0") - // - Third overload (i=2): suffix "1" (e.g., "Curse1", "curse1") - if len(candidates) > 1 && i > 0 { - suffix := fmt.Sprintf("%d", i-1) - funcInfo.Name = funcInfo.Name + suffix - funcInfo.CallMethod = funcInfo.CallMethod + suffix - } - - funcInfos = append(funcInfos, funcInfo) - } - - return funcInfos -} - -func parseABIFunction(entry ABIEntry, _ bool, packageName string) *FunctionInfo { - funcInfo := &FunctionInfo{ - Name: capitalize(entry.Name), - StateMutability: entry.StateMutability, - CallMethod: entry.Name, - IsWrite: entry.StateMutability != "view" && entry.StateMutability != "pure", - } - - for i, input := range entry.Inputs { - p := parseABIParam(input, packageName) - if p.Name == "" { - p.Name = fmt.Sprintf("arg%d", i) - } - funcInfo.Parameters = append(funcInfo.Parameters, p) - } - - for i, output := range entry.Outputs { - p := parseABIParam(output, packageName) - if p.Name == "" { - p.Name = fmt.Sprintf("ret%d", i) - } - funcInfo.ReturnParams = append(funcInfo.ReturnParams, p) - } - - return funcInfo -} - -//nolint:unparam -func parseABIParam(param ABIParam, packageName string) ParameterInfo { - goType := solidityToGoType(param.Type, param.InternalType) - - paramInfo := ParameterInfo{ - Name: param.Name, - SolidityType: param.Type, - GoType: goType, - } - - if strings.HasPrefix(param.Type, "tuple") { - structName := extractStructName(param.InternalType) - if structName != "" { - paramInfo.IsStruct = true - paramInfo.StructName = structName - - if strings.HasSuffix(param.Type, "[]") { - paramInfo.GoType = "[]" + structName - } else { - paramInfo.GoType = structName - } - - for _, comp := range param.Components { - paramInfo.Components = append(paramInfo.Components, parseABIParam(comp, packageName)) - } - } - } - - return paramInfo -} - -func solidityToGoType(solidityType, _ string) string { - baseType := strings.TrimSuffix(solidityType, "[]") - if goType, ok := typeMap[baseType]; ok { - if strings.HasSuffix(solidityType, "[]") { - return "[]" + goType - } - return goType - } - - if strings.HasPrefix(baseType, "tuple") { - return anyType - } - - return anyType -} - -func extractStructName(internalType string) string { - if internalType == "" { - return "" - } - - parts := strings.Split(internalType, ".") - structName := parts[len(parts)-1] - structName = strings.TrimSuffix(structName, "[]") - - return structName -} - -func versionToPath(version string) string { - return "v" + strings.ReplaceAll(version, ".", "_") -} - -func toSnakeCase(s string) string { - if override, ok := nameOverrides[s]; ok { - return override - } - - var result []rune - runes := []rune(s) - for i := 0; i < len(runes); i++ { - r := runes[i] - if i > 0 && r >= 'A' && r <= 'Z' { - prevLower := runes[i-1] >= 'a' && runes[i-1] <= 'z' - nextLower := i+1 < len(runes) && runes[i+1] >= 'a' && runes[i+1] <= 'z' - if prevLower || nextLower { - result = append(result, '_') - } - } - result = append(result, r) - } - return strings.ToLower(string(result)) -} - -func capitalize(s string) string { - if s == "" { - return "" - } - return strings.ToUpper(s[:1]) + s[1:] -} - -func toKebabCase(s string) string { - return strings.ReplaceAll(toSnakeCase(s), "_", "-") -} - -func generateOperationsFile(info *ContractInfo) error { - data := prepareTemplateData(info) - - t, err := template.New("operations").Parse(operationsTemplate) - if err != nil { - return fmt.Errorf("template parse error: %w", err) - } - - var buf bytes.Buffer - if err := t.Execute(&buf, data); err != nil { - return fmt.Errorf("template execution error: %w", err) - } - - formatted, err := format.Source(buf.Bytes()) - if err != nil { - return fmt.Errorf("formatting error: %w\n%s", err, buf.String()) - } - - if err := os.MkdirAll(filepath.Dir(info.OutputPath), 0755); err != nil { - return fmt.Errorf("failed to create output directory: %w", err) - } - - if err := os.WriteFile(info.OutputPath, formatted, 0600); err != nil { - return fmt.Errorf("failed to write file: %w", err) - } - - return nil -} - -func prepareTemplateData(info *ContractInfo) TemplateData { - data := TemplateData{ - PackageName: info.PackageName, - PackageNameHyphen: toKebabCase(info.PackageName), - ContractType: info.Name, - Version: info.Version, - ABI: info.ABI, - Bytecode: info.Bytecode, - NeedsBigInt: checkNeedsBigInt(info), - NoDeployment: info.NoDeployment, - } - - if info.Constructor != nil { - data.Constructor = &ConstructorData{ - Parameters: prepareParameters(info.Constructor.Parameters), - } - } - - for _, name := range info.FunctionOrder { - funcInfo := info.Functions[name] - data.ContractMethods = append(data.ContractMethods, prepareContractMethod(funcInfo, funcInfo.IsWrite)) - - // Add to unified operations list - if funcInfo.IsWrite { - data.HasWriteOps = true - writeOp := prepareWriteOp(funcInfo) - data.Operations = append(data.Operations, OperationData{ - Name: writeOp.Name, - MethodName: writeOp.MethodName, - OpName: writeOp.OpName, - ArgsType: writeOp.ArgsType, - CallArgs: writeOp.CallArgs, - IsWrite: true, - AccessControl: writeOp.AccessControl, - }) - if len(funcInfo.Parameters) > 1 { - data.ArgStructs = append(data.ArgStructs, ArgStructData{ - Name: funcInfo.Name + "Args", - Fields: prepareParameters(funcInfo.Parameters), - }) - } - } else { - readOp := prepareReadOp(funcInfo) - data.Operations = append(data.Operations, OperationData{ - Name: readOp.Name, - MethodName: readOp.MethodName, - OpName: readOp.OpName, - ArgsType: readOp.ArgsType, - CallArgs: readOp.CallArgs, - IsWrite: false, - ReturnType: readOp.ReturnType, - }) - // Generate Args struct for read operations with multiple parameters - if len(funcInfo.Parameters) > 1 { - data.ArgStructs = append(data.ArgStructs, ArgStructData{ - Name: funcInfo.Name + "Args", - Fields: prepareParameters(funcInfo.Parameters), - }) - } - } - } - - var structNames []string - for name := range info.StructDefs { - structNames = append(structNames, name) - } - sort.Strings(structNames) - for _, name := range structNames { - structDef := info.StructDefs[name] - data.StructDefs = append(data.StructDefs, StructDefData{ - Name: structDef.Name, - Fields: prepareParameters(structDef.Fields), - }) - } - - return data -} - -func checkNeedsBigInt(info *ContractInfo) bool { - check := func(params []ParameterInfo) bool { - for _, p := range params { - if strings.Contains(p.GoType, "*big.Int") { - return true - } - } - return false - } - - for _, funcInfo := range info.Functions { - if check(funcInfo.Parameters) || check(funcInfo.ReturnParams) { - return true - } - } - - if info.Constructor != nil && check(info.Constructor.Parameters) { - return true - } - - for _, structDef := range info.StructDefs { - if check(structDef.Fields) { - return true - } - } - - return false -} - -func prepareContractMethod(funcInfo *FunctionInfo, isWrite bool) ContractMethodData { - optsType := "*bind.CallOpts" - if isWrite { - optsType = "*bind.TransactOpts" - } - - params := fmt.Sprintf("opts %s", optsType) - var methodArgs []string - - if len(funcInfo.Parameters) == 1 { - params += fmt.Sprintf(", args %s", funcInfo.Parameters[0].GoType) - methodArgs = []string{"args"} - } else if len(funcInfo.Parameters) > 1 { - for _, p := range funcInfo.Parameters { - paramName := p.Name - if len(paramName) > 0 { - paramName = strings.ToLower(paramName[:1]) + paramName[1:] - } - if paramName == "" { - paramName = fmt.Sprintf("arg%d", len(methodArgs)) - } - params += fmt.Sprintf(", %s %s", paramName, p.GoType) - methodArgs = append(methodArgs, paramName) - } - } - - returns := "(*types.Transaction, error)" - returnType := anyType - if !isWrite { - if len(funcInfo.ReturnParams) == 1 { - returnType = funcInfo.ReturnParams[0].GoType - } else if len(funcInfo.ReturnParams) > 1 { - returnType = multiReturnStructName(funcInfo.Name) - } - returns = fmt.Sprintf("(%s, error)", returnType) - } - - var methodBody string - if isWrite { - methodBody = buildWriteMethodBody(funcInfo, methodArgs) - } else { - methodBody = buildReadMethodBody(funcInfo, methodArgs, returnType) - } - - return ContractMethodData{ - Name: funcInfo.Name, - MethodName: funcInfo.CallMethod, - Params: params, - Returns: returns, - MethodBody: methodBody, - } -} - -func buildWriteMethodBody(funcInfo *FunctionInfo, methodArgs []string) string { - if len(methodArgs) > 0 { - return fmt.Sprintf("return c.contract.Transact(opts, \"%s\", %s)", - funcInfo.CallMethod, strings.Join(methodArgs, ", ")) - } - return fmt.Sprintf("return c.contract.Transact(opts, \"%s\")", funcInfo.CallMethod) -} - -func buildReadMethodBody(funcInfo *FunctionInfo, methodArgs []string, returnType string) string { - callArgsStr := "" - if len(methodArgs) > 0 { - callArgsStr = ", " + strings.Join(methodArgs, ", ") - } - if len(funcInfo.ReturnParams) > 1 { - return buildMultiReturnMethodBody(funcInfo, callArgsStr, returnType) - } - return fmt.Sprintf( - `var out []any - err := c.contract.Call(opts, &out, "%s"%s) - if err != nil { - var zero %s - return zero, err - } - return *abi.ConvertType(out[0], new(%s)).(*%s), nil`, - funcInfo.CallMethod, callArgsStr, returnType, returnType, returnType, - ) -} - -func prepareParameters(params []ParameterInfo) []ParameterData { - var result []ParameterData - for i, param := range params { - name := capitalize(param.Name) - if name == "" { - name = fmt.Sprintf("Field%d", i) - } - result = append(result, ParameterData{ - GoName: name, - GoType: param.GoType, - }) - } - return result -} - -// buildCallArgs extracts common logic for building argument types and call arguments -func buildCallArgs(funcInfo *FunctionInfo, argsPrefix string) (argsType string, callArgs string) { - if len(funcInfo.Parameters) == 0 { - return "struct{}", "" - } - - if len(funcInfo.Parameters) == 1 { - return funcInfo.Parameters[0].GoType, ", " + argsPrefix - } - - // Multiple parameters - use Args struct - argsType = funcInfo.Name + "Args" - var callArgsList []string - for i, p := range funcInfo.Parameters { - fieldName := capitalize(p.Name) - if fieldName == "" { - fieldName = fmt.Sprintf("Field%d", i) - } - callArgsList = append(callArgsList, argsPrefix+"."+fieldName) - } - callArgs = ", " + strings.Join(callArgsList, ", ") - return argsType, callArgs -} - -func prepareWriteOp(funcInfo *FunctionInfo) WriteOpData { - argsType, callArgs := buildCallArgs(funcInfo, "args") - - accessControl := "AllCallersAllowed" - switch { - case funcInfo.HasOnlyOwner: - accessControl = "OnlyOwner" - case funcInfo.UseAuthorizedCaller: - accessControl = "IsAuthorizedCaller" - } - - return WriteOpData{ - Name: funcInfo.Name, - MethodName: funcInfo.CallMethod, - OpName: toKebabCase(funcInfo.Name), - ArgsType: argsType, - CallArgs: callArgs, - AccessControl: accessControl, - } -} - -func multiReturnStructName(funcName string) string { - return funcName + "Result" -} - -func buildMultiReturnMethodBody(funcInfo *FunctionInfo, callArgsStr, returnType string) string { - var b strings.Builder - fmt.Fprintf(&b, "var out []any\n") - fmt.Fprintf(&b, "\terr := c.contract.Call(opts, &out, \"%s\"%s)\n", funcInfo.CallMethod, callArgsStr) - fmt.Fprintf(&b, "\toutstruct := new(%s)\n", returnType) - fmt.Fprintf(&b, "\tif err != nil {\n") - fmt.Fprintf(&b, "\t\treturn *outstruct, err\n") - fmt.Fprintf(&b, "\t}\n\n") - for i, p := range funcInfo.ReturnParams { - fieldName := capitalize(p.Name) - if fieldName == "" { - fieldName = fmt.Sprintf("Field%d", i) - } - fmt.Fprintf(&b, "\toutstruct.%s = *abi.ConvertType(out[%d], new(%s)).(*%s)\n", - fieldName, i, p.GoType, p.GoType) - } - fmt.Fprintf(&b, "\n\treturn *outstruct, nil") - return b.String() -} - -func prepareReadOp(funcInfo *FunctionInfo) ReadOpData { - argsType, callArgs := buildCallArgs(funcInfo, "args") - - returnType := anyType - if len(funcInfo.ReturnParams) == 1 { - returnType = funcInfo.ReturnParams[0].GoType - } else if len(funcInfo.ReturnParams) > 1 { - returnType = multiReturnStructName(funcInfo.Name) - } - - return ReadOpData{ - Name: funcInfo.Name, - MethodName: funcInfo.CallMethod, - OpName: toKebabCase(funcInfo.Name), - ArgsType: argsType, - ReturnType: returnType, - CallArgs: callArgs, - } -} diff --git a/chains/evm/cmd/operations-gen/operations.tmpl b/chains/evm/cmd/operations-gen/operations.tmpl deleted file mode 100644 index 9c59e103a0..0000000000 --- a/chains/evm/cmd/operations-gen/operations.tmpl +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by operations-gen. DO NOT EDIT. - -package {{.PackageName}} - -import ( -{{- if .NeedsBigInt}} - "math/big" -{{end}} - "strings" - - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" -{{- if .HasWriteOps}} - "github.com/ethereum/go-ethereum/core/types" -{{end}} - cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" -) - -var ContractType cldf_deployment.ContractType = "{{.ContractType}}" -var Version = semver.MustParse("{{.Version}}") -var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) - -const {{.ContractType}}ABI = `{{.ABI}}` -{{- if not .NoDeployment}} -const {{.ContractType}}Bin = "{{.Bytecode}}" -{{- end}} - -type {{.ContractType}}Contract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func New{{.ContractType}}Contract( - address common.Address, - backend bind.ContractBackend, -) (*{{.ContractType}}Contract, error) { - parsed, err := abi.JSON(strings.NewReader({{.ContractType}}ABI)) - if err != nil { - return nil, err - } - return &{{.ContractType}}Contract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *{{.ContractType}}Contract) Address() common.Address { - return c.address -} - -func (c *{{.ContractType}}Contract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} -{{range .ContractMethods}} - -func (c *{{$.ContractType}}Contract) {{.Name}}({{.Params}}) {{.Returns}} { - {{.MethodBody}} -} -{{- end}} -{{range .StructDefs}} - -type {{.Name}} struct { -{{- range .Fields}} - {{.GoName}} {{.GoType}} -{{- end}} -} -{{- end}} -{{range .ArgStructs}} - -type {{.Name}} struct { -{{- range .Fields}} - {{.GoName}} {{.GoType}} -{{- end}} -} -{{- end}} -{{- if not .NoDeployment}} -{{if .Constructor}} - -type ConstructorArgs struct { -{{- range .Constructor.Parameters}} - {{.GoName}} {{.GoType}} -{{- end}} -} - -var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "{{.PackageNameHyphen}}:deploy", - Version: Version, - Description: "Deploys the {{.ContractType}} contract", - ContractMetadata: &bind.MetaData{ - ABI: {{.ContractType}}ABI, - Bin: {{.ContractType}}Bin, - }, - BytecodeByTypeAndVersion: map[string]contract.Bytecode{ - cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex({{.ContractType}}Bin), - }, - }, - Validate: func(ConstructorArgs) error { return nil }, -}) -{{- else}} - -type ConstructorArgs = struct{} - -var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "{{.PackageNameHyphen}}:deploy", - Version: Version, - Description: "Deploys the {{.ContractType}} contract", - ContractMetadata: &bind.MetaData{ - ABI: {{.ContractType}}ABI, - Bin: {{.ContractType}}Bin, - }, - BytecodeByTypeAndVersion: map[string]contract.Bytecode{ - cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex({{.ContractType}}Bin), - }, - }, - Validate: func(ConstructorArgs) error { return nil }, -}) -{{- end}} -{{- end}} -{{range .Operations}} -{{if .IsWrite}} - -var {{.Name}} = contract.NewWrite(contract.WriteParams[{{.ArgsType}}, *{{$.ContractType}}Contract]{ - Name: "{{$.PackageNameHyphen}}:{{.OpName}}", - Version: Version, - Description: "Calls {{.MethodName}} on the contract", - ContractType: ContractType, - ContractABI: {{$.ContractType}}ABI, - NewContract: New{{$.ContractType}}Contract, - IsAllowedCaller: contract.{{.AccessControl}}[*{{$.ContractType}}Contract, {{.ArgsType}}], - Validate: func({{.ArgsType}}) error { return nil }, - CallContract: func( - c *{{$.ContractType}}Contract, - opts *bind.TransactOpts, - args {{.ArgsType}}, - ) (*types.Transaction, error) { - return c.{{.Name}}(opts{{.CallArgs}}) - }, -}) -{{- else}} - -var {{.Name}} = contract.NewRead(contract.ReadParams[{{.ArgsType}}, {{.ReturnType}}, *{{$.ContractType}}Contract]{ - Name: "{{$.PackageNameHyphen}}:{{.OpName}}", - Version: Version, - Description: "Calls {{.MethodName}} on the contract", - ContractType: ContractType, - NewContract: New{{$.ContractType}}Contract, - CallContract: func(c *{{$.ContractType}}Contract, opts *bind.CallOpts, args {{.ArgsType}}) ({{.ReturnType}}, error) { - return c.{{.Name}}(opts{{.CallArgs}}) - }, -}) -{{- end}} -{{- end}} diff --git a/chains/evm/contracts/offRamp/OffRamp.sol b/chains/evm/contracts/offRamp/OffRamp.sol index 059403ff6b..d6d0365257 100644 --- a/chains/evm/contracts/offRamp/OffRamp.sol +++ b/chains/evm/contracts/offRamp/OffRamp.sol @@ -69,7 +69,7 @@ contract OffRamp is ITypeAndVersion, Ownable2StepMsgSender { struct StaticConfig { uint64 localChainSelector; // ──╮ Local chainSelector uint16 gasForCallExactCheck; // │ Gas for call exact check - IRMN rmnRemote; // ───────╯ RMN Verification Contract + IRMN rmnRemote; // ─────────────╯ RMN Verification Contract address tokenAdminRegistry; // ───────╮ Token admin registry address uint32 maxGasBufferToUpdateState; // ─╯ Max Gas Buffer to Update State } diff --git a/chains/evm/deployment/operations_gen_config.yaml b/chains/evm/deployment/operations_gen_config.yaml index 6e5d4e7779..63b25776e1 100644 --- a/chains/evm/deployment/operations_gen_config.yaml +++ b/chains/evm/deployment/operations_gen_config.yaml @@ -1,14 +1,18 @@ -version: "1.0" +# Schema for github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen +# (generates operations using chain/evm/operations2/contract). +version: "1.0.0" +chain_family: evm input: - base_path: ".." # Directory containing abi/ and bytecode/ folders + gobindings_package: "../gobindings/generated" output: - base_path: "." # Directory for generated operations/ + base_path: "." -# Access control aliases -# - owner: Only contract owner can call (OnlyOwner) -# - (none): Public/Read functions don't need access control +# Access control (writes): +# - owner: OnlyOwner-style gate (MCMS when deployer is not owner) +# - public: read or unrestricted write +# - role: OpenZeppelin HasRole (requires role: on the function) contracts: # 1.5.0 @@ -61,11 +65,66 @@ contracts: - name: configureAllowedCallers access: owner + - contract_name: HybridLockReleaseUSDCTokenPool + version: "1.6.2" + package_name: hybrid_lock_release_usdc_token_pool + functions: + - name: shouldUseLockRelease + access: public + - name: getLockedTokensForChain + access: public + - name: getLiquidityProvider + access: public + - name: withdrawLiquidity + access: owner + + # 1.6.5 + - contract_name: USDCTokenPool + version: "1.6.5" + package_name: usdc_token_pool + functions: + - name: getDomain + access: public + - name: setDomains + access: owner + - name: applyAuthorizedCallerUpdates + access: owner + - name: getAllAuthorizedCallers + access: public + - name: applyChainUpdates + access: owner + - name: addRemotePool + access: owner + - name: removeRemotePool + access: owner + - name: getSupportedChains + access: public + + - contract_name: USDCTokenPoolCCTPV2 + version: "1.6.5" + package_name: usdc_token_pool_cctp_v2 + functions: + - name: getDomain + access: public + - name: setDomains + access: owner + - name: applyAuthorizedCallerUpdates + access: owner + - name: getAllAuthorizedCallers + access: public + - name: applyChainUpdates + access: owner + - name: addRemotePool + access: owner + - name: removeRemotePool + access: owner + - name: getSupportedChains + access: public + # 1.6.1 - contract_name: TokenPool version: "1.6.1" - abi_file: burn_mint_token_pool.json - no_deployment: true + omit_deploy: true functions: - name: applyChainUpdates access: owner @@ -176,6 +235,7 @@ contracts: - contract_name: FeeQuoter version: "1.6.0" + omit_deploy: true functions: - name: applyDestChainConfigUpdates access: owner @@ -197,9 +257,14 @@ contracts: access: public - name: getAllAuthorizedCallers access: public + - name: getFeeTokens + access: public + - name: getTokenPrices + access: public - contract_name: OnRamp version: "1.6.0" + package_name: onramp functions: - name: applyDestChainConfigUpdates access: owner @@ -258,8 +323,8 @@ contracts: - contract_name: CrossChainToken version: "2.0.0" package_name: erc20 - abi_file: cross_chain_token.json - no_deployment: true + gobindings_package: "../gobindings/generated/v2_0_0/cross_chain_token" + omit_deploy: true functions: - name: approve access: public @@ -340,8 +405,7 @@ contracts: - contract_name: TokenPool version: "2.0.0" - abi_file: burn_mint_token_pool.json - no_deployment: true + omit_deploy: true functions: - name: setAllowedFinalityConfig access: owner @@ -479,13 +543,13 @@ contracts: access: owner - name: getAllAuthorizedCallers access: public - - name : transferOwnership + - name: transferOwnership access: owner - contract_name: MockReceiverV2 version: "2.0.0" package_name: mock_receiver - abi_file: mock_receiver_v2.json + gobindings_package: "../gobindings/generated/v2_0_0/mock_receiver_v2" functions: [] - contract_name: Executor @@ -627,8 +691,10 @@ contracts: - contract_name: RMN version: "2.0.0" functions: + # tools/operations-gen supports owner | public | role only. On-chain curse also allows + # authorized callers; use owner here so non-owners follow the proposal path like other gated writes. - name: curse - access: authorized_callers + access: owner - name: uncurse access: owner - name: isCursed diff --git a/chains/evm/deployment/v1_5_0/operations/burn_mint_token_pool_and_proxy/burn_mint_token_pool_and_proxy.go b/chains/evm/deployment/v1_5_0/operations/burn_mint_token_pool_and_proxy/burn_mint_token_pool_and_proxy.go index 32352c539a..6324f05ead 100644 --- a/chains/evm/deployment/v1_5_0/operations/burn_mint_token_pool_and_proxy/burn_mint_token_pool_and_proxy.go +++ b/chains/evm/deployment/v1_5_0/operations/burn_mint_token_pool_and_proxy/burn_mint_token_pool_and_proxy.go @@ -3,173 +3,87 @@ package burn_mint_token_pool_and_proxy import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/burn_mint_token_pool_and_proxy" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "BurnMintTokenPoolAndProxy" var Version = semver.MustParse("1.5.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnMintTokenPoolAndProxyABI = `[{"inputs":[{"internalType":"contract IBurnMintERC20","name":"token","type":"address"},{"internalType":"address[]","name":"allowlist","type":"address[]"},{"internalType":"address","name":"rmnProxy","type":"address"},{"internalType":"address","name":"router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"capacity","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"}],"name":"AggregateValueMaxCapacityExceeded","type":"error"},{"inputs":[{"internalType":"uint256","name":"minWaitInSeconds","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"AggregateValueRateLimitReached","type":"error"},{"inputs":[],"name":"AllowListNotEnabled","type":"error"},{"inputs":[],"name":"BucketOverfilled","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotARampOnRouter","type":"error"},{"inputs":[{"internalType":"uint64","name":"chainSelector","type":"uint64"}],"name":"ChainAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"ChainNotAllowed","type":"error"},{"inputs":[],"name":"CursedByRMN","type":"error"},{"inputs":[{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"config","type":"tuple"}],"name":"DisabledNonZeroRateLimit","type":"error"},{"inputs":[{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"rateLimiterConfig","type":"tuple"}],"name":"InvalidRateLimitRate","type":"error"},{"inputs":[{"internalType":"bytes","name":"sourcePoolAddress","type":"bytes"}],"name":"InvalidSourcePoolAddress","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"InvalidToken","type":"error"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"NonExistentChain","type":"error"},{"inputs":[],"name":"RateLimitMustBeDisabled","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"SenderNotAllowed","type":"error"},{"inputs":[{"internalType":"uint256","name":"capacity","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"TokenMaxCapacityExceeded","type":"error"},{"inputs":[{"internalType":"uint256","name":"minWaitInSeconds","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"TokenRateLimitReached","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroAddressNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"AllowListAdd","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"AllowListRemove","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"remoteToken","type":"bytes"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"indexed":false,"internalType":"struct RateLimiter.Config","name":"outboundRateLimiterConfig","type":"tuple"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"indexed":false,"internalType":"struct RateLimiter.Config","name":"inboundRateLimiterConfig","type":"tuple"}],"name":"ChainAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"indexed":false,"internalType":"struct RateLimiter.Config","name":"outboundRateLimiterConfig","type":"tuple"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"indexed":false,"internalType":"struct RateLimiter.Config","name":"inboundRateLimiterConfig","type":"tuple"}],"name":"ChainConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"ChainRemoved","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"indexed":false,"internalType":"struct RateLimiter.Config","name":"config","type":"tuple"}],"name":"ConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IPoolPriorTo1_5","name":"oldPool","type":"address"},{"indexed":false,"internalType":"contract IPoolPriorTo1_5","name":"newPool","type":"address"}],"name":"LegacyPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"previousPoolAddress","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"remotePoolAddress","type":"bytes"}],"name":"RemotePoolSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRouter","type":"address"},{"indexed":false,"internalType":"address","name":"newRouter","type":"address"}],"name":"RouterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"TokensConsumed","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"removes","type":"address[]"},{"internalType":"address[]","name":"adds","type":"address[]"}],"name":"applyAllowListUpdates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"internalType":"bool","name":"allowed","type":"bool"},{"internalType":"bytes","name":"remotePoolAddress","type":"bytes"},{"internalType":"bytes","name":"remoteTokenAddress","type":"bytes"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"outboundRateLimiterConfig","type":"tuple"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"inboundRateLimiterConfig","type":"tuple"}],"internalType":"struct TokenPool.ChainUpdate[]","name":"chains","type":"tuple[]"}],"name":"applyChainUpdates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllowList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowListEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"getCurrentInboundRateLimiterState","outputs":[{"components":[{"internalType":"uint128","name":"tokens","type":"uint128"},{"internalType":"uint32","name":"lastUpdated","type":"uint32"},{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.TokenBucket","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"getCurrentOutboundRateLimiterState","outputs":[{"components":[{"internalType":"uint128","name":"tokens","type":"uint128"},{"internalType":"uint32","name":"lastUpdated","type":"uint32"},{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.TokenBucket","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"getOnRamp","outputs":[{"internalType":"address","name":"onRampAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPreviousPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRateLimitAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"getRemotePool","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"getRemoteToken","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRmnProxy","outputs":[{"internalType":"address","name":"rmnProxy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRouter","outputs":[{"internalType":"address","name":"router","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSupportedChains","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getToken","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"name":"isOffRamp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"}],"name":"isSupportedChain","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isSupportedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"receiver","type":"bytes"},{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"internalType":"address","name":"originalSender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"localToken","type":"address"}],"internalType":"struct Pool.LockOrBurnInV1","name":"lockOrBurnIn","type":"tuple"}],"name":"lockOrBurn","outputs":[{"components":[{"internalType":"bytes","name":"destTokenAddress","type":"bytes"},{"internalType":"bytes","name":"destPoolData","type":"bytes"}],"internalType":"struct Pool.LockOrBurnOutV1","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"originalSender","type":"bytes"},{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"localToken","type":"address"},{"internalType":"bytes","name":"sourcePoolAddress","type":"bytes"},{"internalType":"bytes","name":"sourcePoolData","type":"bytes"},{"internalType":"bytes","name":"offchainTokenData","type":"bytes"}],"internalType":"struct Pool.ReleaseOrMintInV1","name":"releaseOrMintIn","type":"tuple"}],"name":"releaseOrMint","outputs":[{"components":[{"internalType":"uint256","name":"destinationAmount","type":"uint256"}],"internalType":"struct Pool.ReleaseOrMintOutV1","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"outboundConfig","type":"tuple"},{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"uint128","name":"capacity","type":"uint128"},{"internalType":"uint128","name":"rate","type":"uint128"}],"internalType":"struct RateLimiter.Config","name":"inboundConfig","type":"tuple"}],"name":"setChainRateLimiterConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPoolPriorTo1_5","name":"prevPool","type":"address"}],"name":"setPreviousPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rateLimitAdmin","type":"address"}],"name":"setRateLimitAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"remoteChainSelector","type":"uint64"},{"internalType":"bytes","name":"remotePoolAddress","type":"bytes"}],"name":"setRemotePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRouter","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"typeAndVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]` -const BurnMintTokenPoolAndProxyBin = "0x60e06040523480156200001157600080fd5b506040516200497338038062004973833981016040819052620000349162000554565b83838383838383833380600081620000935760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c657620000c6816200017e565b5050506001600160a01b0384161580620000e757506001600160a01b038116155b80620000fa57506001600160a01b038216155b1562000119576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c0526200016c576040805160008152602081019091526200016c908462000229565b505050505050505050505050620006b2565b336001600160a01b03821603620001d85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200008a565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c0516200024a576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002d55760008382815181106200026e576200026e62000664565b602090810291909101015190506200028860028262000386565b15620002cb576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016200024d565b5060005b815181101562000381576000828281518110620002fa57620002fa62000664565b6020026020010151905060006001600160a01b0316816001600160a01b03160362000326575062000378565b62000333600282620003a6565b1562000376576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620002d9565b505050565b60006200039d836001600160a01b038416620003bd565b90505b92915050565b60006200039d836001600160a01b038416620004c1565b60008181526001830160205260408120548015620004b6576000620003e46001836200067a565b8554909150600090620003fa906001906200067a565b9050808214620004665760008660000182815481106200041e576200041e62000664565b906000526020600020015490508087600001848154811062000444576200044462000664565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806200047a576200047a6200069c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620003a0565b6000915050620003a0565b60008181526001830160205260408120546200050a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003a0565b506000620003a0565b6001600160a01b03811681146200052957600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b80516200054f8162000513565b919050565b600080600080608085870312156200056b57600080fd5b8451620005788162000513565b602086810151919550906001600160401b03808211156200059857600080fd5b818801915088601f830112620005ad57600080fd5b815181811115620005c257620005c26200052c565b8060051b604051601f19603f83011681018181108582111715620005ea57620005ea6200052c565b60405291825284820192508381018501918b8311156200060957600080fd5b938501935b828510156200063257620006228562000542565b845293850193928501926200060e565b809850505050505050620006496040860162000542565b9150620006596060860162000542565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b81810381811115620003a057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05161423d620007366000396000818161056001528181611ae8015261253a01526000818161053a0152818161187b0152611d9b015260008181610265015281816102ba0152818161078001528181610e060152818161179b01528181611cbb01528181611ea1015281816124d00152612725015261423d6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80639a4575b911610104578063c0d78655116100a2578063db6327dc11610071578063db6327dc14610525578063dc0bd97114610538578063e0351e131461055e578063f2fde38b1461058457600080fd5b8063c0d78655146104d7578063c4bffe2b146104ea578063c75eea9c146104ff578063cf7401f31461051257600080fd5b8063a8d87a3b116100de578063a8d87a3b14610424578063af58d59f14610437578063b0f479a1146104a6578063b7946580146104c457600080fd5b80639a4575b9146103d1578063a2b261d8146103f1578063a7cd63b71461040f57600080fd5b80636d3d1a581161017c57806383826b2b1161014b57806383826b2b1461037a5780638926f54f1461038d5780638da5cb5b146103a05780639766b932146103be57600080fd5b80636d3d1a581461032e57806378a010b21461034c57806379ba50971461035f5780637d54534e1461036757600080fd5b806321df0da7116101b857806321df0da714610263578063240028e8146102aa57806339077537146102f757806354c8a4f31461031957600080fd5b806301ffc9a7146101df5780630a2fd49314610207578063181f5a7714610227575b600080fd5b6101f26101ed3660046131d2565b610597565b60405190151581526020015b60405180910390f35b61021a610215366004613231565b61067c565b6040516101fe91906132ba565b61021a6040518060400160405280601f81526020017f4275726e4d696e74546f6b656e506f6f6c416e6450726f787920312e352e300081525081565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b6101f26102b83660046132fa565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b61030a610305366004613317565b61072c565b604051905181526020016101fe565b61032c61032736600461339f565b6108e4565b005b60085473ffffffffffffffffffffffffffffffffffffffff16610285565b61032c61035a36600461340b565b61095f565b61032c610ad3565b61032c6103753660046132fa565b610bd0565b6101f261038836600461348e565b610c1f565b6101f261039b366004613231565b610cec565b60005473ffffffffffffffffffffffffffffffffffffffff16610285565b61032c6103cc3660046132fa565b610d03565b6103e46103df3660046134c5565b610d92565b6040516101fe9190613500565b60095473ffffffffffffffffffffffffffffffffffffffff16610285565b610417610f02565b6040516101fe9190613560565b610285610432366004613231565b503090565b61044a610445366004613231565b610f13565b6040516101fe919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610285565b61021a6104d2366004613231565b610fe8565b61032c6104e53660046132fa565b611013565b6104f26110e7565b6040516101fe91906135ba565b61044a61050d366004613231565b61119f565b61032c610520366004613771565b611271565b61032c6105333660046137b6565b6112fa565b7f0000000000000000000000000000000000000000000000000000000000000000610285565b7f00000000000000000000000000000000000000000000000000000000000000006101f2565b61032c6105923660046132fa565b611780565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061062a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061067657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b67ffffffffffffffff811660009081526007602052604090206004018054606091906106a7906137f8565b80601f01602080910402602001604051908101604052809291908181526020018280546106d3906137f8565b80156107205780601f106106f557610100808354040283529160200191610720565b820191906000526020600020905b81548152906001019060200180831161070357829003601f168201915b50505050509050919050565b60408051602081019091526000815261074c610747836138e7565b611794565b60095473ffffffffffffffffffffffffffffffffffffffff166108425773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f196107b560608501604086016132fa565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260608501356024820152604401600060405180830381600087803b15801561082557600080fd5b505af1158015610839573d6000803e3d6000fd5b50505050610853565b61085361084e836138e7565b6119c5565b61086360608301604084016132fa565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f084606001356040516108c591815260200190565b60405180910390a3506040805160208101909152606090910135815290565b6108ec611a63565b61095984848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611ae692505050565b50505050565b610967611a63565b61097083610cec565b6109b7576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b67ffffffffffffffff8316600090815260076020526040812060040180546109de906137f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0a906137f8565b8015610a575780601f10610a2c57610100808354040283529160200191610a57565b820191906000526020600020905b815481529060010190602001808311610a3a57829003601f168201915b5050505067ffffffffffffffff8616600090815260076020526040902091925050600401610a86838583613a2c565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610ac593929190613b46565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109ae565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610bd8611a63565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff8216301480610ce55750600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86169281019290925273ffffffffffffffffffffffffffffffffffffffff848116602484015216906383826b2b90604401602060405180830381865afa158015610cc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce59190613baa565b9392505050565b6000610676600567ffffffffffffffff8416611c9c565b610d0b611a63565b6009805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f81accd0a7023865eaa51b3399dd0eafc488bf3ba238402911e1659cfe860f22891015b60405180910390a15050565b6040805180820190915260608082526020820152610db7610db283613bc7565b611cb4565b60095473ffffffffffffffffffffffffffffffffffffffff16610e7c576040517f42966c68000000000000000000000000000000000000000000000000000000008152606083013560048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b158015610e5f57600080fd5b505af1158015610e73573d6000803e3d6000fd5b50505050610e8d565b610e8d610e8883613bc7565b611e7e565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610ee78460200160208101906104d29190613231565b81526040805160208181019092526000815291015292915050565b6060610f0e6002611f98565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261067690611fa5565b67ffffffffffffffff811660009081526007602052604090206005018054606091906106a7906137f8565b61101b611a63565b73ffffffffffffffffffffffffffffffffffffffff8116611068576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849101610d86565b606060006110f56005611f98565b90506000815167ffffffffffffffff811115611113576111136135fc565b60405190808252806020026020018201604052801561113c578160200160208202803683370190505b50905060005b82518110156111985782818151811061115d5761115d613c69565b602002602001015182828151811061117757611177613c69565b67ffffffffffffffff90921660209283029190910190910152600101611142565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261067690611fa5565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906112b1575060005473ffffffffffffffffffffffffffffffffffffffff163314155b156112ea576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024016109ae565b6112f5838383612057565b505050565b611302611a63565b60005b818110156112f557600083838381811061132157611321613c69565b90506020028101906113339190613c98565b61133c90613cd6565b90506113518160800151826020015115612141565b6113648160a00151826020015115612141565b8060200151156116605780516113869060059067ffffffffffffffff1661227a565b6113cb5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016109ae565b60408101515115806113e05750606081015151155b15611417576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c179091169615150295909517909855908101519401519381169316909102919091176003820155915190919060048201906115f89082613d8a565b506060820151600582019061160d9082613d8a565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c295506116539493929190613ea4565b60405180910390a1611777565b80516116789060059067ffffffffffffffff16612286565b6116bd5780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016109ae565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906117266004830182613184565b611734600583016000613184565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b50600101611305565b611788611a63565b61179181612292565b50565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146118295760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109ae565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa1580156118d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fb9190613baa565b15611932576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61193f8160200151612387565b600061194e826020015161067c565b9050805160001480611972575080805190602001208260a001518051906020012014155b156119af578160a001516040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016109ae91906132ba565b6119c1826020015183606001516124ad565b5050565b60095481516040808401516060850151602086015192517f8627fad600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90951694638627fad694611a2e9490939291600401613f3d565b600060405180830381600087803b158015611a4857600080fd5b505af1158015611a5c573d6000803e3d6000fd5b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ae4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109ae565b565b7f0000000000000000000000000000000000000000000000000000000000000000611b3d576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611bd3576000838281518110611b5d57611b5d613c69565b60200260200101519050611b7b8160026124f490919063ffffffff16565b15611bca5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611b40565b5060005b81518110156112f5576000828281518110611bf457611bf4613c69565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c385750611c94565b611c43600282612516565b15611c925760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611bd7565b60008181526001830160205260408120541515610ce5565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614611d495760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016109ae565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e1b9190613baa565b15611e52576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e5f8160400151612538565b611e6c81602001516125b7565b61179181602001518260600151612705565b6009546060820151611ecb9173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692911690612749565b60095460408083015183516060850151602086015193517f9687544500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90951694639687544594611f3394939291600401613f9e565b6000604051808303816000875af1158015611f52573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119c19190810190613ffe565b60606000610ce5836127d6565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915261203382606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642612017919061409b565b85608001516fffffffffffffffffffffffffffffffff16612831565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61206083610cec565b6120a2576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016109ae565b6120ad826000612141565b67ffffffffffffffff831660009081526007602052604090206120d0908361285b565b6120db816000612141565b67ffffffffffffffff83166000908152600760205260409020612101906002018261285b565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051612134939291906140ae565b60405180910390a1505050565b8151156122085781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612197575060408201516fffffffffffffffffffffffffffffffff16155b156121d057816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016109ae9190614131565b80156119c1576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580612241575060208201516fffffffffffffffffffffffffffffffff1615155b156119c157816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016109ae9190614131565b6000610ce583836129fd565b6000610ce58383612a4c565b3373ffffffffffffffffffffffffffffffffffffffff821603612311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109ae565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61239081610cec565b6123d2576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016109ae565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa158015612451573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124759190613baa565b611791576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016109ae565b67ffffffffffffffff821660009081526007602052604090206119c190600201827f0000000000000000000000000000000000000000000000000000000000000000612b3f565b6000610ce58373ffffffffffffffffffffffffffffffffffffffff8416612a4c565b6000610ce58373ffffffffffffffffffffffffffffffffffffffff84166129fd565b7f00000000000000000000000000000000000000000000000000000000000000001561179157612569600282612ec2565b611791576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016109ae565b6125c081610cec565b612602576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016109ae565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f919061416d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611791576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016109ae565b67ffffffffffffffff821660009081526007602052604090206119c190827f0000000000000000000000000000000000000000000000000000000000000000612b3f565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526112f5908490612ef1565b60608160000180548060200260200160405190810160405280929190818152602001828054801561072057602002820191906000526020600020905b8154815260200190600101908083116128125750505050509050919050565b600061285085612841848661418a565b61284b90876141a1565b612ffd565b90505b949350505050565b815460009061288490700100000000000000000000000000000000900463ffffffff164261409b565b9050801561292657600183015483546128cc916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612831565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b6020820151835461294c916fffffffffffffffffffffffffffffffff9081169116612ffd565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990612134908490614131565b6000818152600183016020526040812054612a4457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610676565b506000610676565b60008181526001830160205260408120548015612b35576000612a7060018361409b565b8554909150600090612a849060019061409b565b9050808214612ae9576000866000018281548110612aa457612aa4613c69565b9060005260206000200154905080876000018481548110612ac757612ac7613c69565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612afa57612afa6141b4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610676565b6000915050610676565b825474010000000000000000000000000000000000000000900460ff161580612b66575081155b15612b7057505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612bb690700100000000000000000000000000000000900463ffffffff164261409b565b90508015612c765781831115612bf8576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612c329083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612831565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612d2d5773ffffffffffffffffffffffffffffffffffffffff8416612cd5576040517ff94ebcd100000000000000000000000000000000000000000000000000000000815260048101839052602481018690526044016109ae565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff851660448201526064016109ae565b84831015612e405760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290612d71908261409b565b612d7b878a61409b565b612d8591906141a1565b612d8f91906141e3565b905073ffffffffffffffffffffffffffffffffffffffff8616612de8576040517f15279c0800000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016109ae565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff871660448201526064016109ae565b612e4a858461409b565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515610ce5565b6000612f53826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166130139092919063ffffffff16565b8051909150156112f55780806020019051810190612f719190613baa565b6112f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109ae565b600081831061300c5781610ce5565b5090919050565b60606128538484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051613047919061421e565b60006040518083038185875af1925050503d8060008114613084576040519150601f19603f3d011682016040523d82523d6000602084013e613089565b606091505b509150915061309a878383876130a5565b979650505050505050565b6060831561313b5782516000036131345773ffffffffffffffffffffffffffffffffffffffff85163b613134576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109ae565b5081612853565b61285383838151156131505781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ae91906132ba565b508054613190906137f8565b6000825580601f106131a0575050565b601f01602090049060005260206000209081019061179191905b808211156131ce57600081556001016131ba565b5090565b6000602082840312156131e457600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ce557600080fd5b803567ffffffffffffffff8116811461322c57600080fd5b919050565b60006020828403121561324357600080fd5b610ce582613214565b60005b8381101561326757818101518382015260200161324f565b50506000910152565b6000815180845261328881602086016020860161324c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610ce56020830184613270565b73ffffffffffffffffffffffffffffffffffffffff8116811461179157600080fd5b803561322c816132cd565b60006020828403121561330c57600080fd5b8135610ce5816132cd565b60006020828403121561332957600080fd5b813567ffffffffffffffff81111561334057600080fd5b82016101008185031215610ce557600080fd5b60008083601f84011261336557600080fd5b50813567ffffffffffffffff81111561337d57600080fd5b6020830191508360208260051b850101111561339857600080fd5b9250929050565b600080600080604085870312156133b557600080fd5b843567ffffffffffffffff808211156133cd57600080fd5b6133d988838901613353565b909650945060208701359150808211156133f257600080fd5b506133ff87828801613353565b95989497509550505050565b60008060006040848603121561342057600080fd5b61342984613214565b9250602084013567ffffffffffffffff8082111561344657600080fd5b818601915086601f83011261345a57600080fd5b81358181111561346957600080fd5b87602082850101111561347b57600080fd5b6020830194508093505050509250925092565b600080604083850312156134a157600080fd5b6134aa83613214565b915060208301356134ba816132cd565b809150509250929050565b6000602082840312156134d757600080fd5b813567ffffffffffffffff8111156134ee57600080fd5b820160a08185031215610ce557600080fd5b60208152600082516040602084015261351c6060840182613270565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526135578282613270565b95945050505050565b6020808252825182820181905260009190848201906040850190845b818110156135ae57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161357c565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156135ae57835167ffffffffffffffff16835292840192918401916001016135d6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff8111828210171561364f5761364f6135fc565b60405290565b60405160c0810167ffffffffffffffff8111828210171561364f5761364f6135fc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156136bf576136bf6135fc565b604052919050565b801515811461179157600080fd5b803561322c816136c7565b80356fffffffffffffffffffffffffffffffff8116811461322c57600080fd5b60006060828403121561371257600080fd5b6040516060810181811067ffffffffffffffff82111715613735576137356135fc565b6040529050808235613746816136c7565b8152613754602084016136e0565b6020820152613765604084016136e0565b60408201525092915050565b600080600060e0848603121561378657600080fd5b61378f84613214565b925061379e8560208601613700565b91506137ad8560808601613700565b90509250925092565b600080602083850312156137c957600080fd5b823567ffffffffffffffff8111156137e057600080fd5b6137ec85828601613353565b90969095509350505050565b600181811c9082168061380c57607f821691505b602082108103613845577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600067ffffffffffffffff821115613865576138656135fc565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126138a257600080fd5b81356138b56138b08261384b565b613678565b8181528460208386010111156138ca57600080fd5b816020850160208301376000918101602001919091529392505050565b600061010082360312156138fa57600080fd5b61390261362b565b823567ffffffffffffffff8082111561391a57600080fd5b61392636838701613891565b835261393460208601613214565b6020840152613945604086016132ef565b604084015260608501356060840152613960608086016132ef565b608084015260a085013591508082111561397957600080fd5b61398536838701613891565b60a084015260c085013591508082111561399e57600080fd5b6139aa36838701613891565b60c084015260e08501359150808211156139c357600080fd5b506139d036828601613891565b60e08301525092915050565b601f8211156112f5576000816000526020600020601f850160051c81016020861015613a055750805b601f850160051c820191505b81811015613a2457828155600101613a11565b505050505050565b67ffffffffffffffff831115613a4457613a446135fc565b613a5883613a5283546137f8565b836139dc565b6000601f841160018114613aaa5760008515613a745750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611a5c565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015613af95786850135825560209485019460019092019101613ad9565b5086821015613b34577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b604081526000613b596040830186613270565b82810360208401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050949350505050565b600060208284031215613bbc57600080fd5b8151610ce5816136c7565b600060a08236031215613bd957600080fd5b60405160a0810167ffffffffffffffff8282108183111715613bfd57613bfd6135fc565b816040528435915080821115613c1257600080fd5b50613c1f36828601613891565b825250613c2e60208401613214565b60208201526040830135613c41816132cd565b6040820152606083810135908201526080830135613c5e816132cd565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112613ccc57600080fd5b9190910192915050565b60006101408236031215613ce957600080fd5b613cf1613655565b613cfa83613214565b8152613d08602084016136d5565b6020820152604083013567ffffffffffffffff80821115613d2857600080fd5b613d3436838701613891565b60408401526060850135915080821115613d4d57600080fd5b50613d5a36828601613891565b606083015250613d6d3660808501613700565b6080820152613d7f3660e08501613700565b60a082015292915050565b815167ffffffffffffffff811115613da457613da46135fc565b613db881613db284546137f8565b846139dc565b602080601f831160018114613e0b5760008415613dd55750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613a24565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613e5857888601518255948401946001909101908401613e39565b5085821015613e9457878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152613ec881840187613270565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff9081166060870152908701511660808501529150613f069050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152613557565b60a081526000613f5060a0830187613270565b73ffffffffffffffffffffffffffffffffffffffff8616602084015284604084015267ffffffffffffffff841660608401528281036080840152600081526020810191505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8516815260a060208201526000613fcd60a0830186613270565b60408301949094525067ffffffffffffffff9190911660608201528082036080909101526000815260200192915050565b60006020828403121561401057600080fd5b815167ffffffffffffffff81111561402757600080fd5b8201601f8101841361403857600080fd5b80516140466138b08261384b565b81815285602083850101111561405b57600080fd5b61355782602083016020860161324c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156106765761067661406c565b67ffffffffffffffff8416815260e081016140fa60208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152612853565b6060810161067682848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b60006020828403121561417f57600080fd5b8151610ce5816132cd565b80820281158282048414176106765761067661406c565b808201808211156106765761067661406c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600082614219577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008251613ccc81846020870161324c56fea164736f6c6343000818000a" - -type BurnMintTokenPoolAndProxyContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnMintTokenPoolAndProxyContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnMintTokenPoolAndProxyContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnMintTokenPoolAndProxyABI)) - if err != nil { - return nil, err - } - return &BurnMintTokenPoolAndProxyContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnMintTokenPoolAndProxyContract) Address() common.Address { - return c.address -} - -func (c *BurnMintTokenPoolAndProxyContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *BurnMintTokenPoolAndProxyContract) GetRemotePool(opts *bind.CallOpts, args uint64) ([]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemotePool", args) - if err != nil { - var zero []byte - return zero, err - } - return *abi.ConvertType(out[0], new([]byte)).(*[]byte), nil -} - -func (c *BurnMintTokenPoolAndProxyContract) GetCurrentInboundRateLimiterState(opts *bind.CallOpts, args uint64) (TokenBucket, error) { - var out []any - err := c.contract.Call(opts, &out, "getCurrentInboundRateLimiterState", args) - if err != nil { - var zero TokenBucket - return zero, err - } - return *abi.ConvertType(out[0], new(TokenBucket)).(*TokenBucket), nil -} - -func (c *BurnMintTokenPoolAndProxyContract) GetCurrentOutboundRateLimiterState(opts *bind.CallOpts, args uint64) (TokenBucket, error) { - var out []any - err := c.contract.Call(opts, &out, "getCurrentOutboundRateLimiterState", args) - if err != nil { - var zero TokenBucket - return zero, err - } - return *abi.ConvertType(out[0], new(TokenBucket)).(*TokenBucket), nil -} - -func (c *BurnMintTokenPoolAndProxyContract) GetPreviousPool(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getPreviousPool") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -type TokenBucket struct { - Tokens *big.Int - LastUpdated uint32 - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - type ConstructorArgs struct { - Token common.Address - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-mint-token-pool-and-proxy:deploy", - Version: Version, - Description: "Deploys the BurnMintTokenPoolAndProxy contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnMintTokenPoolAndProxyABI, - Bin: BurnMintTokenPoolAndProxyBin, - }, + Name: "burn-mint-token-pool-and-proxy:deploy", + Version: Version, + Description: "Deploys the BurnMintTokenPoolAndProxy contract", + ContractMetadata: gobindings.BurnMintTokenPoolAndProxyMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnMintTokenPoolAndProxyBin), + EVM: common.FromHex(gobindings.BurnMintTokenPoolAndProxyMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetRemotePool = contract.NewRead(contract.ReadParams[uint64, []byte, *BurnMintTokenPoolAndProxyContract]{ - Name: "burn-mint-token-pool-and-proxy:get-remote-pool", - Version: Version, - Description: "Calls getRemotePool on the contract", - ContractType: ContractType, - NewContract: NewBurnMintTokenPoolAndProxyContract, - CallContract: func(c *BurnMintTokenPoolAndProxyContract, opts *bind.CallOpts, args uint64) ([]byte, error) { - return c.GetRemotePool(opts, args) - }, -}) +func NewReadGetRemotePool(c gobindings.BurnMintTokenPoolAndProxyInterface) *cld_ops.Operation[contract.FunctionInput[uint64], []byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, []byte, gobindings.BurnMintTokenPoolAndProxyInterface]{ + Name: "burn-mint-token-pool-and-proxy:get-remote-pool", + Version: Version, + Description: "Calls getRemotePool on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.BurnMintTokenPoolAndProxyInterface, opts *bind.CallOpts, args uint64) ([]byte, error) { + return c.GetRemotePool(opts, args) + }, + }) +} -var GetCurrentInboundRateLimiterState = contract.NewRead(contract.ReadParams[uint64, TokenBucket, *BurnMintTokenPoolAndProxyContract]{ - Name: "burn-mint-token-pool-and-proxy:get-current-inbound-rate-limiter-state", - Version: Version, - Description: "Calls getCurrentInboundRateLimiterState on the contract", - ContractType: ContractType, - NewContract: NewBurnMintTokenPoolAndProxyContract, - CallContract: func(c *BurnMintTokenPoolAndProxyContract, opts *bind.CallOpts, args uint64) (TokenBucket, error) { - return c.GetCurrentInboundRateLimiterState(opts, args) - }, -}) +func NewReadGetCurrentInboundRateLimiterState(c gobindings.BurnMintTokenPoolAndProxyInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.RateLimiterTokenBucket, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.RateLimiterTokenBucket, gobindings.BurnMintTokenPoolAndProxyInterface]{ + Name: "burn-mint-token-pool-and-proxy:get-current-inbound-rate-limiter-state", + Version: Version, + Description: "Calls getCurrentInboundRateLimiterState on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.BurnMintTokenPoolAndProxyInterface, opts *bind.CallOpts, args uint64) (gobindings.RateLimiterTokenBucket, error) { + return c.GetCurrentInboundRateLimiterState(opts, args) + }, + }) +} -var GetCurrentOutboundRateLimiterState = contract.NewRead(contract.ReadParams[uint64, TokenBucket, *BurnMintTokenPoolAndProxyContract]{ - Name: "burn-mint-token-pool-and-proxy:get-current-outbound-rate-limiter-state", - Version: Version, - Description: "Calls getCurrentOutboundRateLimiterState on the contract", - ContractType: ContractType, - NewContract: NewBurnMintTokenPoolAndProxyContract, - CallContract: func(c *BurnMintTokenPoolAndProxyContract, opts *bind.CallOpts, args uint64) (TokenBucket, error) { - return c.GetCurrentOutboundRateLimiterState(opts, args) - }, -}) +func NewReadGetCurrentOutboundRateLimiterState(c gobindings.BurnMintTokenPoolAndProxyInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.RateLimiterTokenBucket, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.RateLimiterTokenBucket, gobindings.BurnMintTokenPoolAndProxyInterface]{ + Name: "burn-mint-token-pool-and-proxy:get-current-outbound-rate-limiter-state", + Version: Version, + Description: "Calls getCurrentOutboundRateLimiterState on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.BurnMintTokenPoolAndProxyInterface, opts *bind.CallOpts, args uint64) (gobindings.RateLimiterTokenBucket, error) { + return c.GetCurrentOutboundRateLimiterState(opts, args) + }, + }) +} -var GetPreviousPool = contract.NewRead(contract.ReadParams[struct{}, common.Address, *BurnMintTokenPoolAndProxyContract]{ - Name: "burn-mint-token-pool-and-proxy:get-previous-pool", - Version: Version, - Description: "Calls getPreviousPool on the contract", - ContractType: ContractType, - NewContract: NewBurnMintTokenPoolAndProxyContract, - CallContract: func(c *BurnMintTokenPoolAndProxyContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetPreviousPool(opts) - }, -}) +func NewReadGetPreviousPool(c gobindings.BurnMintTokenPoolAndProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.BurnMintTokenPoolAndProxyInterface]{ + Name: "burn-mint-token-pool-and-proxy:get-previous-pool", + Version: Version, + Description: "Calls getPreviousPool on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.BurnMintTokenPoolAndProxyInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetPreviousPool(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_0/adapters/fee_aggregator.go b/chains/evm/deployment/v1_6_0/adapters/fee_aggregator.go index 689f803d5f..9ee6c9ec2b 100644 --- a/chains/evm/deployment/v1_6_0/adapters/fee_aggregator.go +++ b/chains/evm/deployment/v1_6_0/adapters/fee_aggregator.go @@ -4,16 +4,17 @@ import ( "fmt" "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" evmseq "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/fees" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -49,6 +50,18 @@ func (a *FeeAggregatorAdapter) getOnRampRef(e cldf.Environment, chainSelector ui return ref, nil } +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) contract.WriteOutput { + var ei *contract.ExecInfo + if w.ExecInfo != nil { + ei = &contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + func (a *FeeAggregatorAdapter) GetFeeAggregator(e cldf.Environment, chainSelector uint64) (string, error) { chain, ok := e.BlockChains.EVMChains()[chainSelector] if !ok { @@ -61,17 +74,22 @@ func (a *FeeAggregatorAdapter) GetFeeAggregator(e cldf.Environment, chainSelecto } onRampAddr := common.HexToAddress(onRampRef.Address) - onRamp, err := onrampops.NewOnRampContract(onRampAddr, chain.Client) + onRamp, err := orbind.NewOnRamp(onRampAddr, chain.Client) if err != nil { return "", fmt.Errorf("failed to instantiate OnRamp at %s on chain %d: %w", onRampAddr.Hex(), chainSelector, err) } - dynamicCfg, err := onRamp.GetDynamicConfig(&bind.CallOpts{Context: e.GetContext()}) + report, err := operations.ExecuteOperation( + e.OperationsBundle, + onrampops.NewReadGetDynamicConfig(onRamp), + chain, + ops2contract.FunctionInput[struct{}]{}, + ) if err != nil { return "", fmt.Errorf("failed to get OnRamp dynamic config on chain %d: %w", chainSelector, err) } - return dynamicCfg.FeeAggregator.Hex(), nil + return report.Output.FeeAggregator.Hex(), nil } func (a *FeeAggregatorAdapter) resolveOnRampRef(e cldf.Environment, input fees.FeeAggregatorForChain) (datastore.AddressRef, error) { @@ -112,12 +130,14 @@ func (a *FeeAggregatorAdapter) SetFeeAggregator(e cldf.Environment) *operations. } onRampAddr := common.HexToAddress(onRampRef.Address) + onRamp, err := orbind.NewOnRamp(onRampAddr, evmChain.Client) + if err != nil { + return result, fmt.Errorf("failed to instantiate OnRamp at %s on chain %d: %w", onRampAddr.Hex(), input.ChainSelector, err) + } + readReport, err := operations.ExecuteOperation( - b, onrampops.GetDynamicConfig, evmChain, - contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, - Address: onRampAddr, - }, + b, onrampops.NewReadGetDynamicConfig(onRamp), evmChain, + ops2contract.FunctionInput[struct{}]{}, ) if err != nil { return result, fmt.Errorf("failed to read OnRamp dynamic config on chain %d: %w", input.ChainSelector, err) @@ -127,18 +147,16 @@ func (a *FeeAggregatorAdapter) SetFeeAggregator(e cldf.Environment) *operations. currentCfg.FeeAggregator = newFeeAggregator writeReport, err := operations.ExecuteOperation( - b, onrampops.SetDynamicConfig, evmChain, - contract.FunctionInput[onrampops.DynamicConfig]{ - ChainSelector: evmChain.Selector, - Address: onRampAddr, - Args: currentCfg, + b, onrampops.NewWriteSetDynamicConfig(onRamp), evmChain, + ops2contract.FunctionInput[orbind.OnRampDynamicConfig]{ + Args: currentCfg, }, ) if err != nil { return result, fmt.Errorf("failed to set OnRamp dynamic config on chain %d: %w", input.ChainSelector, err) } - batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{writeReport.Output}) + batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{writeOutputOps2ToLegacy(writeReport.Output)}) if err != nil { return result, fmt.Errorf("failed to create batch operation from writes for chain %d: %w", input.ChainSelector, err) } diff --git a/chains/evm/deployment/v1_6_0/adapters/fees.go b/chains/evm/deployment/v1_6_0/adapters/fees.go index 95861f73fa..c5f8f092ad 100644 --- a/chains/evm/deployment/v1_6_0/adapters/fees.go +++ b/chains/evm/deployment/v1_6_0/adapters/fees.go @@ -7,17 +7,19 @@ import ( "github.com/ethereum/go-ethereum/common" datastore_utils_evm "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" adaptersV1_0_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/adapters" + fqops0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" evmseqV1_6_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" - fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/fee_quoter" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/fees" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" "github.com/smartcontractkit/chainlink-ccip/deployment/utils" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" - "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -66,15 +68,16 @@ func (a *FeesAdapter) GetFeeContractRef(e cldf.Environment, onRampRef datastore. return datastore.AddressRef{}, fmt.Errorf("chain with selector %d not defined", src) } + onRamp, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return datastore.AddressRef{}, fmt.Errorf("failed to instantiate OnRamp at %s on chain selector %d: %w", onRampAddr.Hex(), src, err) + } + report, err := operations.ExecuteOperation( e.OperationsBundle, - onramp.GetDynamicConfig, + onramp.NewReadGetDynamicConfig(onRamp), chain, - contract.FunctionInput[struct{}]{ - ChainSelector: src, - Address: onRampAddr, - Args: struct{}{}, - }, + ops2contract.FunctionInput[struct{}]{}, ) if err != nil { return datastore.AddressRef{}, fmt.Errorf("failed to execute GetDynamicConfig operation for OnRamp at %s on chain selector %d with dst %d: %w", onRampAddr.Hex(), src, dst, err) @@ -86,7 +89,7 @@ func (a *FeesAdapter) GetFeeContractRef(e cldf.Environment, onRampRef datastore. datastore.AddressRef{ ChainSelector: src, Address: report.Output.FeeQuoter.Hex(), - Type: datastore.ContractType(fqops.ContractType), + Type: datastore.ContractType(fee_quoter.ContractType), }, src, datastore_utils.FullRef, @@ -116,7 +119,7 @@ func (a *FeesAdapter) GetOnchainTokenTransferFeeConfig(e cldf.Environment, feeRe if err != nil { return fees.TokenTransferFeeArgs{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address for src %d and dst %d: %w", src, dst, err) } - fq, err := fee_quoter.NewFeeQuoterContract(fqAddr, chain.Client) + fq, err := fqbind.NewFeeQuoter(fqAddr, chain.Client) if err != nil { return fees.TokenTransferFeeArgs{}, fmt.Errorf("failed to instantiate FeeQuoter contract at address %s on chain selector %d: %w", fqAddr.Hex(), src, err) } @@ -124,8 +127,6 @@ func (a *FeesAdapter) GetOnchainTokenTransferFeeConfig(e cldf.Environment, feeRe return fees.TokenTransferFeeArgs{}, fmt.Errorf("invalid token address: %s", token) } - // This gets the token transfer fee config for the given token from the FeeQuoter contract - // https://etherscan.io/address/0x40858070814a57FdF33a613ae84fE0a8b4a874f7#code#F1#L819 cfg, err := fq.GetTokenTransferFeeConfig(&bind.CallOpts{Context: e.GetContext()}, dst, common.HexToAddress(token)) if err != nil { return fees.TokenTransferFeeArgs{}, fmt.Errorf("failed to get token transfer fee config from FeeQuoter at %s for src %d, dst %d, token %s: %w", fqAddr.Hex(), src, dst, token, err) @@ -160,7 +161,7 @@ func (a *FeesAdapter) SetTokenTransferFee(e cldf.Environment, feeRef datastore.A return sequences.OnChainOutput{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address: %w", err) } - args := map[uint64]fqops.ApplyTokenTransferFeeConfigUpdatesArgs{} + args := map[uint64]fqops0.ApplyTokenTransferFeeConfigUpdatesArgs{} for dst, dstCfg := range input.Settings { val := args[src] for rawTokenAddress, feeCfg := range dstCfg { @@ -174,7 +175,7 @@ func (a *FeesAdapter) SetTokenTransferFee(e cldf.Environment, feeRef datastore.A if feeCfg == nil { val.TokensToUseDefaultFeeConfigs = append( val.TokensToUseDefaultFeeConfigs, - fqops.TokenTransferFeeConfigRemoveArgs{ + fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{ DestChainSelector: dst, Token: token, }, @@ -182,12 +183,12 @@ func (a *FeesAdapter) SetTokenTransferFee(e cldf.Environment, feeRef datastore.A } else { val.TokenTransferFeeConfigArgs = append( val.TokenTransferFeeConfigArgs, - fqops.TokenTransferFeeConfigArgs{ + fqbind.FeeQuoterTokenTransferFeeConfigArgs{ DestChainSelector: dst, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: token, - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fqbind.FeeQuoterTokenTransferFeeConfig{ DestBytesOverhead: feeCfg.DestBytesOverhead, DestGasOverhead: feeCfg.DestGasOverhead, MinFeeUSDCents: feeCfg.MinFeeUSDCents, @@ -246,7 +247,7 @@ func (a *FeesAdapter) GetOnchainDestChainConfig(e cldf.Environment, feeRef datas if err != nil { return lanes.FeeQuoterDestChainConfig{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address for src %d and dst %d: %w", src, dst, err) } - fq, err := fee_quoter.NewFeeQuoterContract(fqAddr, chain.Client) + fq, err := fqbind.NewFeeQuoter(fqAddr, chain.Client) if err != nil { return lanes.FeeQuoterDestChainConfig{}, fmt.Errorf("failed to instantiate FeeQuoter contract at address %s on chain selector %d: %w", fqAddr.Hex(), src, err) } @@ -256,7 +257,7 @@ func (a *FeesAdapter) GetOnchainDestChainConfig(e cldf.Environment, feeRef datas return lanes.FeeQuoterDestChainConfig{}, fmt.Errorf("failed to get dest chain config from FeeQuoter at %s for src %d, dst %d: %w", fqAddr.Hex(), src, dst, err) } - return evmseqV1_6_0.ReverseTranslateFQ(fqops.DestChainConfig{ + return evmseqV1_6_0.ReverseTranslateFQ(fqbind.FeeQuoterDestChainConfig{ IsEnabled: onchain.IsEnabled, MaxNumberOfTokensPerMsg: onchain.MaxNumberOfTokensPerMsg, MaxDataBytes: onchain.MaxDataBytes, @@ -297,9 +298,9 @@ func (a *FeesAdapter) ApplyDestChainConfigUpdates(e cldf.Environment, feeRef dat return sequences.OnChainOutput{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address: %w", err) } - args := map[uint64][]fqops.DestChainConfigArgs{} + args := map[uint64][]fqbind.FeeQuoterDestChainConfigArgs{} for dst, cfg := range input.Settings { - args[src] = append(args[src], fqops.DestChainConfigArgs{ + args[src] = append(args[src], fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: dst, DestChainConfig: evmseqV1_6_0.TranslateFQ(cfg), }) diff --git a/chains/evm/deployment/v1_6_0/adapters/lanemigrator.go b/chains/evm/deployment/v1_6_0/adapters/lanemigrator.go index a7987a7429..77ebfb3cc4 100644 --- a/chains/evm/deployment/v1_6_0/adapters/lanemigrator.go +++ b/chains/evm/deployment/v1_6_0/adapters/lanemigrator.go @@ -19,6 +19,9 @@ import ( offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) @@ -81,19 +84,25 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU return sequences.OnChainOutput{}, fmt.Errorf("error finding offRamp address ref: %w", err) } + onRamp, err := orbind.NewOnRamp(onRampAddr, c.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OnRamp at %s: %w", onRampAddr.Hex(), err) + } + offRamp, err := offbind.NewOffRamp(offRampAddr, c.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OffRamp at %s: %w", offRampAddr.Hex(), err) + } + routerRef := input.RouterAddr routerAddr, err := evm_datastore_utils.ToEVMAddress(routerRef) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error formatting router address ref: %w", err) } - var onRampArgs []onrampops.DestChainConfigArgs - var offRampArgs []offrampops.SourceChainConfigArgs + var onRampArgs []orbind.OnRampDestChainConfigArgs + var offRampArgs []offbind.OffRampSourceChainConfigArgs for _, remoteChainSelector := range input.RemoteChainSelectors { - // get existing destChainConfig for the onRamp - existingDestChainCfgOut, err := cldf_ops.ExecuteOperation(b, onrampops.GetDestChainConfig, c, contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: remoteChainSelector, + existingDestChainCfgOut, err := cldf_ops.ExecuteOperation(b, onrampops.NewReadGetDestChainConfig(onRamp), c, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error fetching existing destChainConfig for onRamp: %w", err) @@ -103,14 +112,9 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU return sequences.OnChainOutput{}, fmt.Errorf("no destchain config is set for remote chain %d on chain %d on onRamp."+ " configure lanes with test router first before migrating", remoteChainSelector, input.ChainSelector) } - // update router on onRamp for the remote chain - existingDestChainCfg.Router = routerAddr - // get the sourceChainConfig for the offRamp - srcChainCfgOut, err := cldf_ops.ExecuteOperation(b, offrampops.GetSourceChainConfig, c, contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: offRampAddr, - Args: remoteChainSelector, + srcChainCfgOut, err := cldf_ops.ExecuteOperation(b, offrampops.NewReadGetSourceChainConfig(offRamp), c, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error fetching existing sourceChainConfig for offRamp: %w", err) @@ -120,15 +124,14 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU return sequences.OnChainOutput{}, fmt.Errorf("no source chain config is set for remote chain %d on chain %d on offRamp."+ " configure lanes with test router first before migrating", remoteChainSelector, input.ChainSelector) } - // update router on offRamp for the remote chain - existingSrcChainCfg.Router = routerAddr - onRampArgs = append(onRampArgs, onrampops.DestChainConfigArgs{ + + onRampArgs = append(onRampArgs, orbind.OnRampDestChainConfigArgs{ DestChainSelector: remoteChainSelector, Router: routerAddr, AllowlistEnabled: existingDestChainCfg.AllowlistEnabled, }) - offRampArgs = append(offRampArgs, offrampops.SourceChainConfigArgs{ + offRampArgs = append(offRampArgs, offbind.OffRampSourceChainConfigArgs{ SourceChainSelector: remoteChainSelector, Router: routerAddr, IsEnabled: existingSrcChainCfg.IsEnabled, @@ -136,28 +139,23 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU OnRamp: existingSrcChainCfg.OnRamp, }) } - // set the destChainConfig with the updated router - writeOutputOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.ApplyDestChainConfigUpdates, c, contract.FunctionInput[[]onrampops.DestChainConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: onRampArgs, + writeOutputOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.NewWriteApplyDestChainConfigUpdates(onRamp), c, ops2contract.FunctionInput[[]orbind.OnRampDestChainConfigArgs]{ + Args: onRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error applying destChainConfig update to onRamp: %w", err) } - writes = append(writes, writeOutputOnRamp.Output) - // now set the sourceChainConfig with the updated router + writes = append(writes, writeOutputOps2ToLegacy(writeOutputOnRamp.Output)) + writeOutputOffRamp, err := cldf_ops.ExecuteOperation( - b, offrampops.ApplySourceChainConfigUpdates, c, - contract.FunctionInput[[]offrampops.SourceChainConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: offRampAddr, - Args: offRampArgs, + b, offrampops.NewWriteApplySourceChainConfigUpdates(offRamp), c, + ops2contract.FunctionInput[[]offbind.OffRampSourceChainConfigArgs]{ + Args: offRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error applying sourceChainConfig update to offRamp: %w", err) } - writes = append(writes, writeOutputOffRamp.Output) + writes = append(writes, writeOutputOps2ToLegacy(writeOutputOffRamp.Output)) batchOp, err := contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) diff --git a/chains/evm/deployment/v1_6_0/adapters/rampupdatewithfq.go b/chains/evm/deployment/v1_6_0/adapters/rampupdatewithfq.go index c3392c5f1d..d48f553ce3 100644 --- a/chains/evm/deployment/v1_6_0/adapters/rampupdatewithfq.go +++ b/chains/evm/deployment/v1_6_0/adapters/rampupdatewithfq.go @@ -14,6 +14,9 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -22,7 +25,6 @@ import ( type RampUpdateWithFQ struct{} func (ru RampUpdateWithFQ) ResolveRampsInput(e cldf.Environment, input deploy.UpdateRampsInput) (deploy.UpdateRampsInput, error) { - // fetch address of Ramps onRampAddr := datastore_utils.GetAddressRef( e.DataStore.Addresses().Filter( datastore.AddressRefByChainSelector(input.ChainSelector), @@ -69,47 +71,49 @@ func (ru RampUpdateWithFQ) SequenceUpdateRampsWithFeeQuoter() *cldf_ops.Sequence if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not found in environment", input.ChainSelector) } - onDCfgReport, err := cldf_ops.ExecuteOperation(b, onrampops.GetDynamicConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.OnRampAddressRef.Address), - }) + + onRampAddr := common.HexToAddress(input.OnRampAddressRef.Address) + onRamp, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OnRamp at %s: %w", onRampAddr.Hex(), err) + } + + onDCfgReport, err := cldf_ops.ExecuteOperation(b, onrampops.NewReadGetDynamicConfig(onRamp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, err } existingDynamicConfig := onDCfgReport.Output if existingDynamicConfig.FeeQuoter != common.HexToAddress(input.FeeQuoterAddress.Address) { - // Update OnRamp's FeeQuoter address existingDynamicConfig.FeeQuoter = common.HexToAddress(input.FeeQuoterAddress.Address) - onRampReport, err := cldf_ops.ExecuteOperation(b, onrampops.SetDynamicConfig, chain, contract.FunctionInput[onrampops.DynamicConfig]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.OnRampAddressRef.Address), - Args: existingDynamicConfig, + onRampReport, err := cldf_ops.ExecuteOperation(b, onrampops.NewWriteSetDynamicConfig(onRamp), chain, ops2contract.FunctionInput[orbind.OnRampDynamicConfig]{ + Args: existingDynamicConfig, }) if err != nil { return sequences.OnChainOutput{}, err } - writes = append(writes, onRampReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(onRampReport.Output)) } - // Similarly, update OffRamp's FeeQuoter address - offDCfgReport, err := cldf_ops.ExecuteOperation(b, offrampops.GetDynamicConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.OffRampAddressRef.Address), - }) + + offRampAddr := common.HexToAddress(input.OffRampAddressRef.Address) + offRamp, err := offbind.NewOffRamp(offRampAddr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OffRamp at %s: %w", offRampAddr.Hex(), err) + } + + offDCfgReport, err := cldf_ops.ExecuteOperation(b, offrampops.NewReadGetDynamicConfig(offRamp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, err } existingOffDynamicConfig := offDCfgReport.Output if existingOffDynamicConfig.FeeQuoter != common.HexToAddress(input.FeeQuoterAddress.Address) { existingOffDynamicConfig.FeeQuoter = common.HexToAddress(input.FeeQuoterAddress.Address) - offRampReport, err := cldf_ops.ExecuteOperation(b, offrampops.SetDynamicConfig, chain, contract.FunctionInput[offrampops.DynamicConfig]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.OffRampAddressRef.Address), - Args: existingOffDynamicConfig, + offRampReport, err := cldf_ops.ExecuteOperation(b, offrampops.NewWriteSetDynamicConfig(offRamp), chain, ops2contract.FunctionInput[offbind.OffRampDynamicConfig]{ + Args: existingOffDynamicConfig, }) if err != nil { return sequences.OnChainOutput{}, err } - writes = append(writes, offRampReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(offRampReport.Output)) } batch, err := contract.NewBatchOperationFromWrites(writes) if err != nil { diff --git a/chains/evm/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go b/chains/evm/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go index 5e574afbae..fb7bdd20d1 100644 --- a/chains/evm/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go +++ b/chains/evm/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go @@ -3,408 +3,216 @@ package fee_quoter import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/fee_quoter" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "FeeQuoter" var Version = semver.MustParse("1.6.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const FeeQuoterABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"},{"name":"tokenPriceStalenessThreshold","type":"uint32","internalType":"uint32"}]},{"name":"priceUpdaters","type":"address[]","internalType":"address[]"},{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"tokenPriceFeeds","type":"tuple[]","internalType":"struct FeeQuoter.TokenPriceFeedUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"feedConfig","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"premiumMultiplierWeiPerEthArgs","type":"tuple[]","internalType":"struct FeeQuoter.FeeTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}]},{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}]}],"stateMutability":"nonpayable"},{"type":"function","name":"FEE_BASE_DECIMALS","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"KEYSTONE_PRICE_DECIMALS","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainConfigUpdates","inputs":[{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyFeeTokensUpdates","inputs":[{"name":"feeTokensToRemove","type":"address[]","internalType":"address[]"},{"name":"feeTokensToAdd","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyPremiumMultiplierWeiPerEthUpdates","inputs":[{"name":"premiumMultiplierWeiPerEthArgs","type":"tuple[]","internalType":"struct FeeQuoter.FeeTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"tokensToUseDefaultFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigRemoveArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"convertTokenAmount","inputs":[{"name":"fromToken","type":"address","internalType":"address"},{"name":"fromTokenAmount","type":"uint256","internalType":"uint256"},{"name":"toToken","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getDestinationChainGasPrice","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getFeeTokens","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getPremiumMultiplierWeiPerEth","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"},{"name":"tokenPriceStalenessThreshold","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenAndGasPrices","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"tokenPrice","type":"uint224","internalType":"uint224"},{"name":"gasPriceValue","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"getTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenPriceFeedConfig","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenPrices","inputs":[{"name":"tokens","type":"address[]","internalType":"address[]"}],"outputs":[{"name":"","type":"tuple[]","internalType":"struct Internal.TimestampedPackedUint224[]","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getValidatedFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getValidatedTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"onReport","inputs":[{"name":"metadata","type":"bytes","internalType":"bytes"},{"name":"report","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"processMessageArgs","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"feeToken","type":"address","internalType":"address"},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"extraArgs","type":"bytes","internalType":"bytes"},{"name":"messageReceiver","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"isOutOfOrderExecution","type":"bool","internalType":"bool"},{"name":"convertedExtraArgs","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"processPoolReturnData","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampTokenTransfers","type":"tuple[]","internalType":"struct Internal.EVM2AnyTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"address","internalType":"address"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"destExecData","type":"bytes","internalType":"bytes"}]},{"name":"sourceTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"outputs":[{"name":"destExecDataPerToken","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"setReportPermissions","inputs":[{"name":"permissions","type":"tuple[]","internalType":"struct KeystoneFeedsPermissionHandler.Permission[]","components":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"isAllowed","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updatePrices","inputs":[{"name":"priceUpdates","type":"tuple","internalType":"struct Internal.PriceUpdates","components":[{"name":"tokenPriceUpdates","type":"tuple[]","internalType":"struct Internal.TokenPriceUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"usdPerToken","type":"uint224","internalType":"uint224"}]},{"name":"gasPriceUpdates","type":"tuple[]","internalType":"struct Internal.GasPriceUpdate[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"usdPerUnitGas","type":"uint224","internalType":"uint224"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateTokenPriceFeeds","inputs":[{"name":"tokenPriceFeedUpdates","type":"tuple[]","internalType":"struct FeeQuoter.TokenPriceFeedUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"feedConfig","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DestChainAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"anonymous":false},{"type":"event","name":"DestChainConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"anonymous":false},{"type":"event","name":"FeeTokenAdded","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FeeTokenRemoved","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PremiumMultiplierWeiPerEthUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"PriceFeedPerTokenUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"priceFeedConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"ReportPermissionSet","inputs":[{"name":"reportId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"permission","type":"tuple","indexed":false,"internalType":"struct KeystoneFeedsPermissionHandler.Permission","components":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"isAllowed","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"UsdPerTokenUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"UsdPerUnitGasUpdated","inputs":[{"name":"destChain","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"DataFeedValueOutOfUint224Range","inputs":[]},{"type":"error","name":"DestinationChainNotEnabled","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ExtraArgOutOfOrderExecutionMustBeTrue","inputs":[]},{"type":"error","name":"FeeTokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidChainFamilySelector","inputs":[{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidDestBytesOverhead","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidEVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidExtraArgsData","inputs":[]},{"type":"error","name":"InvalidExtraArgsTag","inputs":[]},{"type":"error","name":"InvalidFeeRange","inputs":[{"name":"minFeeUSDCents","type":"uint256","internalType":"uint256"},{"name":"maxFeeUSDCents","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidSVMExtraArgsWritableBitmap","inputs":[{"name":"accountIsWritableBitmap","type":"uint64","internalType":"uint64"},{"name":"numAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidStaticConfig","inputs":[]},{"type":"error","name":"InvalidTokenReceiver","inputs":[]},{"type":"error","name":"MessageComputeUnitLimitTooHigh","inputs":[]},{"type":"error","name":"MessageFeeTooHigh","inputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"maxFeeJuelsPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MessageGasLimitTooHigh","inputs":[]},{"type":"error","name":"MessageTooLarge","inputs":[{"name":"maxSize","type":"uint256","internalType":"uint256"},{"name":"actualSize","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReportForwarderUnauthorized","inputs":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"}]},{"type":"error","name":"SourceTokenDataTooLarge","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"StaleGasPrice","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"threshold","type":"uint256","internalType":"uint256"},{"name":"timePassed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"TokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TooManySVMExtraArgsAccounts","inputs":[{"name":"numAccounts","type":"uint256","internalType":"uint256"},{"name":"maxAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnsupportedNumberOfTokens","inputs":[{"name":"numberOfTokens","type":"uint256","internalType":"uint256"},{"name":"maxNumberOfTokensPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const FeeQuoterBin = "0x60e06040523461109a576173ec8038038061001981611306565b928339810190808203610120811261109a5760601361109a5761003a6112c8565b81516001600160601b038116810361109a57815261005a6020830161132b565b906020810191825261006e6040840161133f565b6040820190815260608401516001600160401b03811161109a5785610094918601611367565b60808501519094906001600160401b03811161109a57866100b6918301611367565b60a08201519096906001600160401b03811161109a5782019080601f8301121561109a5781516100ed6100e882611350565b611306565b9260208085848152019260071b8201019083821161109a57602001915b8183106112535750505060c08301516001600160401b03811161109a5783019781601f8a01121561109a578851986101446100e88b611350565b996020808c838152019160051b8301019184831161109a5760208101915b8383106110f1575050505060e08401516001600160401b03811161109a5784019382601f8601121561109a57845161019c6100e882611350565b9560208088848152019260061b8201019085821161109a57602001915b8183106110b557505050610100810151906001600160401b03821161109a570182601f8201121561109a578051906101f36100e883611350565b93602061028081878681520194028301019181831161109a57602001925b828410610ed857505050503315610ec757600180546001600160a01b031916331790556020986102408a611306565b976000895260003681376102526112e7565b998a52888b8b015260005b89518110156102c4576001906001600160a01b0361027b828d611400565b51168d610287826115ec565b610294575b50500161025d565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a1388d61028c565b508a985089519660005b885181101561033f576001600160a01b036102e9828b611400565b511690811561032e577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef8c83610320600195611574565b50604051908152a1016102ce565b6342bcdf7f60e11b60005260046000fd5b5081518a985089906001600160a01b0316158015610eb5575b8015610ea6575b610e955791516001600160a01b031660a05290516001600160601b03166080525163ffffffff1660c05261039286611306565b9360008552600036813760005b855181101561040e576001906103c76001600160a01b036103c0838a611400565b5116611481565b6103d2575b0161039f565b818060a01b036103e28289611400565b51167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f91600080a26103cc565b508694508560005b84518110156104855760019061043e6001600160a01b036104378389611400565b51166115b3565b610449575b01610416565b818060a01b036104598288611400565b51167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23600080a2610443565b508593508460005b835181101561054757806104a360019286611400565b517fe6a7a17d710bf0b2cd05e5397dc6f97a5da4ee79e31e234bf5f965ee2bd9a5bf606089858060a01b038451169301518360005260078b5260406000209060ff878060a01b038251169283898060a01b03198254161781558d8301908151604082549501948460a81b8651151560a81b16918560a01b9060a01b169061ffff60a01b19161717905560405193845251168c8301525115156040820152a20161048d565b5091509160005b8251811015610b2d576105618184611400565b51856001600160401b036105758487611400565b5151169101519080158015610b1a575b8015610afc575b8015610a92575b610a7e57600081815260098852604090205460019392919060081b6001600160e01b03191661093657807f71e9302ab4e912a9678ae7f5a8542856706806f2817e1bf2a20b171e265cb4ad604051806106fc868291909161024063ffffffff8161026084019580511515855261ffff602082015116602086015282604082015116604086015282606082015116606086015282608082015116608086015260ff60a08201511660a086015260ff60c08201511660c086015261ffff60e08201511660e0860152826101008201511661010086015261ffff6101208201511661012086015261ffff610140820151166101408601528260e01b61016082015116610160860152610180810151151561018086015261ffff6101a0820151166101a0860152826101c0820151166101c0860152826101e0820151166101e086015260018060401b03610200820151166102008601528261022082015116610220860152015116910152565b0390a25b60005260098752826040600020825115158382549162ffff008c83015160081b169066ffffffff000000604084015160181b166affffffff00000000000000606085015160381b16926effffffff0000000000000000000000608086015160581b169260ff60781b60a087015160781b169460ff60801b60c088015160801b169161ffff60881b60e089015160881b169063ffffffff60981b6101008a015160981b169361ffff60b81b6101208b015160b81b169661ffff60c81b6101408c015160c81b169963ffffffff60d81b6101608d015160081c169b61018060ff60f81b910151151560f81b169c8f8060f81b039a63ffffffff60d81b199961ffff60c81b199861ffff60b81b199763ffffffff60981b199661ffff60881b199560ff60801b199460ff60781b19936effffffff0000000000000000000000199260ff6affffffff000000000000001992169066ffffffffffffff19161716171617161716171617161716171617161716179063ffffffff60d81b1617178155019061ffff6101a0820151169082549165ffffffff00006101c083015160101b169269ffffffff0000000000006101e084015160301b166a01000000000000000000008860901b0361020085015160501b169263ffffffff60901b61022086015160901b169461024063ffffffff60b01b91015160b01b169563ffffffff60b01b199363ffffffff60901b19926a01000000000000000000008c60901b0319918c8060501b03191617161716171617171790550161054e565b807f2431cc0363f2f66b21782c7e3d54dd9085927981a21bd0cc6be45a51b19689e360405180610a76868291909161024063ffffffff8161026084019580511515855261ffff602082015116602086015282604082015116604086015282606082015116606086015282608082015116608086015260ff60a08201511660a086015260ff60c08201511660c086015261ffff60e08201511660e0860152826101008201511661010086015261ffff6101208201511661012086015261ffff610140820151166101408601528260e01b61016082015116610160860152610180810151151561018086015261ffff6101a0820151166101a0860152826101c0820151166101c0860152826101e0820151166101e086015260018060401b03610200820151166102008601528261022082015116610220860152015116910152565b0390a2610700565b63c35aa79d60e01b60005260045260246000fd5b5063ffffffff60e01b61016083015116630a04b54b60e21b8114159081610aea575b81610ad8575b81610ac6575b50610593565b63c4e0595360e01b1415905088610ac0565b632b1dfffb60e21b8114159150610aba565b6307842f7160e21b8114159150610ab4565b5063ffffffff6101e08301511663ffffffff6060840151161061058c565b5063ffffffff6101e08301511615610585565b84828560005b8151811015610bb3576001906001600160a01b03610b518285611400565b5151167fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d86848060401b0381610b878689611400565b510151168360005260088252604060002081878060401b0319825416179055604051908152a201610b33565b83600184610bc083611306565b9060008252600092610e90575b909282935b8251851015610dcf57610be58584611400565b5180516001600160401b0316939083019190855b83518051821015610dbe57610c0f828792611400565b51015184516001600160a01b0390610c28908490611400565b5151169063ffffffff815116908781019163ffffffff8351169081811015610da95750506080810163ffffffff815116898110610d92575090899291838c52600a8a5260408c20600160a01b6001900386168d528a5260408c2092825163ffffffff169380549180518d1b67ffffffff0000000016916040860192835160401b69ffff000000000000000016966060810195865160501b6dffffffff00000000000000000000169063ffffffff60701b895160701b169260a001998b60ff60901b8c51151560901b169560ff60901b199363ffffffff60701b19926dffffffff000000000000000000001991600160501b60019003191617161716171617171790556040519586525163ffffffff168c8601525161ffff1660408501525163ffffffff1660608401525163ffffffff16608083015251151560a082015260c07f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b591a3600101610bf9565b6312766e0160e11b8c52600485905260245260448bfd5b6305a7b3d160e11b8c5260045260245260448afd5b505060019096019593509050610bd2565b9150825b8251811015610e51576001906001600160401b03610df18286611400565b515116828060a01b0384610e058488611400565b5101511690808752600a855260408720848060a01b038316885285528660408120557f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b8780a301610dd3565b604051615d6b908161168182396080518181816105dc0152610c33015260a0518181816106120152610be4015260c05181818161063901526138980152f35b610bcd565b63d794ef9560e01b60005260046000fd5b5063ffffffff8251161561035f565b5080516001600160601b031615610358565b639b15e16f60e01b60005260046000fd5b838203610280811261109a57610260610eef6112e7565b91610ef9876113dd565b8352601f19011261109a576040519161026083016001600160401b0381118482101761109f57604052610f2e602087016113d0565b8352610f3c604087016113f1565b6020840152610f4d6060870161133f565b6040840152610f5e6080870161133f565b6060840152610f6f60a0870161133f565b6080840152610f8060c087016113c2565b60a0840152610f9160e087016113c2565b60c0840152610fa361010087016113f1565b60e0840152610fb5610120870161133f565b610100840152610fc861014087016113f1565b610120840152610fdb61016087016113f1565b610140840152610180860151916001600160e01b03198316830361109a57836020936101606102809601526110136101a089016113d0565b6101808201526110266101c089016113f1565b6101a08201526110396101e0890161133f565b6101c082015261104c610200890161133f565b6101e082015261105f61022089016113dd565b610200820152611072610240890161133f565b610220820152611085610260890161133f565b61024082015283820152815201930192610211565b600080fd5b634e487b7160e01b600052604160045260246000fd5b60408387031261109a5760206040916110cc6112e7565b6110d58661132b565b81526110e28387016113dd565b838201528152019201916101b9565b82516001600160401b03811161109a5782016040818803601f19011261109a576111196112e7565b90611126602082016113dd565b825260408101516001600160401b03811161109a57602091010187601f8201121561109a5780516111596100e882611350565b91602060e08185858152019302820101908a821161109a57602001915b8183106111955750505091816020938480940152815201920191610162565b828b0360e0811261109a5760c06111aa6112e7565b916111b48661132b565b8352601f19011261109a576040519160c08301916001600160401b0383118484101761109f5760e0936020936040526111ee84880161133f565b81526111fc6040880161133f565b8482015261120c606088016113f1565b604082015261121d6080880161133f565b606082015261122e60a0880161133f565b608082015261123f60c088016113d0565b60a082015283820152815201920191611176565b8284036080811261109a5760606112686112e7565b916112728661132b565b8352601f19011261109a5760809160209161128b6112c8565b61129684880161132b565b81526112a4604088016113c2565b848201526112b4606088016113d0565b60408201528382015281520192019161010a565b60405190606082016001600160401b0381118382101761109f57604052565b60408051919082016001600160401b0381118382101761109f57604052565b6040519190601f01601f191682016001600160401b0381118382101761109f57604052565b51906001600160a01b038216820361109a57565b519063ffffffff8216820361109a57565b6001600160401b03811161109f5760051b60200190565b9080601f8301121561109a5781516113816100e882611350565b9260208085848152019260051b82010192831161109a57602001905b8282106113aa5750505090565b602080916113b78461132b565b81520191019061139d565b519060ff8216820361109a57565b5190811515820361109a57565b51906001600160401b038216820361109a57565b519061ffff8216820361109a57565b80518210156114145760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b80548210156114145760005260206000200190600090565b8054801561146b576000190190611459828261142a565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b6000818152600c6020526040902054801561154257600019810181811161152c57600b5460001981019190821161152c578181036114db575b5050506114c7600b611442565b600052600c60205260006040812055600190565b6115146114ec6114fd93600b61142a565b90549060031b1c928392600b61142a565b819391549060031b91821b91600019901b19161790565b9055600052600c6020526040600020553880806114ba565b634e487b7160e01b600052601160045260246000fd5b5050600090565b8054906801000000000000000082101561109f57816114fd9160016115709401815561142a565b9055565b806000526003602052604060002054156000146115ad57611596816002611549565b600254906000526003602052604060002055600190565b50600090565b80600052600c602052604060002054156000146115ad576115d581600b611549565b600b5490600052600c602052604060002055600190565b600081815260036020526040902054801561154257600019810181811161152c5760025460001981019190821161152c57808203611646575b5050506116326002611442565b600052600360205260006040812055600190565b6116686116576114fd93600261142a565b90549060031b1c928392600261142a565b9055600052600360205260406000205538808061162556fe6080604052600436101561001257600080fd5b60003560e01c806241e5be1461021657806301447eaa1461021157806301ffc9a71461020c578063061877e31461020757806306285c6914610202578063181f5a77146101fd5780632451a627146101f8578063325c868e146101f35780633937306f146101ee5780633a49bb49146101e957806341ed29e7146101e457806345ac924d146101df5780634ab35b0b146101da578063514e8cff146101d55780636def4ce7146101d0578063770e2dc4146101cb57806379ba5097146101c65780637afac322146101c1578063805f2132146101bc57806382b49eb0146101b757806387b8d879146101b25780638da5cb5b146101ad57806391a2749a146101a8578063a69c64c0146101a3578063bf78e03f1461019e578063cdc73d5114610199578063d02641a014610194578063d63d3af21461018f578063d8694ccd1461018a578063f2fde38b14610185578063fbe3f778146101805763ffdb4b371461017b57600080fd5b612642565b612545565b612489565b612056565b61203a565b611ff1565b611f7a565b611ed4565b611e1b565b611d87565b611d60565b611b44565b6119c7565b61172c565b6115f3565b6114db565b6112bc565b61113d565b610f7e565b610f46565b610e7d565b610ce8565b610b72565b610898565b61087c565b6107f9565b610757565b6105a0565b610558565b610464565b6103b0565b61023e565b6001600160a01b0381160361022c57565b600080fd5b359061023c8261021b565b565b3461022c57606060031936011261022c5760206102756004356102608161021b565b602435604435916102708361021b565b6127f2565b604051908152f35b6004359067ffffffffffffffff8216820361022c57565b6024359067ffffffffffffffff8216820361022c57565b359067ffffffffffffffff8216820361022c57565b9181601f8401121561022c5782359167ffffffffffffffff831161022c576020808501948460051b01011161022c57565b919082519283825260005b84811061031d575050601f19601f8460006020809697860101520116010190565b806020809284010151828286010152016102fc565b602081016020825282518091526040820191602060408360051b8301019401926000915b83831061036557505050505090565b90919293946020806103a1837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0866001960301875289516102f1565b97019301930191939290610356565b3461022c57606060031936011261022c576103c961027d565b60243567ffffffffffffffff811161022c576103e99036906004016102c0565b6044929192359167ffffffffffffffff831161022c573660238401121561022c5782600401359167ffffffffffffffff831161022c573660248460061b8601011161022c5761044b94602461043f950192612a00565b60405191829182610332565b0390f35b35906001600160e01b03198216820361022c57565b3461022c57602060031936011261022c576004356001600160e01b03198116810361022c576001600160e01b0319602091167f805f213200000000000000000000000000000000000000000000000000000000811490811561052e575b8115610504575b81156104da575b506040519015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386104cf565b7f181f5a7700000000000000000000000000000000000000000000000000000000811491506104c8565b7fe364892e00000000000000000000000000000000000000000000000000000000811491506104c1565b3461022c57602060031936011261022c576001600160a01b0360043561057d8161021b565b166000526008602052602067ffffffffffffffff60406000205416604051908152f35b3461022c57600060031936011261022c576105b9612c19565b5060606040516105c8816106a0565b63ffffffff6bffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016918281526001600160a01b0360406020830192827f00000000000000000000000000000000000000000000000000000000000000001684520191837f00000000000000000000000000000000000000000000000000000000000000001683526040519485525116602084015251166040820152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176106bc57604052565b610671565b60a0810190811067ffffffffffffffff8211176106bc57604052565b6040810190811067ffffffffffffffff8211176106bc57604052565b60c0810190811067ffffffffffffffff8211176106bc57604052565b90601f601f19910116810190811067ffffffffffffffff8211176106bc57604052565b6040519061023c604083610715565b6040519061023c61026083610715565b3461022c57600060031936011261022c5761044b604080519061077a8183610715565b600f82527f46656551756f74657220312e362e3000000000000000000000000000000000006020830152519182916020835260208301906102f1565b602060408183019282815284518094520192019060005b8181106107da5750505090565b82516001600160a01b03168452602093840193909201916001016107cd565b3461022c57600060031936011261022c5760405180602060025491828152019060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b8181106108665761044b8561085a81870382610715565b604051918291826107b6565b8254845260209093019260019283019201610843565b3461022c57600060031936011261022c57602060405160248152f35b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c5780600401906040600319823603011261022c576108d6613d82565b6108e08280612c38565b4263ffffffff1692915060005b818110610a39575050602401906109048284612c38565b92905060005b83811061091357005b8061093261092d600193610927868a612c38565b9061289b565b612cd7565b7fdd84a3fa9ef9409f550d54d6affec7e9c480c878c6ab27b78912a03e1b371c6e67ffffffffffffffff610a15610a0760208501946109f961097b87516001600160e01b031690565b610995610986610738565b6001600160e01b039092168252565b63ffffffff8c1660208201526109d06109b6845167ffffffffffffffff1690565b67ffffffffffffffff166000526005602052604060002090565b815160209092015160e01b6001600160e01b0319166001600160e01b0392909216919091179055565b5167ffffffffffffffff1690565b93516001600160e01b031690565b604080516001600160e01b039290921682524260208301529190931692a20161090a565b80610a52610a4d6001936109278980612c38565b612ca0565b7f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a6001600160a01b03610aeb610a076020850194610ade610a9a87516001600160e01b031690565b610aa5610986610738565b63ffffffff8d1660208201526109d0610ac584516001600160a01b031690565b6001600160a01b03166000526006602052604060002090565b516001600160a01b031690565b604080516001600160e01b039290921682524260208301529190931692a2016108ed565b9181601f8401121561022c5782359167ffffffffffffffff831161022c576020838186019501011161022c57565b92610b6f9492610b61928552151560208501526080604085015260808401906102f1565b9160608184039101526102f1565b90565b3461022c5760a060031936011261022c57610b8b61027d565b60243590610b988261021b565b6044359160643567ffffffffffffffff811161022c57610bbc903690600401610b0f565b93909160843567ffffffffffffffff811161022c57610bdf903690600401610b0f565b9290917f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0382166001600160a01b03821614600014610cab575050935b6bffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016808611610c7a575091610c6b939161044b9693613dc6565b90939160405194859485610b3d565b857f6a92a4830000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b91610cb5926127f2565b93610c24565b67ffffffffffffffff81116106bc5760051b60200190565b8015150361022c57565b359061023c82610cd3565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590610d2582610cbb565b90610d336040519283610715565b828252602460a06020840194028201019036821161022c57602401925b818410610d6257610d6083612cfc565b005b60a08436031261022c5760405190610d79826106c1565b8435610d848161021b565b825260208501357fffffffffffffffffffff000000000000000000000000000000000000000000008116810361022c5760208301526040850135907fffff0000000000000000000000000000000000000000000000000000000000008216820361022c5782602092604060a0950152610dff60608801610231565b6060820152610e1060808801610cdd565b6080820152815201930192610d50565b602060408183019282815284518094520192019060005b818110610e445750505090565b9091926020604082610e72600194885163ffffffff602080926001600160e01b038151168552015116910152565b019401929101610e37565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c57610eae9036906004016102c0565b610eb781610cbb565b91610ec56040519384610715565b818352601f19610ed483610cbb565b0160005b818110610f2f57505060005b82811015610f2157600190610f05610f008260051b85016128b0565b613844565b610f0f82876129ec565b52610f1a81866129ec565b5001610ee4565b6040518061044b8682610e20565b602090610f3a612e5a565b82828801015201610ed8565b3461022c57602060031936011261022c576020610f6d600435610f688161021b565b613b24565b6001600160e01b0360405191168152f35b3461022c57602060031936011261022c5767ffffffffffffffff610fa061027d565b610fa8612e5a565b50166000526005602052604060002060405190610fc4826106dd565b546001600160e01b038116825260e01c6020820152604051809161044b82604081019263ffffffff602080926001600160e01b038151168552015116910152565b61023c909291926102408061026083019561102284825115159052565b60208181015161ffff169085015260408181015163ffffffff169085015260608181015163ffffffff169085015260808181015163ffffffff169085015260a08181015160ff169085015260c08181015160ff169085015260e08181015161ffff16908501526101008181015163ffffffff16908501526101208181015161ffff16908501526101408181015161ffff1690850152610160818101516001600160e01b03191690850152610180818101511515908501526101a08181015161ffff16908501526101c08181015163ffffffff16908501526101e08181015163ffffffff16908501526102008181015167ffffffffffffffff16908501526102208181015163ffffffff1690850152015163ffffffff16910152565b3461022c57602060031936011261022c5761044b6112006111fb61115f61027d565b600061024061116c610747565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152015267ffffffffffffffff166000526009602052604060002090565b612e98565b60405191829182611005565b359063ffffffff8216820361022c57565b359061ffff8216820361022c57565b81601f8201121561022c5780359061124382610cbb565b926112516040519485610715565b82845260208085019360061b8301019181831161022c57602001925b82841061127b575050505090565b60408483031261022c5760206040918251611295816106dd565b61129e876102ab565b8152828701356112ad8161021b565b8382015281520193019261126d565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c5780600401356112f881610cbb565b916113066040519384610715565b8183526024602084019260051b8201019036821161022c5760248101925b828410611355576024358567ffffffffffffffff821161022c5761134f610d6092369060040161122c565b90612fee565b833567ffffffffffffffff811161022c57820160407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc823603011261022c57604051906113a1826106dd565b6113ad602482016102ab565b8252604481013567ffffffffffffffff811161022c57602491010136601f8201121561022c5780356113de81610cbb565b916113ec6040519384610715565b818352602060e081850193028201019036821161022c57602001915b8183106114275750505091816020938480940152815201930192611324565b82360360e0811261022c5760c0601f1960405192611444846106dd565b863561144f8161021b565b8452011261022c5760e091602091604051611469816106f9565b61147484880161120c565b81526114826040880161120c565b848201526114926060880161121d565b60408201526114a36080880161120c565b60608201526114b460a0880161120c565b608082015260c08701356114c781610cd3565b60a082015283820152815201920191611408565b3461022c57600060031936011261022c576000546001600160a01b0381163303611562577fffffffffffffffffffffffff0000000000000000000000000000000000000000600154913382841617600155166000556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b9080601f8301121561022c5781356115a381610cbb565b926115b16040519485610715565b81845260208085019260051b82010192831161022c57602001905b8282106115d95750505090565b6020809183356115e88161021b565b8152019101906115cc565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c5761162490369060040161158c565b60243567ffffffffffffffff811161022c5761164490369060040161158c565b9061164d613fd8565b60005b81518110156116bc578061167161166c610ade600194866129ec565b615a24565b61167c575b01611650565b6001600160a01b03611691610ade83866129ec565b167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f91600080a2611676565b8260005b8151811015610d6057806116e16116dc610ade600194866129ec565b615a38565b6116ec575b016116c0565b6001600160a01b03611701610ade83866129ec565b167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23600080a26116e6565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c5761175d903690600401610b0f565b6024359167ffffffffffffffff831161022c576117b66117ae61179461178a6117be963690600401610b0f565b949095369161294b565b90604082015190605e604a84015160601c93015191929190565b91903361416a565b81019061329d565b60005b8151811015610d60576118096118046117eb6117dd84866129ec565b51516001600160a01b031690565b6001600160a01b03166000526007602052604060002090565b61335c565b61181d6118196040830151151590565b1590565b61197e57906118686118356020600194015160ff1690565b611862611856602061184786896129ec565b5101516001600160e01b031690565b6001600160e01b031690565b9061423c565b611883604061187784876129ec565b51015163ffffffff1690565b63ffffffff6118ae6118a561189e610ac56117dd888b6129ec565b5460e01c90565b63ffffffff1690565b911610611978576118fc6118c7604061187785886129ec565b6118ec6118d2610738565b6001600160e01b03851681529163ffffffff166020830152565b6109d0610ac56117dd86896129ec565b7f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a6001600160a01b036119326117dd85886129ec565b61196e6119446040611877888b6129ec565b60405193849316958390929163ffffffff6020916001600160e01b03604085019616845216910152565b0390a25b016117c1565b50611972565b6119c361198e6117dd84866129ec565b7f06439c6b000000000000000000000000000000000000000000000000000000006000526001600160a01b0316600452602490565b6000fd5b3461022c57604060031936011261022c5761044b611a4f6119e661027d565b67ffffffffffffffff602435916119fc8361021b565b600060a0604051611a0c816106f9565b828152826020820152826040820152826060820152826080820152015216600052600a6020526040600020906001600160a01b0316600052602052604060002090565b611acb611ac260405192611a62846106f9565b5463ffffffff8116845263ffffffff8160201c16602085015261ffff8160401c166040850152611aa9611a9c8263ffffffff9060501c1690565b63ffffffff166060860152565b63ffffffff607082901c16608085015260901c60ff1690565b151560a0830152565b6040519182918291909160a08060c083019463ffffffff815116845263ffffffff602082015116602085015261ffff604082015116604085015263ffffffff606082015116606085015263ffffffff608082015116608085015201511515910152565b60ff81160361022c57565b359061023c82611b2e565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590611b8182610cbb565b90611b8f6040519283610715565b82825260246102806020840194028201019036821161022c57602401925b818410611bbd57610d6083613392565b833603610280811261022c57610260601f1960405192611bdc846106dd565b611be5886102ab565b8452011261022c5761028091602091611bfc610747565b611c07848901610cdd565b8152611c156040890161121d565b84820152611c256060890161120c565b6040820152611c366080890161120c565b6060820152611c4760a0890161120c565b6080820152611c5860c08901611b39565b60a0820152611c6960e08901611b39565b60c0820152611c7b610100890161121d565b60e0820152611c8d610120890161120c565b610100820152611ca0610140890161121d565b610120820152611cb3610160890161121d565b610140820152611cc6610180890161044f565b610160820152611cd96101a08901610cdd565b610180820152611cec6101c0890161121d565b6101a0820152611cff6101e0890161120c565b6101c0820152611d12610200890161120c565b6101e0820152611d2561022089016102ab565b610200820152611d38610240890161120c565b610220820152611d4b610260890161120c565b61024082015283820152815201930192611bad565b3461022c57600060031936011261022c5760206001600160a01b0360015416604051908152f35b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c576040600319823603011261022c57604051611dc4816106dd565b816004013567ffffffffffffffff811161022c57611de8906004369185010161158c565b8152602482013567ffffffffffffffff811161022c57610d60926004611e11923692010161158c565b6020820152613616565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590611e5882610cbb565b90611e666040519283610715565b8282526024602083019360061b8201019036821161022c57602401925b818410611e9357610d6083613768565b60408436031261022c5760206040918251611ead816106dd565b8635611eb88161021b565b8152611ec58388016102ab565b83820152815201930192611e83565b3461022c57602060031936011261022c576001600160a01b03600435611ef98161021b565b611f01612c19565b5016600052600760205261044b604060002060ff60405191611f22836106a0565b546001600160a01b0381168352818160a01c16602084015260a81c16151560408201526040519182918291909160408060608301946001600160a01b03815116845260ff602082015116602085015201511515910152565b3461022c57600060031936011261022c57604051806020600b54918281520190600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db99060005b818110611fdb5761044b8561085a81870382610715565b8254845260209093019260019283019201611fc4565b3461022c57602060031936011261022c576040612013600435610f008161021b565b6120388251809263ffffffff602080926001600160e01b038151168552015116910152565bf35b3461022c57600060031936011261022c57602060405160128152f35b3461022c57604060031936011261022c5761206f61027d565b60243567ffffffffffffffff811161022c578060040160a0600319833603011261022c576120b46111fb8467ffffffffffffffff166000526009602052604060002090565b916120c26118198451151590565b61245157606481016120f86118196120d9836128b0565b6001600160a01b03166000526001600b01602052604060002054151590565b6124105783906044830161210c8186612c38565b95905061211a81858a614b75565b92612127610f68826128b0565b97889361214561213f61022084015163ffffffff1690565b8c615075565b9a6000808b156123d75750506121dd6121aa61ffff856121cf996121b69998966121ea9661218e6101c06121826101a06121f09d015161ffff1690565b95015163ffffffff1690565b6121a161219a8b6128b0565b938d612c38565b96909516615166565b989198979098946128b0565b6001600160a01b03166000526008602052604060002090565b5467ffffffffffffffff1690565b67ffffffffffffffff1690565b906127a6565b9560009761ffff61220761014089015161ffff1690565b16612379575b50946121ea6121dd6102006122df61044b9d6dffffffffffffffffffffffffffff6122d76122f79f9e9b6122d26001600160e01b039f9b9c6122ef9f6122d29e63ffffffff6122666122d29f60246122709501906128fa565b929050169061397c565b908b60a0810161229361228d612287835160ff1690565b60ff1690565b856127a6565b9360e08301916122a5835161ffff1690565b9061ffff82168311612307575b50505050608001516122d2916118a59163ffffffff166139ba565b6139ba565b61397c565b9116906127a6565b93015167ffffffffffffffff1690565b9116906127b9565b6040519081529081906020820190565b6118a59496506122d2959361ffff6123686123576122cd9661235161234a61234160809960ff61233b61236f9b5160ff1690565b16613989565b965161ffff1690565b61ffff1690565b90613837565b6121ea61228760c08d015160ff1690565b911661397c565b95938395506122b2565b9095949897508261239f8b989495986dffffffffffffffffffffffffffff9060701c1690565b6dffffffffffffffffffffffffffff16916123bd60248901856128fa565b90506123c9938861536b565b96979394389693929661220d565b959492509550506121ea6121dd6121cf6121b661240a6124056118a56102406121f099015163ffffffff1690565b612731565b946128b0565b61241c6119c3916128b0565b7f2502348c000000000000000000000000000000000000000000000000000000006000526001600160a01b0316600452602490565b7f99ac52f20000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff841660045260246000fd5b3461022c57602060031936011261022c576001600160a01b036004356124ae8161021b565b6124b6613fd8565b1633811461251b57807fffffffffffffffffffffffff000000000000000000000000000000000000000060005416176000556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c5780600401359061258282610cbb565b906125906040519283610715565b8282526024602083019360071b8201019036821161022c57602401925b8184106125bd57610d60836139d4565b8336036080811261022c576060601f19604051926125da846106dd565b87356125e58161021b565b8452011261022c576080916020916040516125ff816106a0565b8388013561260c8161021b565b8152604088013561261c81611b2e565b84820152606088013561262e81610cd3565b6040820152838201528152019301926125ad565b3461022c57604060031936011261022c5760043561265f8161021b565b612667610294565b9067ffffffffffffffff82169182600052600960205260ff60406000205416156126d4576126976126b892613b24565b92600052600960205263ffffffff60016040600020015460901c1690615075565b604080516001600160e01b039384168152919092166020820152f35b827f99ac52f20000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90662386f26fc10000820291808304662386f26fc10000149015171561275357565b612702565b908160051b918083046020149015171561275357565b9061012c82029180830461012c149015171561275357565b90655af3107a4000820291808304655af3107a4000149015171561275357565b8181029291811591840414171561275357565b81156127c3570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b61281c612816610b6f94936001600160e01b0361280f8195613b24565b16906127a6565b92613b24565b16906127b9565b9061282d82610cbb565b61283a6040519182610715565b828152601f1961284a8294610cbb565b019060005b82811061285b57505050565b80606060208093850101520161284f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156128ab5760061b0190565b61286c565b35610b6f8161021b565b91908110156128ab5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618136030182121561022c570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561022c570180359067ffffffffffffffff821161022c5760200191813603831361022c57565b92919267ffffffffffffffff82116106bc5760405191612975601f8201601f191660200184610715565b82948184528183011161022c578281602093846000960137010152565b9061023c6040516129a2816106f9565b925463ffffffff8082168552602082811c821690860152604082811c61ffff1690860152605082901c81166060860152607082901c16608085015260901c60ff16151560a0840152565b80518210156128ab5760209160051b010190565b909291612a35612a248367ffffffffffffffff166000526009602052604060002090565b5460081b6001600160e01b03191690565b90612a3f81612823565b9560005b828110612a54575050505050505090565b612a67612a6282848961289b565b6128b0565b8388612a81612a778584846128ba565b60408101906128fa565b905060208111612b9e575b508392612ac2612abc612ab5612aab600198612afd97612af8976128ba565b60208101906128fa565b369161294b565b89613b9c565b612ae08967ffffffffffffffff16600052600a602052604060002090565b906001600160a01b0316600052602052604060002090565b612992565b60a081015115612b6257612b46612b1e6060612b3893015163ffffffff1690565b6040805163ffffffff909216602083015290928391820190565b03601f198101835282610715565b612b50828b6129ec565b52612b5b818a6129ec565b5001612a43565b50612b38612b46612b9984612b8b8a67ffffffffffffffff166000526009602052604060002090565b015460101c63ffffffff1690565b612b1e565b915050612bd66118a5612bc984612ae08b67ffffffffffffffff16600052600a602052604060002090565b5460701c63ffffffff1690565b10612be357838838612a8c565b7f36f536ca000000000000000000000000000000000000000000000000000000006000526001600160a01b031660045260246000fd5b60405190612c26826106a0565b60006040838281528260208201520152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561022c570180359067ffffffffffffffff821161022c57602001918160061b3603831361022c57565b35906001600160e01b038216820361022c57565b60408136031261022c57612ccf602060405192612cbc846106dd565b8035612cc78161021b565b845201612c8c565b602082015290565b60408136031261022c57612ccf602060405192612cf3846106dd565b612cc7816102ab565b90612d05613fd8565b60005b8251811015612e555780612d1e600192856129ec565b517f32a4ba3fa3351b11ad555d4c8ec70a744e8705607077a946807030d64b6ab1a360a06001600160a01b038351169260608101936001600160a01b0380865116957fffff000000000000000000000000000000000000000000000000000000000000612dbc60208601947fffffffffffffffffffff00000000000000000000000000000000000000000000865116604088019a848c5116926159a0565b977fffffffffffffffffffff000000000000000000000000000000000000000000006080870195612e28875115158c600052600460205260406000209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b8560405198511688525116602087015251166040850152511660608301525115156080820152a201612d08565b509050565b60405190612e67826106dd565b60006020838281520152565b90604051612e80816106dd565b91546001600160e01b038116835260e01c6020830152565b9061023c612fe06001612ea9610747565b94612f7f612f758254612ec5612ebf8260ff1690565b15158a52565b61ffff600882901c1660208a015263ffffffff601882901c1660408a015263ffffffff603882901c1660608a015263ffffffff605882901c1660808a015260ff607882901c1660a08a015260ff608082901c1660c08a015261ffff608882901c1660e08a015263ffffffff609882901c166101008a015261ffff60b882901c166101208a015261ffff60c882901c166101408a01526001600160e01b0319600882901b166101608a015260f81c90565b1515610180880152565b015461ffff81166101a086015263ffffffff601082901c166101c086015263ffffffff603082901c166101e086015267ffffffffffffffff605082901c1661020086015263ffffffff609082901c1661022086015260b01c63ffffffff1690565b63ffffffff16610240840152565b90612ff7613fd8565b6000915b80518310156131e95761300e83826129ec565b5190613022825167ffffffffffffffff1690565b946020600093019367ffffffffffffffff8716935b855180518210156131d45761304e826020926129ec565b51015161305f6117dd8389516129ec565b8151602083015163ffffffff90811691168181101561319b575050608082015163ffffffff166020811061315a575090867f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b56001600160a01b03846130e9858f60019998612ae06130e49267ffffffffffffffff16600052600a602052604060002090565b614016565b61315160405192839216958291909160a08060c083019463ffffffff815116845263ffffffff602082015116602085015261ffff604082015116604085015263ffffffff606082015116606085015263ffffffff608082015116608085015201511515910152565b0390a301613037565b7f24ecdc02000000000000000000000000000000000000000000000000000000006000526001600160a01b0390911660045263ffffffff1660245260446000fd5b7f0b4f67a20000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b50509550925092600191500191929092612ffb565b50905060005b81518110156132995780613217613208600193856129ec565b515167ffffffffffffffff1690565b67ffffffffffffffff6001600160a01b03613246602061323786896129ec565b5101516001600160a01b031690565b600061326a82612ae08767ffffffffffffffff16600052600a602052604060002090565b551691167f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b600080a3016131ef565b5050565b60208183031261022c5780359067ffffffffffffffff821161022c570181601f8201121561022c578035906132d182610cbb565b926132df6040519485610715565b8284526020606081860194028301019181831161022c57602001925b828410613309575050505090565b60608483031261022c576020606091604051613324816106a0565b863561332f8161021b565b815261333c838801612c8c565b8382015261334c6040880161120c565b60408201528152019301926132fb565b90604051613369816106a0565b604060ff8294546001600160a01b0381168452818160a01c16602085015260a81c161515910152565b9061339b613fd8565b60005b8251811015612e55576133b181846129ec565b5160206133c161320884876129ec565b9101519067ffffffffffffffff8116801580156135f7575b80156135c9575b80156134ea575b6134b25791613478826001959461342861341b612a2461347d9767ffffffffffffffff166000526009602052604060002090565b6001600160e01b03191690565b613483577f71e9302ab4e912a9678ae7f5a8542856706806f2817e1bf2a20b171e265cb4ad6040518061345b8782611005565b0390a267ffffffffffffffff166000526009602052604060002090565b614349565b0161339e565b7f2431cc0363f2f66b21782c7e3d54dd9085927981a21bd0cc6be45a51b19689e36040518061345b8782611005565b7fc35aa79d0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff821660045260246000fd5b506001600160e01b031961350a6101608501516001600160e01b03191690565b167f2812d52c00000000000000000000000000000000000000000000000000000000811415908161359e575b81613573575b81613548575b506133e7565b7fc4e05953000000000000000000000000000000000000000000000000000000009150141538613542565b7fac77ffec00000000000000000000000000000000000000000000000000000000811415915061353c565b7f1e10bdc4000000000000000000000000000000000000000000000000000000008114159150613536565b506101e083015163ffffffff1663ffffffff6135ef6118a5606087015163ffffffff1690565b9116116133e0565b5063ffffffff61360f6101e085015163ffffffff1690565b16156133d9565b61361e613fd8565b60208101519160005b83518110156136ab5780613640610ade600193876129ec565b61366261365d6001600160a01b0383165b6001600160a01b031690565b615cd3565b61366e575b5001613627565b6040516001600160a01b039190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a138613667565b5091505160005b8151811015613299576136c8610ade82846129ec565b906001600160a01b0382161561373e577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef6137358361371a6137156136516001976001600160a01b031690565b615c5a565b506040516001600160a01b0390911681529081906020820190565b0390a1016136b2565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b613770613fd8565b60005b815181101561329957806001600160a01b03613791600193856129ec565b5151167fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d61382e67ffffffffffffffff60206137cd86896129ec565b51015116836000526008602052604060002067ffffffffffffffff82167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008254161790556040519182918291909167ffffffffffffffff6020820193169052565b0390a201613773565b9190820391821161275357565b61384c612e5a565b5061387261386d826001600160a01b03166000526006602052604060002090565b612e73565b602081019161389161388b6118a5855163ffffffff1690565b42613837565b63ffffffff7f00000000000000000000000000000000000000000000000000000000000000001611613939576118046138dd916001600160a01b03166000526007602052604060002090565b6138ed6118196040830151151590565b801561393f575b61393957613901906149ff565b9163ffffffff6139296118a561391e602087015163ffffffff1690565b935163ffffffff1690565b911610613934575090565b905090565b50905090565b506001600160a01b0361395982516001600160a01b031690565b16156138f4565b906002820180921161275357565b906020820180921161275357565b9190820180921161275357565b9061ffff8091169116029061ffff821691820361275357565b63ffffffff60209116019063ffffffff821161275357565b9063ffffffff8091169116019063ffffffff821161275357565b906139dd613fd8565b60005b8251811015612e5557806139f6600192856129ec565b517fe6a7a17d710bf0b2cd05e5397dc6f97a5da4ee79e31e234bf5f965ee2bd9a5bf613b1b60206001600160a01b038451169301518360005260076020526040600020613a7b6001600160a01b0383511682906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b602082015181547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff74ff000000000000000000000000000000000000000075ff0000000000000000000000000000000000000000006040870151151560a81b169360a01b169116171790556040519182918291909160408060608301946001600160a01b03815116845260ff602082015116602085015201511515910152565b0390a2016139e0565b613b2d81613844565b9063ffffffff602083015116158015613b8a575b613b535750516001600160e01b031690565b6001600160a01b03907f06439c6b000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b506001600160e01b0382511615613b41565b6001600160e01b03191691907f2812d52c000000000000000000000000000000000000000000000000000000008314613c94577f1e10bdc4000000000000000000000000000000000000000000000000000000008314613c86577fac77ffec0000000000000000000000000000000000000000000000000000000083148015613c5d575b613c5257827f2ee820750000000000000000000000000000000000000000000000000000000060005260045260246000fd5b61023c91925061549e565b507fc4e05953000000000000000000000000000000000000000000000000000000008314613c20565b61023c919250600190615501565b61023c91925061541f565b6001600160e01b03191692917f2812d52c000000000000000000000000000000000000000000000000000000008414613d76577f1e10bdc4000000000000000000000000000000000000000000000000000000008414613d5557507fac77ffec0000000000000000000000000000000000000000000000000000000083148015613c5d57613c5257827f2ee820750000000000000000000000000000000000000000000000000000000060005260045260246000fd5b91925061023c9115613d6d5760ff60015b1690615501565b60ff6000613d66565b5061023c91925061541f565b33600052600360205260406000205415613d9857565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6111fb613ded9196949395929667ffffffffffffffff166000526009602052604060002090565b946101608601946001600160e01b0319613e0f87516001600160e01b03191690565b167f2812d52c000000000000000000000000000000000000000000000000000000008114908115613fae575b8115613f84575b50613f3f5750507f1e10bdc4000000000000000000000000000000000000000000000000000000006001600160e01b0319613e8586516001600160e01b03191690565b1614613ed6576119c3613ea085516001600160e01b03191690565b7f2ee82075000000000000000000000000000000000000000000000000000000006000526001600160e01b031916600452602490565b613f2a9350612ab56060613f148763ffffffff613f0b610180613f0386613f389b9d015163ffffffff1690565b930151151590565b91168587615853565b0151604051958691602083019190602083019252565b03601f198101865285610715565b9160019190565b94509491613f6591613f5f6118a56101e0610b6f96015163ffffffff1690565b916155ec565b93613f7c6020613f74876156f5565b960151151590565b93369161294b565b7fc4e059530000000000000000000000000000000000000000000000000000000091501438613e42565b7fac77ffec0000000000000000000000000000000000000000000000000000000081149150613e3b565b6001600160a01b03600154163303613fec57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b815181546020808501516040808701517fffffffffffffffffffffffffffffffffffffffffffff0000000000000000000090941663ffffffff958616179190921b67ffffffff00000000161791901b69ffff000000000000000016178255606083015161023c936141269260a0926140c8911685547fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff1660509190911b6dffffffff0000000000000000000016178555565b61411f6140dc608083015163ffffffff1690565b85547fffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffff1660709190911b71ffffffff000000000000000000000000000016178555565b0151151590565b81547fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff1690151560901b72ff00000000000000000000000000000000000016179055565b9192909261417a828286866159a0565b600052600460205260ff60406000205416156141965750505050565b6040517f097e17ff0000000000000000000000000000000000000000000000000000000081526001600160a01b0393841660048201529390921660248401527fffffffffffffffffffff0000000000000000000000000000000000000000000090911660448301527fffff000000000000000000000000000000000000000000000000000000000000166064820152608490fd5b0390fd5b604d811161275357600a0a90565b60ff1660120160ff81116127535760ff169060248211156142d7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc82019182116127535761428d6142939261422e565b906127b9565b6001600160e01b0381116142ad576001600160e01b031690565b7f10cb51d10000000000000000000000000000000000000000000000000000000060005260046000fd5b906024039060248211612753576121ea6142f09261422e565b614293565b9060ff80911691160160ff81116127535760ff169060248211156142d7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc82019182116127535761428d6142939261422e565b9061494b610240600161023c946143946143638651151590565b829060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b6143da6143a6602087015161ffff1690565b82547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff1660089190911b62ffff0016178255565b6144266143ee604087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffff1660189190911b66ffffffff00000016178255565b61447661443a606087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffff1660389190911b6affffffff0000000000000016178255565b6144ca61448a608087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff1660589190911b6effffffff000000000000000000000016178255565b61451c6144db60a087015160ff1690565b82547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff1660789190911b6fff00000000000000000000000000000016178255565b61456f61452d60c087015160ff1690565b82547fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff1660809190911b70ff0000000000000000000000000000000016178255565b6145c561458160e087015161ffff1690565b82547fffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffff1660889190911b72ffff000000000000000000000000000000000016178255565b6146226145da61010087015163ffffffff1690565b82547fffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffff1660989190911b76ffffffff0000000000000000000000000000000000000016178255565b61467f61463561012087015161ffff1690565b82547fffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffff1660b89190911b78ffff000000000000000000000000000000000000000000000016178255565b6146de61469261014087015161ffff1690565b82547fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff1660c89190911b7affff0000000000000000000000000000000000000000000000000016178255565b6147476146f76101608701516001600160e01b03191690565b82547fff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff1660089190911c7effffffff00000000000000000000000000000000000000000000000000000016178255565b6147a8614758610180870151151590565b82547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690151560f81b7fff0000000000000000000000000000000000000000000000000000000000000016178255565b01926147ec6147bd6101a083015161ffff1690565b859061ffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000825416179055565b6148386148016101c083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff1660109190911b65ffffffff000016178555565b61488861484d6101e083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffff1660309190911b69ffffffff00000000000016178555565b6148e46148a161020083015167ffffffffffffffff1690565b85547fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff1660509190911b71ffffffffffffffff0000000000000000000016178555565b6149406148f961022083015163ffffffff1690565b85547fffffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffff1660909190911b75ffffffff00000000000000000000000000000000000016178555565b015163ffffffff1690565b7fffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffff79ffffffff0000000000000000000000000000000000000000000083549260b01b169116179055565b519069ffffffffffffffffffff8216820361022c57565b908160a091031261022c576149c081614995565b91602082015191604081015191610b6f608060608401519301614995565b6040513d6000823e3d90fd5b9081602091031261022c5751610b6f81611b2e565b614a07612e5a565b50614a1f61365161365183516001600160a01b031690565b90604051907ffeaf968c00000000000000000000000000000000000000000000000000000000825260a082600481865afa928315614b2757600092600094614b2c575b50600083126142ad576020600491604051928380927f313ce5670000000000000000000000000000000000000000000000000000000082525afa928315614b2757610b6f9363ffffffff93614ac893600092614af1575b506020015160ff165b906142f5565b92614ae3614ad4610738565b6001600160e01b039095168552565b1663ffffffff166020830152565b614ac2919250614b18602091823d8411614b20575b614b108183610715565b8101906149ea565b929150614ab9565b503d614b06565b6149de565b909350614b5291925060a03d60a011614b5f575b614b4a8183610715565b8101906149ac565b5093925050919238614a62565b503d614b40565b9081602091031261022c573590565b9190614b8460208301836128fa565b93905060408301614b958185612c38565b90506040840191614bad6118a5845163ffffffff1690565b8088116150435750602085015161ffff1680831161500d5750610160850196614bde88516001600160e01b03191690565b6001600160e01b031981167f2812d52c0000000000000000000000000000000000000000000000000000000081148015614fe4575b8015614fbb575b15614c9557505050505050509181614c8f612ab5614c76614c8896614c456080610b6f9801866128fa565b6101e083015163ffffffff169063ffffffff614c6e610180613f74606088015163ffffffff1690565b941692615a4c565b51958694516001600160e01b03191690565b92806128fa565b90613c9f565b7f1e10bdc400000000000000000000000000000000000000000000000000000000909a99929394969895979a14600014614f845750614d3e614d0e614d31999a614ce260808801886128fa565b63ffffffff614d06610180614cfe606087015163ffffffff1690565b950151151590565b931691615853565b91614d206118a5845163ffffffff1690565b998a91516001600160e01b03191690565b614c8f612ab588806128fa565b6080810151519082614d5b614d5387806128fa565b810190614b66565b614f67575081614f31575b85151580614f25575b614efb5760408211614ec7576020015167ffffffffffffffff9081169081831c16614e8d575050614dad90614da7859493979561276e565b9061397c565b946000935b838510614e0b5750505050506118a5614dcf915163ffffffff1690565b808211614ddb57505090565b7f869337890000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b9091929395600190614e626118a5612bc9614e3a8667ffffffffffffffff16600052600a602052604060002090565b614e4b612a628d6109278b8d612c38565b6001600160a01b0316600052602052604060002090565b8015614e7d57614e719161397c565b965b0193929190614db2565b50614e879061396e565b96614e73565b7fafa933080000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260245260446000fd5b7f8a0d71f7000000000000000000000000000000000000000000000000000000006000526004829052604060245260446000fd5b7f5bed51920000000000000000000000000000000000000000000000000000000060005260046000fd5b50606081015115614d6f565b6119c3827f8a0d71f700000000000000000000000000000000000000000000000000000000600052906044916004526000602452565b614f7e919350614da7614f7984613960565b612758565b91614d66565b7f2ee82075000000000000000000000000000000000000000000000000000000006000526001600160e01b03191660045260246000fd5b507fc4e05953000000000000000000000000000000000000000000000000000000008114614c1a565b507fac77ffec000000000000000000000000000000000000000000000000000000008114614c13565b7fd88dddd600000000000000000000000000000000000000000000000000000000600052600483905261ffff1660245260446000fd5b7f8693378900000000000000000000000000000000000000000000000000000000600052600452602487905260446000fd5b67ffffffffffffffff811660005260056020526040600020916040519261509b846106dd565b546001600160e01b038116845260e01c9182602085015263ffffffff821692836150d5575b50505050610b6f90516001600160e01b031690565b63ffffffff1642908103939084116127535783116150f357806150c0565b7ff08bcb3e0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045263ffffffff1660245260445260646000fd5b60408136031261022c5760206040519161514f836106dd565b803561515a8161021b565b83520135602082015290565b9694919695929390956000946000986000986000965b808810615190575050505050505050929190565b9091929394959697999a6151ad6151a88a848b61289b565b615136565b9a6151e4612af88d614e4b6151d68967ffffffffffffffff16600052600a602052604060002090565b91516001600160a01b031690565b916151f561181960a0850151151590565b61533e5760009c604084019061521061234a835161ffff1690565b6152c6575b5050606083015163ffffffff1661522b916139ba565b9c608083015161523e9063ffffffff1690565b615247916139ba565b9b82516152579063ffffffff1690565b63ffffffff1661526690612731565b600193908083106152ba57506124056118a5602061528993015163ffffffff1690565b8082116152a9575061529a9161397c565b985b019695949392919061517c565b90506152b49161397c565b9861529c565b9150506152b49161397c565b906121ea61532f939f61531d6153269460208f8e61234a95506001600160a01b036152f885516001600160a01b031690565b91166001600160a01b03821614615337576153139150613b24565b915b015190615ab4565b925161ffff1690565b620186a0900490565b9b3880615215565b5091615315565b999b506001915061535f8461535961536593614da78b612731565b9b6139ba565b9c6139a2565b9a61529c565b91939093806101e00193846101e011612753576101208102908082046101201490151715612753576101e09101018093116127535761234a610140615401610b6f966dffffffffffffffffffffffffffff6122d76153ec6153d961540b9a63ffffffff6121ea9a169061397c565b6121ea61234a6101208c015161ffff1690565b614da76118a56101008b015163ffffffff1690565b93015161ffff1690565b612786565b9081602091031261022c575190565b60208151036154555761543b6020825183010160208301615410565b6001600160a01b038111908115615492575b506154555750565b61422a906040519182917f8d666f6000000000000000000000000000000000000000000000000000000000835260206004840181815201906102f1565b6104009150103861544d565b60208151036154c457600b6154bc6020835184010160208401615410565b106154c45750565b61422a906040519182917fe0d7fb0200000000000000000000000000000000000000000000000000000000835260206004840181815201906102f1565b9060208251036155275780615514575050565b6154bc6020835184010160208401615410565b6040517fe0d7fb02000000000000000000000000000000000000000000000000000000008152602060048201528061422a60248201856102f1565b919091356001600160e01b03198116926004811061557e575050565b6001600160e01b0319929350829060040360031b1b161690565b909291928360041161022c57831161022c57600401916003190190565b9060041161022c5790600490565b9081604091031261022c576020604051916155dd836106dd565b805183520151612ccf81610cd3565b916155f5612e5a565b5081156156d3575061561e612ab582806156186001600160e01b03199587615562565b95615598565b91167f181dcf1000000000000000000000000000000000000000000000000000000000810361565b575080602080610b6f935183010191016155c3565b7f97a657c900000000000000000000000000000000000000000000000000000000146156ab577f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b806020806156be93518301019101615410565b6156c6610738565b9081526000602082015290565b91505067ffffffffffffffff6156e7610738565b911681526000602082015290565b6020604051917f181dcf1000000000000000000000000000000000000000000000000000000000828401528051602484015201511515604482015260448152610b6f606482610715565b6040519061574c826106c1565b60606080836000815260006020820152600060408201526000838201520152565b60208183031261022c5780359067ffffffffffffffff821161022c57019060a08282031261022c57604051916157a2836106c1565b6157ab8161120c565b83526157b9602082016102ab565b602084015260408101356157cc81610cd3565b60408401526060810135606084015260808101359067ffffffffffffffff821161022c57019080601f8301121561022c57813561580881610cbb565b926158166040519485610715565b81845260208085019260051b82010192831161022c57602001905b82821061584357505050608082015290565b8135815260209182019101615831565b61585b61573f565b508115615976577f1f3b3aba000000000000000000000000000000000000000000000000000000006001600160e01b031961589f61589985856155b5565b90615562565b160361594c57816158bb926158b392615598565b81019061576d565b9180615936575b61590c5763ffffffff6158d9835163ffffffff1690565b16116158e25790565b7f2e2b0c290000000000000000000000000000000000000000000000000000000060005260046000fd5b7fee433e990000000000000000000000000000000000000000000000000000000060005260046000fd5b506159476118196040840151151590565b6158c2565b7f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fb00b53dc0000000000000000000000000000000000000000000000000000000060005260046000fd5b604080516001600160a01b039283166020820190815292909316908301527fffffffffffffffffffff0000000000000000000000000000000000000000000090921660608201527fffff000000000000000000000000000000000000000000000000000000000000909216608083015290615a1e8160a08101612b38565b51902090565b6001600160a01b03610b6f9116600b615b61565b6001600160a01b03610b6f9116600b615c95565b9063ffffffff615a6993959495615a61612e5a565b5016916155ec565b91825111615a8a5780615a7e575b61590c5790565b50602081015115615a77565b7f4c4fc93a0000000000000000000000000000000000000000000000000000000060005260046000fd5b670de0b6b3a7640000916001600160e01b03615ad092166127a6565b0490565b80548210156128ab5760005260206000200190600090565b91615b06918354906000199060031b92831b921b19161790565b9055565b80548015615b32576000190190615b218282615ad4565b60001982549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001810191806000528260205260406000205492831515600014615c13576000198401848111612753578354936000198501948511612753576000958583615bc497615bb59503615bca575b505050615b0a565b90600052602052604060002090565b55600190565b615bfa615bf491615beb615be1615c0a9588615ad4565b90549060031b1c90565b92839187615ad4565b90615aec565b8590600052602052604060002090565b55388080615bad565b50505050600090565b805490680100000000000000008210156106bc5781615c43916001615b0694018155615ad4565b81939154906000199060031b92831b921b19161790565b600081815260036020526040902054615c8f57615c78816002615c1c565b600254906000526003602052604060002055600190565b50600090565b6000828152600182016020526040902054615ccc5780615cb783600193615c1c565b80549260005201602052604060002055600190565b5050600090565b600081815260036020526040902054908115615ccc5760001982019082821161275357600254926000198401938411612753578383615bc49460009603615d33575b505050615d226002615b0a565b600390600052602052604060002090565b615d22615bf491615d4b615be1615d55956002615ad4565b9283916002615ad4565b55388080615d1556fea164736f6c634300081a000a" - -type FeeQuoterContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewFeeQuoterContract( - address common.Address, - backend bind.ContractBackend, -) (*FeeQuoterContract, error) { - parsed, err := abi.JSON(strings.NewReader(FeeQuoterABI)) - if err != nil { - return nil, err - } - return &FeeQuoterContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *FeeQuoterContract) Address() common.Address { - return c.address -} - -func (c *FeeQuoterContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *FeeQuoterContract) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, args []DestChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyDestChainConfigUpdates", args) -} - -func (c *FeeQuoterContract) UpdatePrices(opts *bind.TransactOpts, args PriceUpdates) (*types.Transaction, error) { - return c.contract.Transact(opts, "updatePrices", args) -} - -func (c *FeeQuoterContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *FeeQuoterContract) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - -func (c *FeeQuoterContract) GetDestChainConfig(opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChainConfig", args) - if err != nil { - var zero DestChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DestChainConfig)).(*DestChainConfig), nil -} - -func (c *FeeQuoterContract) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (TokenTransferFeeConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenTransferFeeConfig", destChainSelector, token) - if err != nil { - var zero TokenTransferFeeConfig - return zero, err - } - return *abi.ConvertType(out[0], new(TokenTransferFeeConfig)).(*TokenTransferFeeConfig), nil -} - -func (c *FeeQuoterContract) GetTokenPrice(opts *bind.CallOpts, args common.Address) (TimestampedPackedUint224, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenPrice", args) - if err != nil { - var zero TimestampedPackedUint224 - return zero, err - } - return *abi.ConvertType(out[0], new(TimestampedPackedUint224)).(*TimestampedPackedUint224), nil -} - -func (c *FeeQuoterContract) GetDestinationChainGasPrice(opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestinationChainGasPrice", args) - if err != nil { - var zero TimestampedPackedUint224 - return zero, err - } - return *abi.ConvertType(out[0], new(TimestampedPackedUint224)).(*TimestampedPackedUint224), nil -} - -func (c *FeeQuoterContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *FeeQuoterContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type DestChainConfig struct { - IsEnabled bool - MaxNumberOfTokensPerMsg uint16 - MaxDataBytes uint32 - MaxPerMsgGasLimit uint32 - DestGasOverhead uint32 - DestGasPerPayloadByteBase uint8 - DestGasPerPayloadByteHigh uint8 - DestGasPerPayloadByteThreshold uint16 - DestDataAvailabilityOverheadGas uint32 - DestGasPerDataAvailabilityByte uint16 - DestDataAvailabilityMultiplierBps uint16 - ChainFamilySelector [4]byte - EnforceOutOfOrder bool - DefaultTokenFeeUSDCents uint16 - DefaultTokenDestGasOverhead uint32 - DefaultTxGasLimit uint32 - GasMultiplierWeiPerEth uint64 - GasPriceStalenessThreshold uint32 - NetworkFeeUSDCents uint32 -} - -type DestChainConfigArgs struct { - DestChainSelector uint64 - DestChainConfig DestChainConfig -} - -type FeeTokenArgs struct { - Token common.Address - PremiumMultiplierWeiPerEth uint64 -} - -type GasPriceUpdate struct { - DestChainSelector uint64 - UsdPerUnitGas *big.Int -} - -type PriceUpdates struct { - TokenPriceUpdates []TokenPriceUpdate - GasPriceUpdates []GasPriceUpdate -} - -type StaticConfig struct { - MaxFeeJuelsPerMsg *big.Int - LinkToken common.Address - TokenPriceStalenessThreshold uint32 -} - -type TimestampedPackedUint224 struct { - Value *big.Int - Timestamp uint32 -} - -type TokenPriceFeedConfig struct { - DataFeedAddress common.Address - TokenDecimals uint8 - IsEnabled bool -} - -type TokenPriceFeedUpdate struct { - SourceToken common.Address - FeedConfig TokenPriceFeedConfig -} - -type TokenPriceUpdate struct { - SourceToken common.Address - UsdPerToken *big.Int -} - -type TokenTransferFeeConfig struct { - MinFeeUSDCents uint32 - MaxFeeUSDCents uint32 - DeciBps uint16 - DestGasOverhead uint32 - DestBytesOverhead uint32 - IsEnabled bool -} - -type TokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - TokenTransferFeeConfigs []TokenTransferFeeConfigSingleTokenArgs -} - -type TokenTransferFeeConfigRemoveArgs struct { - DestChainSelector uint64 - Token common.Address -} - -type TokenTransferFeeConfigSingleTokenArgs struct { - Token common.Address - TokenTransferFeeConfig TokenTransferFeeConfig -} - type ApplyTokenTransferFeeConfigUpdatesArgs struct { - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - TokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs + TokenTransferFeeConfigArgs []gobindings.FeeQuoterTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + TokensToUseDefaultFeeConfigs []gobindings.FeeQuoterTokenTransferFeeConfigRemoveArgs `json:"tokensToUseDefaultFeeConfigs"` } type GetTokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - Token common.Address -} - -type ConstructorArgs struct { - StaticConfig StaticConfig - PriceUpdaters []common.Address - FeeTokens []common.Address - TokenPriceFeeds []TokenPriceFeedUpdate - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - PremiumMultiplierWeiPerEthArgs []FeeTokenArgs - DestChainConfigArgs []DestChainConfigArgs -} - -var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "fee-quoter:deploy", - Version: Version, - Description: "Deploys the FeeQuoter contract", - ContractMetadata: &bind.MetaData{ - ABI: FeeQuoterABI, - Bin: FeeQuoterBin, - }, - BytecodeByTypeAndVersion: map[string]contract.Bytecode{ - cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(FeeQuoterBin), + DestChainSelector uint64 `json:"destChainSelector"` + Token common.Address `json:"token"` +} + +func NewWriteApplyDestChainConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.FeeQuoterDestChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.FeeQuoterDestChainConfigArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-dest-chain-config-updates", + Version: Version, + Description: "Calls applyDestChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.FeeQuoterDestChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) }, - }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyDestChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]DestChainConfigArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-dest-chain-config-updates", - Version: Version, - Description: "Calls applyDestChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, []DestChainConfigArgs], - Validate: func([]DestChainConfigArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args []DestChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyDestChainConfigUpdates(opts, args) - }, -}) - -var UpdatePrices = contract.NewWrite(contract.WriteParams[PriceUpdates, *FeeQuoterContract]{ - Name: "fee-quoter:update-prices", - Version: Version, - Description: "Calls updatePrices on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, PriceUpdates], - Validate: func(PriceUpdates) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args PriceUpdates, - ) (*types.Transaction, error) { - return c.UpdatePrices(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var ApplyTokenTransferFeeConfigUpdates = contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-token-transfer-fee-config-updates", - Version: Version, - Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, ApplyTokenTransferFeeConfigUpdatesArgs], - Validate: func(ApplyTokenTransferFeeConfigUpdatesArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args ApplyTokenTransferFeeConfigUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) - }, -}) - -var GetDestChainConfig = contract.NewRead(contract.ReadParams[uint64, DestChainConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-dest-chain-config", - Version: Version, - Description: "Calls getDestChainConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - return c.GetDestChainConfig(opts, args) - }, -}) - -var GetTokenTransferFeeConfig = contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, TokenTransferFeeConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-token-transfer-fee-config", - Version: Version, - Description: "Calls getTokenTransferFeeConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (TokenTransferFeeConfig, error) { - return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) - }, -}) - -var GetTokenPrice = contract.NewRead(contract.ReadParams[common.Address, TimestampedPackedUint224, *FeeQuoterContract]{ - Name: "fee-quoter:get-token-price", - Version: Version, - Description: "Calls getTokenPrice on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args common.Address) (TimestampedPackedUint224, error) { - return c.GetTokenPrice(opts, args) - }, -}) - -var GetDestinationChainGasPrice = contract.NewRead(contract.ReadParams[uint64, TimestampedPackedUint224, *FeeQuoterContract]{ - Name: "fee-quoter:get-destination-chain-gas-price", - Version: Version, - Description: "Calls getDestinationChainGasPrice on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - return c.GetDestinationChainGasPrice(opts, args) - }, -}) - -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *FeeQuoterContract]{ - Name: "fee-quoter:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args []gobindings.FeeQuoterDestChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyDestChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteUpdatePrices(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.InternalPriceUpdates], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.InternalPriceUpdates, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:update-prices", + Version: Version, + Description: "Calls updatePrices on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.InternalPriceUpdates) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.InternalPriceUpdates, + ) (*types.Transaction, error) { + return c.UpdatePrices(opts, args) + }, + }) +} + +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} + +func NewWriteApplyTokenTransferFeeConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[ApplyTokenTransferFeeConfigUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-token-transfer-fee-config-updates", + Version: Version, + Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args ApplyTokenTransferFeeConfigUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args ApplyTokenTransferFeeConfigUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) + }, + }) +} + +func NewReadGetDestChainConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.FeeQuoterDestChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.FeeQuoterDestChainConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-dest-chain-config", + Version: Version, + Description: "Calls getDestChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.FeeQuoterDestChainConfig, error) { + return c.GetDestChainConfig(opts, args) + }, + }) +} + +func NewReadGetTokenTransferFeeConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[GetTokenTransferFeeConfigArgs], gobindings.FeeQuoterTokenTransferFeeConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, gobindings.FeeQuoterTokenTransferFeeConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-transfer-fee-config", + Version: Version, + Description: "Calls getTokenTransferFeeConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (gobindings.FeeQuoterTokenTransferFeeConfig, error) { + return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) + }, + }) +} + +func NewReadGetTokenPrice(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[common.Address, gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-price", + Version: Version, + Description: "Calls getTokenPrice on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args common.Address) (gobindings.InternalTimestampedPackedUint224, error) { + return c.GetTokenPrice(opts, args) + }, + }) +} + +func NewReadGetDestinationChainGasPrice(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-destination-chain-gas-price", + Version: Version, + Description: "Calls getDestinationChainGasPrice on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.InternalTimestampedPackedUint224, error) { + return c.GetDestinationChainGasPrice(opts, args) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.FeeQuoterStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.FeeQuoterStaticConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) (gobindings.FeeQuoterStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetAllAuthorizedCallers(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} + +func NewReadGetFeeTokens(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-fee-tokens", + Version: Version, + Description: "Calls getFeeTokens on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetFeeTokens(opts) + }, + }) +} + +func NewReadGetTokenPrices(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], []gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[[]common.Address, []gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-prices", + Version: Version, + Description: "Calls getTokenPrices on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args []common.Address) ([]gobindings.InternalTimestampedPackedUint224, error) { + return c.GetTokenPrices(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_0/operations/offramp/offramp.go b/chains/evm/deployment/v1_6_0/operations/offramp/offramp.go index 0e7366d245..8d8628d5db 100644 --- a/chains/evm/deployment/v1_6_0/operations/offramp/offramp.go +++ b/chains/evm/deployment/v1_6_0/operations/offramp/offramp.go @@ -3,248 +3,138 @@ package offramp import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "OffRamp" var Version = semver.MustParse("1.6.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const OffRampABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct OffRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"nonceManager","type":"address","internalType":"address"}]},{"name":"dynamicConfig","type":"tuple","internalType":"struct OffRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"permissionLessExecutionThresholdSeconds","type":"uint32","internalType":"uint32"},{"name":"messageInterceptor","type":"address","internalType":"address"}]},{"name":"sourceChainConfigs","type":"tuple[]","internalType":"struct OffRamp.SourceChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"isRMNVerificationDisabled","type":"bool","internalType":"bool"},{"name":"onRamp","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applySourceChainConfigUpdates","inputs":[{"name":"sourceChainConfigUpdates","type":"tuple[]","internalType":"struct OffRamp.SourceChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"isRMNVerificationDisabled","type":"bool","internalType":"bool"},{"name":"onRamp","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"ccipReceive","inputs":[{"name":"","type":"tuple","internalType":"struct Client.Any2EVMMessage","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"destTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}]}],"outputs":[],"stateMutability":"pure"},{"type":"function","name":"commit","inputs":[{"name":"reportContext","type":"bytes32[2]","internalType":"bytes32[2]"},{"name":"report","type":"bytes","internalType":"bytes"},{"name":"rs","type":"bytes32[]","internalType":"bytes32[]"},{"name":"ss","type":"bytes32[]","internalType":"bytes32[]"},{"name":"rawVs","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"execute","inputs":[{"name":"reportContext","type":"bytes32[2]","internalType":"bytes32[2]"},{"name":"report","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"executeSingleMessage","inputs":[{"name":"message","type":"tuple","internalType":"struct Internal.Any2EVMRampMessage","components":[{"name":"header","type":"tuple","internalType":"struct Internal.RampMessageHeader","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"},{"name":"nonce","type":"uint64","internalType":"uint64"}]},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"address","internalType":"address"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Internal.Any2EVMTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"address","internalType":"address"},{"name":"destGasAmount","type":"uint32","internalType":"uint32"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"}]}]},{"name":"offchainTokenData","type":"bytes[]","internalType":"bytes[]"},{"name":"tokenGasOverrides","type":"uint32[]","internalType":"uint32[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllSourceChainConfigs","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"},{"name":"","type":"tuple[]","internalType":"struct OffRamp.SourceChainConfig[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"isRMNVerificationDisabled","type":"bool","internalType":"bool"},{"name":"onRamp","type":"bytes","internalType":"bytes"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct OffRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"permissionLessExecutionThresholdSeconds","type":"uint32","internalType":"uint32"},{"name":"messageInterceptor","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getExecutionState","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint8","internalType":"enum Internal.MessageExecutionState"}],"stateMutability":"view"},{"type":"function","name":"getLatestPriceSequenceNumber","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getMerkleRoot","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"root","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getSourceChainConfig","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct OffRamp.SourceChainConfig","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"isRMNVerificationDisabled","type":"bool","internalType":"bool"},{"name":"onRamp","type":"bytes","internalType":"bytes"}]}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct OffRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"nonceManager","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"latestConfigDetails","inputs":[{"name":"ocrPluginType","type":"uint8","internalType":"uint8"}],"outputs":[{"name":"ocrConfig","type":"tuple","internalType":"struct MultiOCR3Base.OCRConfig","components":[{"name":"configInfo","type":"tuple","internalType":"struct MultiOCR3Base.ConfigInfo","components":[{"name":"configDigest","type":"bytes32","internalType":"bytes32"},{"name":"F","type":"uint8","internalType":"uint8"},{"name":"n","type":"uint8","internalType":"uint8"},{"name":"isSignatureVerificationEnabled","type":"bool","internalType":"bool"}]},{"name":"signers","type":"address[]","internalType":"address[]"},{"name":"transmitters","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"manuallyExecute","inputs":[{"name":"reports","type":"tuple[]","internalType":"struct Internal.ExecutionReport[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"messages","type":"tuple[]","internalType":"struct Internal.Any2EVMRampMessage[]","components":[{"name":"header","type":"tuple","internalType":"struct Internal.RampMessageHeader","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"},{"name":"nonce","type":"uint64","internalType":"uint64"}]},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"address","internalType":"address"},{"name":"gasLimit","type":"uint256","internalType":"uint256"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Internal.Any2EVMTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"address","internalType":"address"},{"name":"destGasAmount","type":"uint32","internalType":"uint32"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"}]}]},{"name":"offchainTokenData","type":"bytes[][]","internalType":"bytes[][]"},{"name":"proofs","type":"bytes32[]","internalType":"bytes32[]"},{"name":"proofFlagBits","type":"uint256","internalType":"uint256"}]},{"name":"gasLimitOverrides","type":"tuple[][]","internalType":"struct OffRamp.GasLimitOverride[][]","components":[{"name":"receiverExecutionGasLimit","type":"uint256","internalType":"uint256"},{"name":"tokenGasOverrides","type":"uint32[]","internalType":"uint32[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct OffRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"permissionLessExecutionThresholdSeconds","type":"uint32","internalType":"uint32"},{"name":"messageInterceptor","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setOCR3Configs","inputs":[{"name":"ocrConfigArgs","type":"tuple[]","internalType":"struct MultiOCR3Base.OCRConfigArgs[]","components":[{"name":"configDigest","type":"bytes32","internalType":"bytes32"},{"name":"ocrPluginType","type":"uint8","internalType":"uint8"},{"name":"F","type":"uint8","internalType":"uint8"},{"name":"isSignatureVerificationEnabled","type":"bool","internalType":"bool"},{"name":"signers","type":"address[]","internalType":"address[]"},{"name":"transmitters","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AlreadyAttempted","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"CommitReportAccepted","inputs":[{"name":"blessedMerkleRoots","type":"tuple[]","indexed":false,"internalType":"struct Internal.MerkleRoot[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"maxSeqNr","type":"uint64","internalType":"uint64"},{"name":"merkleRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"unblessedMerkleRoots","type":"tuple[]","indexed":false,"internalType":"struct Internal.MerkleRoot[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"maxSeqNr","type":"uint64","internalType":"uint64"},{"name":"merkleRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"priceUpdates","type":"tuple","indexed":false,"internalType":"struct Internal.PriceUpdates","components":[{"name":"tokenPriceUpdates","type":"tuple[]","internalType":"struct Internal.TokenPriceUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"usdPerToken","type":"uint224","internalType":"uint224"}]},{"name":"gasPriceUpdates","type":"tuple[]","internalType":"struct Internal.GasPriceUpdate[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"usdPerUnitGas","type":"uint224","internalType":"uint224"}]}]}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"ocrPluginType","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"configDigest","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"signers","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"transmitters","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"F","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct OffRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"permissionLessExecutionThresholdSeconds","type":"uint32","internalType":"uint32"},{"name":"messageInterceptor","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"ExecutionStateChanged","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"messageId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"messageHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"state","type":"uint8","indexed":false,"internalType":"enum Internal.MessageExecutionState"},{"name":"returnData","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"gasUsed","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RootRemoved","inputs":[{"name":"root","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"SkippedAlreadyExecutedMessage","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"SkippedReportExecution","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"SourceChainConfigSet","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sourceConfig","type":"tuple","indexed":false,"internalType":"struct OffRamp.SourceChainConfig","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"isRMNVerificationDisabled","type":"bool","internalType":"bool"},{"name":"onRamp","type":"bytes","internalType":"bytes"}]}],"anonymous":false},{"type":"event","name":"SourceChainSelectorAdded","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"StaticConfigSet","inputs":[{"name":"staticConfig","type":"tuple","indexed":false,"internalType":"struct OffRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"nonceManager","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"Transmitted","inputs":[{"name":"ocrPluginType","type":"uint8","indexed":true,"internalType":"uint8"},{"name":"configDigest","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"sequenceNumber","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"error","name":"CanOnlySelfCall","inputs":[]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CommitOnRampMismatch","inputs":[{"name":"reportOnRamp","type":"bytes","internalType":"bytes"},{"name":"configOnRamp","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"ConfigDigestMismatch","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"actual","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"EmptyBatch","inputs":[]},{"type":"error","name":"EmptyReport","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ExecutionError","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"ForkedChain","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"actual","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InsufficientGasToCompleteTx","inputs":[{"name":"err","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidConfig","inputs":[{"name":"errorType","type":"uint8","internalType":"enum MultiOCR3Base.InvalidConfigErrorType"}]},{"type":"error","name":"InvalidDataLength","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"got","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidInterval","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"min","type":"uint64","internalType":"uint64"},{"name":"max","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidManualExecutionGasLimit","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"newLimit","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidManualExecutionTokenGasOverride","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"tokenIndex","type":"uint256","internalType":"uint256"},{"name":"oldLimit","type":"uint256","internalType":"uint256"},{"name":"tokenGasOverride","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidMessageDestChainSelector","inputs":[{"name":"messageDestChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidNewState","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"},{"name":"newState","type":"uint8","internalType":"enum Internal.MessageExecutionState"}]},{"type":"error","name":"InvalidOnRampUpdate","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidProof","inputs":[]},{"type":"error","name":"InvalidRoot","inputs":[]},{"type":"error","name":"LeavesCannotBeEmpty","inputs":[]},{"type":"error","name":"ManualExecutionGasAmountCountMismatch","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ManualExecutionGasLimitMismatch","inputs":[]},{"type":"error","name":"ManualExecutionNotYetEnabled","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"MessageValidationError","inputs":[{"name":"errorReason","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonUniqueSignatures","inputs":[]},{"type":"error","name":"NotACompatiblePool","inputs":[{"name":"notPool","type":"address","internalType":"address"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OracleCannotBeZeroAddress","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReceiverError","inputs":[{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"ReleaseOrMintBalanceMismatch","inputs":[{"name":"amountReleased","type":"uint256","internalType":"uint256"},{"name":"balancePre","type":"uint256","internalType":"uint256"},{"name":"balancePost","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"RootAlreadyCommitted","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"merkleRoot","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"RootBlessingMismatch","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"merkleRoot","type":"bytes32","internalType":"bytes32"},{"name":"isBlessed","type":"bool","internalType":"bool"}]},{"type":"error","name":"RootNotCommitted","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"SignatureVerificationNotAllowedInExecutionPlugin","inputs":[]},{"type":"error","name":"SignatureVerificationRequiredInCommitPlugin","inputs":[]},{"type":"error","name":"SignaturesOutOfRegistration","inputs":[]},{"type":"error","name":"SourceChainNotEnabled","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"SourceChainSelectorMismatch","inputs":[{"name":"reportSourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageSourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"StaleCommitReport","inputs":[]},{"type":"error","name":"StaticConfigCannotBeChanged","inputs":[{"name":"ocrPluginType","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"TokenDataMismatch","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"TokenHandlingError","inputs":[{"name":"target","type":"address","internalType":"address"},{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"UnauthorizedSigner","inputs":[]},{"type":"error","name":"UnauthorizedTransmitter","inputs":[]},{"type":"error","name":"UnexpectedTokenData","inputs":[]},{"type":"error","name":"WrongMessageLength","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"actual","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"WrongNumberOfSignatures","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroChainSelectorNotAllowed","inputs":[]}]` -const OffRampBin = "0x610140806040523461084b57616654803803809161001d8285610881565b8339810190808203610120811261084b5760a0811261084b5760405161004281610866565b61004b836108a4565b8152602083015161ffff8116810361084b57602082019081526040840151906001600160a01b038216820361084b576040830191825261008d606086016108b8565b926060810193845260606100a3608088016108b8565b6080830190815295609f19011261084b5760405194606086016001600160401b03811187821017610850576040526100dd60a088016108b8565b865260c08701519463ffffffff8616860361084b576020870195865261010560e089016108b8565b6040880190815261010089015190986001600160401b03821161084b570189601f8201121561084b578051996001600160401b038b11610850578a60051b916040519b6101568d6020860190610881565b8c526020808d01938201019082821161084b5760208101935b82851061073a575050505050331561072957600180546001600160a01b031916331790554660805284516001600160a01b0316158015610717575b8015610705575b6106e35782516001600160401b0316156106f45782516001600160401b0390811660a090815286516001600160a01b0390811660c0528351811660e0528451811661010052865161ffff90811661012052604080519751909416875296519096166020860152955185169084015251831660608301525190911660808201527fb0fa1fb01508c5097c502ad056fd77018870c9be9a86d9e56b6b471862d7c5b79190a181516001600160a01b0316156106e357905160048054835163ffffffff60a01b60a09190911b166001600160a01b039384166001600160c01b03199092168217179091558351600580549184166001600160a01b031990921691909117905560408051918252925163ffffffff166020820152925116908201527fa1c15688cb2c24508e158f6942b9276c6f3028a85e1af8cf3fff0c3ff3d5fc8d90606090a160005b8151811015610656576020600582901b8301810151908101516001600160401b031690600082156106475781516001600160a01b0316156105ae57828152600860205260408120916080810151600184019261035384546108d9565b6105e8578454600160a81b600160e81b031916600160a81b1785556040518681527ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb990602090a15b815180159081156105bd575b506105ae578151916001600160401b03831161059a576103c785546108d9565b601f8111610555575b50602091601f84116001146104d65760ff948460019a9998956104c2956000805160206166348339815191529995606095926104cb575b5050600019600383901b1c1916908b1b1783555b604081015115158554908760a01b9060a01b16908760a01b1916178555898060a01b038151168a8060a01b0319865416178555015115158354908560e81b9060e81b16908560e81b191617835561047186610996565b506040519384936020855254898060a01b0381166020860152818160a01c1615156040860152898060401b038160a81c16606086015260e81c161515608084015260a08084015260c0830190610913565b0390a2016102f7565b015190503880610407565b9190601f198416868452828420935b81811061053d5750946001856104c2956000805160206166348339815191529995606095849e9d9c9960ff9b10610524575b505050811b01835561041b565b015160001960f88460031b161c19169055388080610517565b929360206001819287860151815501950193016104e5565b85835260208320601f850160051c81019160208610610590575b601f0160051c01905b81811061058557506103d0565b838155600101610578565b909150819061056f565b634e487b7160e01b82526041600452602482fd5b6342bcdf7f60e11b8152600490fd5b905060208301206040516020810190838252602081526105de604082610881565b51902014386103a7565b845460a81c6001600160401b03166001141580610619575b1561039b57632105803760e11b81526004869052602490fd5b506040516106328161062b8188610913565b0382610881565b60208151910120825160208401201415610600565b63c656089560e01b8152600490fd5b604051615c0a9081610a2a82396080518161327e015260a05181818161019f0152614367015260c0518181816101f501528181612ebd0152818161379201528181613a660152614301015260e0518181816102240152614b63015261010051818181610253015261472c0152610120518181816101c6015281816121b101528181614c5601526158bb0152f35b6342bcdf7f60e11b60005260046000fd5b63c656089560e01b60005260046000fd5b5081516001600160a01b0316156101b1565b5080516001600160a01b0316156101aa565b639b15e16f60e01b60005260046000fd5b84516001600160401b03811161084b57820160a0818603601f19011261084b576040519061076782610866565b60208101516001600160a01b038116810361084b57825261078a604082016108a4565b602083015261079b606082016108cc565b60408301526107ac608082016108cc565b606083015260a08101516001600160401b03811161084b57602091010185601f8201121561084b5780516001600160401b03811161085057604051916107fc601f8301601f191660200184610881565b818352876020838301011161084b5760005b828110610836575050918160006020809694958196010152608082015281520194019361016f565b8060208092840101518282870101520161080e565b600080fd5b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761085057604052565b601f909101601f19168101906001600160401b0382119082101761085057604052565b51906001600160401b038216820361084b57565b51906001600160a01b038216820361084b57565b5190811515820361084b57565b90600182811c92168015610909575b60208310146108f357565b634e487b7160e01b600052602260045260246000fd5b91607f16916108e8565b60009291815491610923836108d9565b8083529260018116908115610979575060011461093f57505050565b60009081526020812093945091925b83831061095f575060209250010190565b60018160209294939454838587010152019101919061094e565b915050602093945060ff929192191683830152151560051b010190565b80600052600760205260406000205415600014610a235760065468010000000000000000811015610850576001810180600655811015610a0d577ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0181905560065460009182526007602052604090912055600190565b634e487b7160e01b600052603260045260246000fd5b5060009056fe6080604052600436101561001257600080fd5b60003560e01c806306285c6914610157578063181f5a77146101525780633f4b04aa1461014d5780635215505b146101485780635e36480c146101435780635e7bb0081461013e57806360987c20146101395780636f9e320f146101345780637437ff9f1461012f57806379ba50971461012a57806385572ffb146101255780638da5cb5b14610120578063c673e5841461011b578063ccd37ba314610116578063cd19723714610111578063de5e0b9a1461010c578063e9d68a8e14610107578063f2fde38b14610102578063f58e03fc146100fd5763f716f99f146100f857600080fd5b6118ae565b611791565b611706565b611661565b6115c5565b611467565b611408565b611343565b61125b565b611225565b6111a5565b611105565b610f90565b610f15565b610d0e565b610729565b6105ba565b61049e565b61043f565b61016c565b600091031261016757565b600080fd5b34610167576000366003190112610167576101856119e9565b506102cd604051610195816102e7565b6001600160401b037f000000000000000000000000000000000000000000000000000000000000000016815261ffff7f00000000000000000000000000000000000000000000000000000000000000001660208201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660608201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660808201526040519182918291909160806001600160a01b038160a08401956001600160401b03815116855261ffff6020820151166020860152826040820151166040860152826060820151166060860152015116910152565b0390f35b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761030257604052565b6102d1565b604081019081106001600160401b0382111761030257604052565b606081019081106001600160401b0382111761030257604052565b608081019081106001600160401b0382111761030257604052565b90601f801991011681019081106001600160401b0382111761030257604052565b6040519061038860c083610358565b565b6040519061038860a083610358565b60405190610388608083610358565b6040519061038861010083610358565b60405190610388604083610358565b6001600160401b03811161030257601f01601f191660200190565b604051906103f1602083610358565b60008252565b60005b83811061040a5750506000910152565b81810151838201526020016103fa565b90602091610433815180928185528580860191016103f7565b601f01601f1916010190565b34610167576000366003190112610167576102cd60408051906104628183610358565b600d82527f4f666652616d7020312e362e300000000000000000000000000000000000000060208301525191829160208352602083019061041a565b346101675760003660031901126101675760206001600160401b03600b5416604051908152f35b9060a06080610516936001600160a01b0381511684526020810151151560208501526001600160401b036040820151166040850152606081015115156060850152015191816080820152019061041a565b90565b6040810160408252825180915260206060830193019060005b81811061059b575050506020818303910152815180825260208201916020808360051b8301019401926000915b83831061056e57505050505090565b909192939460208061058c600193601f1986820301875289516104c5565b9701930193019193929061055f565b82516001600160401b0316855260209485019490920191600101610532565b34610167576000366003190112610167576006546105d781610771565b906105e56040519283610358565b808252601f196105f482610771565b0160005b8181106106b657505061060a81611a42565b9060005b8181106106265750506102cd60405192839283610519565b8061065c6106446106386001946141e8565b6001600160401b031690565b61064e8387611a9c565b906001600160401b03169052565b61069a61069561067c61066f8488611a9c565b516001600160401b031690565b6001600160401b03166000526008602052604060002090565b611b88565b6106a48287611a9c565b526106af8186611a9c565b500161060e565b6020906106c1611a14565b828287010152016105f8565b600435906001600160401b038216820361016757565b35906001600160401b038216820361016757565b634e487b7160e01b600052602160045260246000fd5b6004111561071757565b6106f7565b9060048210156107175752565b34610167576040366003190112610167576107426106cd565b602435906001600160401b03821682036101675760209161076291611c31565b61076f604051809261071c565bf35b6001600160401b0381116103025760051b60200190565b91908260a0910312610167576040516107a0816102e7565b60806107e5818395803585526107b8602082016106e3565b60208601526107c9604082016106e3565b60408601526107da606082016106e3565b6060860152016106e3565b910152565b9291926107f6826103c7565b916108046040519384610358565b829481845281830111610167578281602093846000960137010152565b9080601f8301121561016757816020610516933591016107ea565b6001600160a01b0381160361016757565b35906103888261083c565b63ffffffff81160361016757565b359061038882610858565b81601f820112156101675780359061088882610771565b926108966040519485610358565b82845260208085019360051b830101918183116101675760208101935b8385106108c257505050505090565b84356001600160401b03811161016757820160a0818503601f19011261016757604051916108ef836102e7565b60208201356001600160401b0381116101675785602061091192850101610821565b835260408201356109218161083c565b602084015261093260608301610866565b60408401526080820135926001600160401b0384116101675760a08361095f886020809881980101610821565b6060840152013560808201528152019401936108b3565b919091610140818403126101675761098c610379565b926109978183610788565b845260a08201356001600160401b03811161016757816109b8918401610821565b602085015260c08201356001600160401b03811161016757816109dc918401610821565b60408501526109ed60e0830161084d565b606085015261010082013560808501526101208201356001600160401b03811161016757610a1b9201610871565b60a0830152565b9080601f83011215610167578135610a3981610771565b92610a476040519485610358565b81845260208085019260051b820101918383116101675760208201905b838210610a7357505050505090565b81356001600160401b03811161016757602091610a9587848094880101610976565b815201910190610a64565b81601f8201121561016757803590610ab782610771565b92610ac56040519485610358565b82845260208085019360051b830101918183116101675760208101935b838510610af157505050505090565b84356001600160401b03811161016757820183603f82011215610167576020810135610b1c81610771565b91610b2a6040519384610358565b8183526020808085019360051b83010101918683116101675760408201905b838210610b63575050509082525060209485019401610ae2565b81356001600160401b03811161016757602091610b878a8480809589010101610821565b815201910190610b49565b929190610b9e81610771565b93610bac6040519586610358565b602085838152019160051b810192831161016757905b828210610bce57505050565b8135815260209182019101610bc2565b9080601f830112156101675781602061051693359101610b92565b81601f8201121561016757803590610c1082610771565b92610c1e6040519485610358565b82845260208085019360051b830101918183116101675760208101935b838510610c4a57505050505090565b84356001600160401b03811161016757820160a0818503601f19011261016757610c7261038a565b91610c7f602083016106e3565b835260408201356001600160401b03811161016757856020610ca392850101610a22565b602084015260608201356001600160401b03811161016757856020610cca92850101610aa0565b60408401526080820135926001600160401b0384116101675760a083610cf7886020809881980101610bde565b606084015201356080820152815201940193610c3b565b34610167576040366003190112610167576004356001600160401b03811161016757610d3e903690600401610bf9565b6024356001600160401b038111610167573660238201121561016757806004013591610d6983610771565b91610d776040519384610358565b8383526024602084019460051b820101903682116101675760248101945b828610610da857610da68585611c79565b005b85356001600160401b03811161016757820136604382011215610167576024810135610dd381610771565b91610de16040519384610358565b818352602060248185019360051b83010101903682116101675760448101925b828410610e1b575050509082525060209586019501610d95565b83356001600160401b038111610167576024908301016040601f1982360301126101675760405190610e4c82610307565b6020810135825260408101356001600160401b03811161016757602091010136601f8201121561016757803590610e8282610771565b91610e906040519384610358565b80835260208084019160051b8301019136831161016757602001905b828210610ecb5750505091816020938480940152815201930192610e01565b602080918335610eda81610858565b815201910190610eac565b9181601f84011215610167578235916001600160401b038311610167576020808501948460051b01011161016757565b34610167576060366003190112610167576004356001600160401b03811161016757610f45903690600401610976565b6024356001600160401b03811161016757610f64903690600401610ee5565b91604435926001600160401b03841161016757610f88610da6943690600401610ee5565b939092612089565b34610167576060366003190112610167576000604051610faf81610322565b600435610fbb8161083c565b8152602435610fc981610858565b6020820190815260443590610fdd8261083c565b60408301918252610fec613534565b6001600160a01b03835116156110f657916110b86001600160a01b036110f0937fa1c15688cb2c24508e158f6942b9276c6f3028a85e1af8cf3fff0c3ff3d5fc8d95611051838651166001600160a01b03166001600160a01b03196004541617600455565b517fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006004549260a01b1691161760045551166001600160a01b03166001600160a01b03196005541617600555565b6040519182918291909160406001600160a01b0381606084019582815116855263ffffffff6020820151166020860152015116910152565b0390a180f35b6342bcdf7f60e11b8452600484fd5b346101675760003660031901126101675760006040805161112581610322565b82815282602082015201526102cd60405161113f81610322565b63ffffffff6004546001600160a01b038116835260a01c1660208201526001600160a01b036005541660408201526040519182918291909160406001600160a01b0381606084019582815116855263ffffffff6020820151166020860152015116910152565b34610167576000366003190112610167576000546001600160a01b0381163303611214576001600160a01b0319600154913382841617600155166000556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b63015aa1e360e11b60005260046000fd5b34610167576020366003190112610167576004356001600160401b0381116101675760a090600319903603011261016757600080fd5b346101675760003660031901126101675760206001600160a01b0360015416604051908152f35b6004359060ff8216820361016757565b359060ff8216820361016757565b906020808351928381520192019060005b8181106112be5750505090565b82516001600160a01b03168452602093840193909201916001016112b1565b906105169160208152606082518051602084015260ff602082015116604084015260ff60408201511682840152015115156080820152604061132e602084015160c060a085015260e08401906112a0565b9201519060c0601f19828503019101526112a0565b346101675760203660031901126101675760ff61135e611282565b60606040805161136d81610322565b81516113788161033d565b6000815260006020820152600083820152600084820152815282602082015201521660005260026020526102cd604060002060036113f7604051926113bc84610322565b6113c581612366565b84526040516113e2816113db816002860161239f565b0382610358565b60208501526113db604051809481930161239f565b6040820152604051918291826112dd565b34610167576040366003190112610167576114216106cd565b6001600160401b036024359116600052600a6020526040600020906000526020526020604060002054604051908152f35b8015150361016757565b359061038882611452565b34610167576020366003190112610167576004356001600160401b0381116101675736602382011215610167578060040135906114a382610771565b906114b16040519283610358565b8282526024602083019360051b820101903682116101675760248101935b8285106114df57610da6846123f6565b84356001600160401b03811161016757820160a06023198236030112610167576040519161150c836102e7565b602482013561151a8161083c565b8352611528604483016106e3565b6020840152606482013561153b81611452565b6040840152608482013561154e81611452565b606084015260a4820135926001600160401b0384116101675761157b602094936024869536920101610821565b60808201528152019401936114cf565b9060049160441161016757565b9181601f84011215610167578235916001600160401b038311610167576020838186019501011161016757565b346101675760c0366003190112610167576115df3661158b565b6044356001600160401b038111610167576115fe903690600401611598565b6064929192356001600160401b03811161016757611620903690600401610ee5565b60843594916001600160401b03861161016757611644610da6963690600401610ee5565b94909360a43596612cb9565b9060206105169281815201906104c5565b34610167576020366003190112610167576001600160401b036116826106cd565b61168a611a14565b501660005260086020526102cd60406000206116f56001604051926116ae846102e7565b6116ef60ff82546001600160a01b0381168752818160a01c16151560208801526001600160401b038160a81c16604088015260e81c16606086019015159052565b01611b6d565b608082015260405191829182611650565b34610167576020366003190112610167576001600160a01b0360043561172b8161083c565b611733613534565b1633811461178057806001600160a01b031960005416176000556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b636d6c4ee560e11b60005260046000fd5b34610167576060366003190112610167576117ab3661158b565b6044356001600160401b038111610167576117ca903690600401611598565b91828201602083820312610167578235906001600160401b038211610167576117f4918401610bf9565b6040519060206118048184610358565b60008352601f19810160005b81811061183857505050610da69491611828916132bf565b611830612f33565b928392613bb0565b60608582018401528201611810565b9080601f8301121561016757813561185e81610771565b9261186c6040519485610358565b81845260208085019260051b82010192831161016757602001905b8282106118945750505090565b6020809183356118a38161083c565b815201910190611887565b34610167576020366003190112610167576004356001600160401b0381116101675736602382011215610167578060040135906118ea82610771565b906118f86040519283610358565b8282526024602083019360051b820101903682116101675760248101935b82851061192657610da684612f4f565b84356001600160401b03811161016757820160c060231982360301126101675761194e610379565b916024820135835261196260448301611292565b602084015261197360648301611292565b60408401526119846084830161145c565b606084015260a48201356001600160401b038111610167576119ac9060243691850101611847565b608084015260c4820135926001600160401b038411610167576119d9602094936024869536920101611847565b60a0820152815201940193611916565b604051906119f6826102e7565b60006080838281528260208201528260408201528260608201520152565b60405190611a21826102e7565b60606080836000815260006020820152600060408201526000838201520152565b90611a4c82610771565b611a596040519182610358565b8281528092611a6a601f1991610771565b0190602036910137565b634e487b7160e01b600052603260045260246000fd5b805115611a975760200190565b611a74565b8051821015611a975760209160051b010190565b90600182811c92168015611ae0575b6020831014611aca57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611abf565b60009291815491611afa83611ab0565b8083529260018116908115611b505750600114611b1657505050565b60009081526020812093945091925b838310611b36575060209250010190565b600181602092949394548385870101520191019190611b25565b915050602093945060ff929192191683830152151560051b010190565b90610388611b819260405193848092611aea565b0383610358565b9060016080604051611b99816102e7565b611bef819560ff81546001600160a01b0381168552818160a01c16151560208601526001600160401b038160a81c16604086015260e81c1615156060840152611be86040518096819301611aea565b0384610358565b0152565b634e487b7160e01b600052601160045260246000fd5b908160051b9180830460201490151715611c1f57565b611bf3565b91908203918211611c1f57565b611c3d82607f92613238565b9116906801fffffffffffffffe6001600160401b0383169260011b169180830460021490151715611c1f576003911c1660048110156107175790565b611c8161327c565b805182518103611e7c5760005b818110611ca157505090610388916132bf565b611cab8184611a9c565b516020810190815151611cbe8488611a9c565b519283518203611e7c5790916000925b808410611ce2575050505050600101611c8e565b91949398611cf4848b98939598611a9c565b515198611d02888851611a9c565b519980611e33575b5060a08a01988b6020611d208b8d515193611a9c565b5101515103611df25760005b8a5151811015611ddd57611d68611d5f611d558f6020611d4d8f8793611a9c565b510151611a9c565b5163ffffffff1690565b63ffffffff1690565b8b81611d79575b5050600101611d2c565b611d5f6040611d8c85611d989451611a9c565b51015163ffffffff1690565b90818110611da757508b611d6f565b8d51516040516348e617b360e01b81526004810191909152602481019390935260448301919091526064820152608490fd5b0390fd5b50985098509893949095600101929091611cce565b611e2f8b51611e0d606082519201516001600160401b031690565b6370a193fd60e01b6000526004919091526001600160401b0316602452604490565b6000fd5b60808b0151811015611d0a57611e2f908b611e5588516001600160401b031690565b905151633a98d46360e11b6000526001600160401b03909116600452602452604452606490565b6320f8fd5960e21b60005260046000fd5b60405190611e9a82610307565b60006020838281520152565b60405190611eb5602083610358565b600080835282815b828110611ec957505050565b602090611ed4611e8d565b82828501015201611ebd565b805182526001600160401b0360208201511660208301526080611f27611f15604084015160a0604087015260a086019061041a565b6060840151858203606087015261041a565b9101519160808183039101526020808351928381520192019060005b818110611f505750505090565b825180516001600160a01b031685526020908101518186015260409094019390920191600101611f43565b906020610516928181520190611ee0565b6040513d6000823e3d90fd5b3d15611fc3573d90611fa9826103c7565b91611fb76040519384610358565b82523d6000602084013e565b606090565b90602061051692818152019061041a565b9091606082840312610167578151611ff081611452565b9260208301516001600160401b0381116101675783019080601f830112156101675781519161201e836103c7565b9161202c6040519384610358565b838352602084830101116101675760409261204d91602080850191016103f7565b92015190565b9293606092959461ffff6120776001600160a01b0394608088526080880190611ee0565b97166020860152604085015216910152565b929093913033036123555761209c611ea6565b9460a0850151805161230e575b50505050508051916120c7602084519401516001600160401b031690565b9060208301519160408401926120f48451926120e161038a565b9788526001600160401b03166020880152565b6040860152606085015260808401526001600160a01b0361211d6005546001600160a01b031690565b1680612291575b5051511580612285575b801561226f575b8015612246575b612242576121da918161217f61217361216661067c602060009751016001600160401b0390511690565b546001600160a01b031690565b6001600160a01b031690565b908361219a606060808401519301516001600160a01b031690565b604051633cf9798360e01b815296879586948593917f00000000000000000000000000000000000000000000000000000000000000009060048601612053565b03925af190811561223d57600090600092612216575b50156121f95750565b6040516302a35ba360e21b8152908190611dd99060048301611fc8565b905061223591503d806000833e61222d8183610358565b810190611fd9565b5090386121f0565b611f8c565b5050565b5061226a61226661226160608401516001600160a01b031690565b6134e6565b1590565b61213c565b5060608101516001600160a01b03163b15612135565b5060808101511561212e565b803b1561016757600060405180926308d450a160e01b82528183816122b98a60048301611f7b565b03925af190816122f3575b506122ed57611dd96122d4611f98565b6040516309c2532560e01b815291829160048301611fc8565b38612124565b80612302600061230893610358565b8061015c565b386122c4565b859650602061234a96015161232d60608901516001600160a01b031690565b9061234460208a51016001600160401b0390511690565b926133cd565b9038808080806120a9565b6306e34e6560e31b60005260046000fd5b906040516123738161033d565b606060ff600183958054855201548181166020850152818160081c16604085015260101c161515910152565b906020825491828152019160005260206000209060005b8181106123c35750505090565b82546001600160a01b03168452602090930192600192830192016123b6565b90610388611b81926040519384809261239f565b6123fe613534565b60005b8151811015612242576124148183611a9c565b519061242a60208301516001600160401b031690565b6001600160401b0381169081156126c05761245261217361217386516001600160a01b031690565b1561262b57612474816001600160401b03166000526008602052604060002090565b60808501519060018101926124898454611ab0565b612652576124fc7ff4c1390c70e5c0f491ae1ccbc06f9117cbbadf2767b247b3bc203280f24c0fb9916124e284750100000000000000000000000000000000000000000067ffffffffffffffff60a81b19825416179055565b6040516001600160401b0390911681529081906020820190565b0390a15b8151801590811561263c575b5061262b5761260c6125d7606060019861254a612622967fbd1ab25a0ff0a36a588597ba1af11e30f3f210de8b9e818cc9bbc457c94c8d8c986135d6565b6125a061255a6040830151151590565b86547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016178655565b6125d06125b482516001600160a01b031690565b86906001600160a01b03166001600160a01b0319825416179055565b0151151590565b82547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690151560e81b60ff60e81b16178255565b612615846159ce565b50604051918291826136a7565b0390a201612401565b6342bcdf7f60e11b60005260046000fd5b9050602083012061264b613559565b143861250c565b60016001600160401b0361267184546001600160401b039060a81c1690565b161415806126a1575b6126845750612500565b632105803760e11b6000526001600160401b031660045260246000fd5b506126ab84611b6d565b6020815191012083516020850120141561267a565b63c656089560e01b60005260046000fd5b35906001600160e01b038216820361016757565b81601f82011215610167578035906126fc82610771565b9261270a6040519485610358565b82845260208085019360061b8301019181831161016757602001925b828410612734575050505090565b604084830312610167576020604091825161274e81610307565b612757876106e3565b81526127648388016126d1565b83820152815201930192612726565b9190604083820312610167576040519061278c82610307565b819380356001600160401b03811161016757810182601f820112156101675780356127b681610771565b916127c46040519384610358565b81835260208084019260061b8201019085821161016757602001915b81831061280d5750505083526020810135916001600160401b038311610167576020926107e592016126e5565b604083870312610167576020604091825161282781610307565b85356128328161083c565b815261283f8387016126d1565b838201528152019201916127e0565b81601f820112156101675780359061286582610771565b926128736040519485610358565b82845260208085019360051b830101918183116101675760208101935b83851061289f57505050505090565b84356001600160401b03811161016757820160a0818503601f19011261016757604051916128cc836102e7565b6128d8602083016106e3565b83526040820135926001600160401b0384116101675760a083612902886020809881980101610821565b85840152612912606082016106e3565b6040840152612923608082016106e3565b606084015201356080820152815201940193612890565b81601f820112156101675780359061295182610771565b9261295f6040519485610358565b82845260208085019360061b8301019181831161016757602001925b828410612989575050505090565b60408483031261016757602060409182516129a381610307565b86358152828701358382015281520193019261297b565b602081830312610167578035906001600160401b0382116101675701608081830312610167576129e8610399565b9181356001600160401b0381116101675781612a05918401612773565b835260208201356001600160401b0381116101675781612a2691840161284e565b602084015260408201356001600160401b0381116101675781612a4a91840161284e565b604084015260608201356001600160401b03811161016757612a6c920161293a565b606082015290565b9080602083519182815201916020808360051b8301019401926000915b838310612aa057505050505090565b9091929394602080600192601f198582030186528851906001600160401b038251168152608080612ade8585015160a08786015260a085019061041a565b936001600160401b0360408201511660408501526001600160401b036060820151166060850152015191015297019301930191939290612a91565b916001600160a01b03612b3a92168352606060208401526060830190612a74565b9060408183039101526020808351928381520192019060005b818110612b605750505090565b8251805185526020908101518186015260409094019390920191600101612b53565b6084019081608411611c1f57565b60a001908160a011611c1f57565b91908201809211611c1f57565b906020808351928381520192019060005b818110612bc95750505090565b825180516001600160401b031685526020908101516001600160e01b03168186015260409094019390920191600101612bbc565b9190604081019083519160408252825180915260206060830193019060005b818110612c3d57505050602061051693940151906020818403910152612bab565b825180516001600160a01b031686526020908101516001600160e01b03168187015260409095019490920191600101612c1c565b906020610516928181520190612bfd565b91612cab90612c9d6105169593606086526060860190612a74565b908482036020860152612a74565b916040818403910152612bfd565b9197939796929695909495612cd0818701876129ba565b95602087019788518051612eb3575b5087518051511590811591612ea4575b50612dbf575b60005b89518051821015612d1f5790612d19612d1382600194611a9c565b51613757565b01612cf8565b50509193959799989092949698600099604081019a5b8b518051821015612d5c5790612d56612d5082600194611a9c565b51613a2b565b01612d35565b5050907fb967c9b9e1b7af9a61ca71ff00e9f5b89ec6f2e268de8dacf12f0de8e51f3e47612db193926103889c612da7612db998999a9b9c9d9f519151925160405193849384612c82565b0390a13691610b92565b943691610b92565b93613eaa565b612dd4602086015b356001600160401b031690565b600b546001600160401b0382811691161015612e7c57612e0a906001600160401b03166001600160401b0319600b541617600b55565b612e226121736121736004546001600160a01b031690565b885190803b1561016757604051633937306f60e01b8152916000918391829084908290612e529060048301612c71565b03925af1801561223d57612e67575b50612cf5565b806123026000612e7693610358565b38612e61565b50612e8f89515160408a01515190612b9e565b612cf557632261116760e01b60005260046000fd5b60209150015151151538612cef565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169060608a0151823b1561016757604051633854844f60e11b815292600092849283918291612f0f913060048501612b19565b03915afa801561223d5715612cdf57806123026000612f2d93610358565b38612cdf565b60405190612f42602083610358565b6000808352366020840137565b612f57613534565b60005b815181101561224257612f6d8183611a9c565b51906040820160ff612f80825160ff1690565b161561322257602083015160ff1692612fa68460ff166000526002602052604060002090565b9160018301918254612fc1612fbb8260ff1690565b60ff1690565b6131e75750612fee612fd66060830151151590565b845462ff0000191690151560101b62ff000016178455565b60a0810191825161010081511161318f578051156131d1576003860161301c613016826123e2565b8a61501a565b60608401516130ac575b947fab8b1b57514019638d7b5ce9c638fe71366fe8e2be1c40a7a80f1733d0e9f547946002946130886130786130a69a966130718760019f9c61306c61309e9a8f615188565b6140eb565b5160ff1690565b845460ff191660ff821617909455565b5190818555519060405195869501908886614171565b0390a161520a565b01612f5a565b979460028793959701966130c86130c2896123e2565b8861501a565b6080850151946101008651116131bb5785516130f0612fbb6130eb8a5160ff1690565b6140d7565b10156131a557855184511161318f576130886130787fab8b1b57514019638d7b5ce9c638fe71366fe8e2be1c40a7a80f1733d0e9f547986130718760019f61306c6130a69f9a8f61317760029f61317161309e9f8f9061306c8492613156845160ff1690565b908054909161ff001990911660089190911b61ff0016179055565b826150ae565b505050979c9f50975050969a50505094509450613026565b631b3fab5160e11b600052600160045260246000fd5b631b3fab5160e11b600052600360045260246000fd5b631b3fab5160e11b600052600260045260246000fd5b631b3fab5160e11b600052600560045260246000fd5b60101c60ff166132026131fd6060840151151590565b151590565b90151514612fee576321fd80df60e21b60005260ff861660045260246000fd5b631b3fab5160e11b600090815260045260246000fd5b906001600160401b03613278921660005260096020526701ffffffffffffff60406000209160071c166001600160401b0316600052602052604060002090565b5490565b7f00000000000000000000000000000000000000000000000000000000000000004681036132a75750565b630f01ce8560e01b6000526004524660245260446000fd5b9190918051156133615782511592602091604051926132de8185610358565b60008452601f19810160005b81811061333d5750505060005b8151811015613335578061331e61331060019385611a9c565b5188156133245786906142b0565b016132f7565b61332e8387611a9c565b51906142b0565b505050509050565b829060405161334b81610307565b60008152606083820152828289010152016132ea565b63c2e5347d60e01b60005260046000fd5b9190811015611a975760051b0190565b3561051681610858565b9190811015611a975760051b81013590601e19813603018212156101675701908135916001600160401b038311610167576020018236038113610167579190565b909294919397968151966133e088610771565b976133ee604051998a610358565b8089526133fd601f1991610771565b0160005b8181106134cf57505060005b83518110156134c257806134548c8a8a8a61344e613447878d613440828f8f9d8f9e60019f81613470575b505050611a9c565b519761338c565b36916107ea565b93614b14565b61345e828c611a9c565b52613469818b611a9c565b500161340d565b63ffffffff613488613483858585613372565b613382565b1615613438576134b89261349f9261348392613372565b60406134ab8585611a9c565b51019063ffffffff169052565b8f8f908391613438565b5096985050505050505050565b6020906134da611e8d565b82828d01015201613401565b6134f76385572ffb60e01b82614e77565b9081613511575b81613507575090565b6105169150614e49565b905061351c81614dce565b15906134fe565b6134f763aff2afbf60e01b82614e77565b6001600160a01b0360015416330361354857565b6315ae3a6f60e11b60005260046000fd5b60405160208101906000825260208152613574604082610358565b51902090565b818110613585575050565b6000815560010161357a565b9190601f81116135a057505050565b610388926000526020600020906020601f840160051c830193106135cc575b601f0160051c019061357a565b90915081906135bf565b91909182516001600160401b038111610302576135fd816135f78454611ab0565b84613591565b6020601f821160011461363e57819061362f939495600092613633575b50508160011b916000199060031b1c19161790565b9055565b01519050388061361a565b601f1982169061365384600052602060002090565b9160005b81811061368f57509583600195969710613676575b505050811b019055565b015160001960f88460031b161c1916905538808061366c565b9192602060018192868b015181550194019201613657565b90600160c0610516936020815260ff84546001600160a01b0381166020840152818160a01c16151560408401526001600160401b038160a81c16606084015260e81c161515608082015260a080820152019101611aea565b90816020910312610167575161051681611452565b909161372b6105169360408452604084019061041a565b916020818403910152611aea565b6001600160401b036001911601906001600160401b038211611c1f57565b8051604051632cbc26bb60e01b815267ffffffffffffffff60801b608083901b1660048201526001600160401b0390911691906020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561223d576000916139fc575b506139de576137d982614ea7565b805460ff60e882901c1615156001146139b3576020830180516020815191012090600184019161380883611b6d565b602081519101200361399657505060408301516001600160401b039081169160a81c16811480159061396e575b61392d5750608082015191821561391c5761387683613867866001600160401b0316600052600a602052604060002090565b90600052602052604060002090565b546138f9576138f6929161389f61389a60606138d89401516001600160401b031690565b613739565b67ffffffffffffffff60a81b197cffffffffffffffff00000000000000000000000000000000000000000083549260a81b169116179055565b61386742936001600160401b0316600052600a602052604060002090565b55565b6332cf0cbf60e01b6000526001600160401b038416600452602483905260446000fd5b63504570e360e01b60005260046000fd5b83611e2f9161394660608601516001600160401b031690565b636af0786b60e11b6000526001600160401b0392831660045290821660245216604452606490565b5061398661063860608501516001600160401b031690565b6001600160401b03821611613835565b51611dd960405192839263b80d8fa960e01b845260048401613714565b60808301516348e2b93360e11b6000526001600160401b038516600452602452600160445260646000fd5b637edeb53960e11b6000526001600160401b03821660045260246000fd5b613a1e915060203d602011613a24575b613a168183610358565b8101906136ff565b386137cb565b503d613a0c565b8051604051632cbc26bb60e01b815267ffffffffffffffff60801b608083901b1660048201526001600160401b0390911691906020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561223d57600091613b06575b506139de57613aad82614ea7565b805460ff60e882901c1615613ad8576020830180516020815191012090600184019161380883611b6d565b60808301516348e2b93360e11b60009081526001600160401b03861660045260249190915260445260646000fd5b613b1f915060203d602011613a2457613a168183610358565b38613a9f565b6003111561071757565b60038210156107175752565b90610388604051613b4b81610307565b602060ff829554818116845260081c169101613b2f565b8054821015611a975760005260206000200190600090565b60ff60019116019060ff8211611c1f57565b60ff601b9116019060ff8211611c1f57565b90606092604091835260208301370190565b6001600052600260205293613be47fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0612366565b93853594613bf185612b82565b6060820190613c008251151590565b613e7c575b803603613e6457508151878103613e4b5750613c1f61327c565b60016000526003602052613c6e613c697fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5b336001600160a01b0316600052602052604060002090565b613b3b565b60026020820151613c7e81613b25565b613c8781613b25565b149081613de3575b5015613db7575b51613cee575b50505050507f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef090613cd2612dc760019460200190565b604080519283526001600160401b0391909116602083015290a2565b613d0f612fbb613d0a602085969799989a955194015160ff1690565b613b7a565b03613da6578151835103613d9557613d8d6000613cd294612dc794613d597f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef09960019b36916107ea565b60208151910120604051613d8481613d7689602083019586613b9e565b03601f198101835282610358565b5190208a614ee4565b948394613c9c565b63a75d88af60e01b60005260046000fd5b6371253a2560e01b60005260046000fd5b72c11c11c11c11c11c11c11c11c11c11c11c11c1330315613c9657631b41e11d60e31b60005260046000fd5b60016000526002602052613e43915061217390613e3090613e2a60037fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e05b01915160ff1690565b90613b62565b90546001600160a01b039160031b1c1690565b331438613c8f565b6324f7d61360e21b600052600452602487905260446000fd5b638e1192e160e01b6000526004523660245260446000fd5b613ea590613e9f613e95613e908751611c09565b612b90565b613e9f8851611c09565b90612b9e565b613c05565b60008052600260205294909390929091613ee37fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b612366565b94863595613ef083612b82565b6060820190613eff8251151590565b6140b4575b803603613e645750815188810361409b5750613f1e61327c565b600080526003602052613f53613c697f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff613c51565b60026020820151613f6381613b25565b613f6c81613b25565b149081614052575b5015614026575b51613fb8575b5050505050507f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef090613cd2612dc760009460200190565b613fd4612fbb613d0a602087989a999b96975194015160ff1690565b03613da6578351865103613d95576000967f198d6990ef96613a9026203077e422916918b03ff47f0be6bee7b02d8e139ef096613cd295613d5961401d94612dc79736916107ea565b94839438613f81565b72c11c11c11c11c11c11c11c11c11c11c11c11c1330315613f7b57631b41e11d60e31b60005260046000fd5b600080526002602052614093915061217390613e3090613e2a60037fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b613e21565b331438613f74565b6324f7d61360e21b600052600452602488905260446000fd5b6140d290613e9f6140c8613e908951611c09565b613e9f8a51611c09565b613f04565b60ff166003029060ff8216918203611c1f57565b8151916001600160401b03831161030257680100000000000000008311610302576020908254848455808510614154575b500190600052602060002060005b8381106141375750505050565b60019060206001600160a01b03855116940193818401550161412a565b61416b90846000528584600020918201910161357a565b3861411c565b95949392909160ff61419693168752602087015260a0604087015260a086019061239f565b84810360608601526020808351928381520192019060005b8181106141c9575050509060806103889294019060ff169052565b82516001600160a01b03168452602093840193909201916001016141ae565b600654811015611a975760066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f015490565b6001600160401b03610516949381606094168352166020820152816040820152019061041a565b60409061051693928152816020820152019061041a565b9291906001600160401b0390816064951660045216602452600481101561071757604452565b94939261429a6060936142ab938852602088019061071c565b60806040870152608086019061041a565b930152565b906142c282516001600160401b031690565b8151604051632cbc26bb60e01b815267ffffffffffffffff60801b608084901b1660048201529015159391906001600160401b038216906020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa90811561223d576000916149fd575b5061499e57602083019182515194851561496e5760408501805151870361495d5761436487611a42565b957f000000000000000000000000000000000000000000000000000000000000000061439460016116ef87614ea7565b602081519101206040516143f481613d766020820194868b876001600160401b036060929594938160808401977f2425b0b9f9054c76ff151b0a175b18f37a4a4e82013a72e9f15c9caa095ed21f85521660208401521660408201520152565b519020906001600160401b031660005b8a81106148c5575050508060806060614424930151910151908886615436565b9788156148a75760005b8881106144415750505050505050505050565b5a614456614450838a51611a9c565b51615468565b80516060015161446f906001600160401b031688611c31565b6144788161070d565b8015908d8283159384614894575b1561485157606088156147d457506144ad60206144a3898d611a9c565b5101519242611c24565b6004546144c29060a01c63ffffffff16611d5f565b1080156147c1575b156147a3576144d9878b611a9c565b515161478d575b8451608001516144f8906001600160401b0316610638565b6146d5575b50614509868951611a9c565b5160a085015151815103614699579361456e9695938c938f9661454e8e958c9261454861454260608951016001600160401b0390511690565b896154b2565b8661576a565b9a90809661456860608851016001600160401b0390511690565b90615537565b614647575b505061457e8261070d565b600282036145ff575b6001966145f57f05665fe9ad095383d018353f4cbcba77e84db27dd215081bbf7cdf9ae6fbe48b936001600160401b039351926145e66145dd8b6145d560608801516001600160401b031690565b96519b611a9c565b51985a90611c24565b91604051958695169885614281565b0390a45b0161442e565b9150919394925061460f8261070d565b60038203614623578b929493918a91614587565b51606001516349362d1f60e11b600052611e2f91906001600160401b03168961425b565b6146508461070d565b6003840361457357909294955061466891935061070d565b614678578b92918a913880614573565b5151604051632b11b8d960e01b8152908190611dd990879060048401614244565b611e2f8b6146b360608851016001600160401b0390511690565b631cfe6d8b60e01b6000526001600160401b0391821660045216602452604490565b6146de8361070d565b6146e9575b386144fd565b8351608001516001600160401b0316602080860151918c61471e60405194859384936370701e5760e11b85526004850161421d565b038160006001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af190811561223d5760009161476f575b506146e35750505050506001906145f9565b614787915060203d8111613a2457613a168183610358565b3861475d565b614797878b611a9c565b515160808601526144e0565b6354e7e43160e11b6000526001600160401b038b1660045260246000fd5b506147cb8361070d565b600383146144ca565b9150836147e08461070d565b156144e057506001959450614849925061482791507f3ef2a99c550a751d4b0b261268f05a803dfb049ab43616a1ffb388f61fe651209351016001600160401b0390511690565b604080516001600160401b03808c168252909216602083015290918291820190565b0390a16145f9565b50505050600192915061484961482760607f3b575419319662b2a6f5e2467d84521517a3382b908eb3d557bb3fdb0c50e23c9351016001600160401b0390511690565b5061489e8361070d565b60038314614486565b633ee8bd3f60e11b6000526001600160401b03841660045260246000fd5b6148d0818a51611a9c565b518051604001516001600160401b031683810361494057508051602001516001600160401b031689810361491d57509061490c8460019361532e565b614916828d611a9c565b5201614404565b636c95f1eb60e01b6000526001600160401b03808a166004521660245260446000fd5b631c21951160e11b6000526001600160401b031660045260246000fd5b6357e0e08360e01b60005260046000fd5b611e2f61498286516001600160401b031690565b63676cf24b60e11b6000526001600160401b0316600452602490565b50929150506149e0576040516001600160401b039190911681527faab522ed53d887e56ed53dd37398a01aeef6a58e0fa77c2173beb9512d89493390602090a1565b637edeb53960e11b6000526001600160401b031660045260246000fd5b614a16915060203d602011613a2457613a168183610358565b3861433a565b9081602091031261016757516105168161083c565b90610516916020815260e0614acf614aba614a5a8551610100602087015261012086019061041a565b60208601516001600160401b0316604086015260408601516001600160a01b0316606086015260608601516080860152614aa4608087015160a08701906001600160a01b03169052565b60a0860151858203601f190160c087015261041a565b60c0850151848203601f19018486015261041a565b92015190610100601f198285030191015261041a565b6040906001600160a01b036105169493168152816020820152019061041a565b90816020910312610167575190565b91939293614b20611e8d565b5060208301516001600160a01b031660405163bbe4f6db60e01b81526001600160a01b038216600482015290959092602084806024810103816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa93841561223d57600094614d9d575b506001600160a01b0384169586158015614d8b575b614d6d57614c52614c7b92613d7692614bd6614bcf611d5f60408c015163ffffffff1690565b8c89615883565b9690996080810151614c046060835193015193614bf16103a8565b9687526001600160401b03166020870152565b6001600160a01b038a16604086015260608501526001600160a01b038d16608085015260a084015260c083015260e0820152604051633907753760e01b602082015292839160248301614a31565b82857f000000000000000000000000000000000000000000000000000000000000000092615911565b94909115614d515750805160208103614d38575090614ca4826020808a95518301019101614b05565b956001600160a01b03841603614cdc575b5050505050614cd4614cc56103b8565b6001600160a01b039093168352565b602082015290565b614cef93614ce991611c24565b91615883565b50908082108015614d25575b614d0757808481614cb5565b63a966e21f60e01b6000908152600493909352602452604452606490fd5b5082614d318284611c24565b1415614cfb565b631e3be00960e21b600052602060045260245260446000fd5b611dd9604051928392634ff17cad60e11b845260048401614ae5565b63ae9b4ce960e01b6000526001600160a01b03851660045260246000fd5b50614d9861226686613523565b614ba9565b614dc091945060203d602011614dc7575b614db88183610358565b810190614a1c565b9238614b94565b503d614dae565b60405160208101916301ffc9a760e01b835263ffffffff60e01b602483015260248252614dfc604483610358565b6179185a10614e38576020926000925191617530fa6000513d82614e2c575b5081614e25575090565b9050151590565b60201115915038614e1b565b63753fa58960e11b60005260046000fd5b60405160208101916301ffc9a760e01b83526301ffc9a760e01b602483015260248252614dfc604483610358565b6040519060208201926301ffc9a760e01b845263ffffffff60e01b16602483015260248252614dfc604483610358565b6001600160401b031680600052600860205260406000209060ff825460a01c1615614ed0575090565b63ed053c5960e01b60005260045260246000fd5b919390926000948051946000965b868810614f03575050505050505050565b6020881015611a975760206000614f1b878b1a613b8c565b614f258b87611a9c565b5190614f5c614f348d8a611a9c565b5160405193849389859094939260ff6060936080840197845216602083015260408201520152565b838052039060015afa1561223d57614fa2613c69600051614f8a8960ff166000526003602052604060002090565b906001600160a01b0316600052602052604060002090565b9060016020830151614fb381613b25565b614fbc81613b25565b0361500957614fd9614fcf835160ff1690565b60ff600191161b90565b8116614ff857614fef614fcf6001935160ff1690565b17970196614ef2565b633d9ef1f160e21b60005260046000fd5b636518c33d60e11b60005260046000fd5b91909160005b83518110156150735760019060ff83166000526003602052600061506c604082206001600160a01b03615053858a611a9c565b51166001600160a01b0316600052602052604060002090565b5501615020565b50509050565b8151815460ff191660ff919091161781559060200151600381101561071757815461ff00191660089190911b61ff0016179055565b919060005b8151811015615073576150d66150c98284611a9c565b516001600160a01b031690565b906150ff6150f583614f8a8860ff166000526003602052604060002090565b5460081c60ff1690565b61510881613b25565b615173576001600160a01b038216156151625761515c60019261515761512c6103b8565b60ff85168152916151408660208501613b2f565b614f8a8960ff166000526003602052604060002090565b615079565b016150b3565b63d6c62c9b60e01b60005260046000fd5b631b3fab5160e11b6000526004805260246000fd5b919060005b8151811015615073576151a36150c98284611a9c565b906151c26150f583614f8a8860ff166000526003602052604060002090565b6151cb81613b25565b615173576001600160a01b03821615615162576152046001926151576151ef6103b8565b60ff8516815291615140600260208501613b2f565b0161518d565b60ff1680600052600260205260ff60016040600020015460101c16908015600014615258575015615247576001600160401b0319600b5416600b55565b6317bd8dd160e11b60005260046000fd5b6001146152625750565b61526857565b6307b8c74d60e51b60005260046000fd5b9080602083519182815201916020808360051b8301019401926000915b8383106152a557505050505090565b9091929394602080600192601f198582030186528851906080806153086152d5855160a0865260a086019061041a565b6001600160a01b0387870151168786015263ffffffff60408701511660408601526060860151858203606087015261041a565b93015191015297019301930191939290615296565b906020610516928181520190615279565b61357481518051906153c261534d60608601516001600160a01b031690565b613d7661536460608501516001600160401b031690565b9361537d6080808a01519201516001600160401b031690565b90604051958694602086019889936001600160401b036080946001600160a01b0382959998949960a089019a8952166020880152166040860152606085015216910152565b519020613d766020840151602081519101209360a06040820151602081519101209101516040516153fb81613d7660208201948561531d565b51902090604051958694602086019889919260a093969594919660c08401976000855260208501526040840152606083015260808201520152565b926001600160401b039261544992615a52565b9116600052600a60205260406000209060005260205260406000205490565b60405160c081018181106001600160401b038211176103025760609160a0916040526154926119e9565b815282602082015282604082015260008382015260006080820152015290565b607f8216906801fffffffffffffffe6001600160401b0383169260011b169180830460021490151715611c1f576138f6916001600160401b036154f58584613238565b921660005260096020526701ffffffffffffff60406000209460071c169160036001831b921b19161792906001600160401b0316600052602052604060002090565b9091607f83166801fffffffffffffffe6001600160401b0382169160011b169080820460021490151715611c1f5761556f8484613238565b6004831015610717576001600160401b036138f69416600052600960205260036701ffffffffffffff60406000209660071c1693831b921b19161792906001600160401b0316600052602052604060002090565b9080602083519182815201916020808360051b8301019401926000915b8383106155ef57505050505090565b909192939460208061560d600193601f19868203018752895161041a565b970193019301919392906155e0565b906020808351928381520192019060005b81811061563a5750505090565b825163ffffffff1684526020938401939092019160010161562d565b9161571f906157116105169593606086526001600160401b0360808251805160608a015282602082015116828a01528260408201511660a08a01528260608201511660c08a015201511660e087015260a06156dd6156c660208401516101406101008b01526101a08a019061041a565b6040840151898203605f19016101208b015261041a565b60608301516001600160a01b03166101408901529160808101516101608901520151868203605f1901610180880152615279565b9084820360208601526155c3565b91604081840391015261561c565b80516020909101516001600160e01b031981169291906004821061574f575050565b6001600160e01b031960049290920360031b82901b16169150565b90303b15610167576000916157936040519485938493630304c3e160e51b855260048501615656565b038183305af1908161586e575b50615863576157ad611f98565b9072c11c11c11c11c11c11c11c11c11c11c11c11c133146157cf575b60039190565b6157e86157db8361572d565b6001600160e01b03191690565b6337c3be2960e01b148015615848575b801561582d575b156157c957611e2f6158108361572d565b632882569d60e01b6000526001600160e01b031916600452602490565b5061583a6157db8361572d565b63753fa58960e11b146157ff565b506158556157db8361572d565b632be8ca8b60e21b146157f8565b6002906105166103e2565b80612302600061587d93610358565b386157a0565b6040516370a0823160e01b60208201526001600160a01b0390911660248201529192916158e0906158b78160448101613d76565b84837f000000000000000000000000000000000000000000000000000000000000000092615911565b92909115614d515750805160208103614d3857509061590b8260208061051695518301019101614b05565b93611c24565b93919361591e60846103c7565b9461592c6040519687610358565b6084865261593a60846103c7565b602087019590601f1901368737833b156159bd575a908082106159ac578291038060061c9003111561599b576000918291825a9560208451940192f1905a9003923d9060848211615992575b6000908287523e929190565b60849150615986565b6337c3be2960e01b60005260046000fd5b632be8ca8b60e21b60005260046000fd5b63030ed58f60e21b60005260046000fd5b80600052600760205260406000205415600014615a4c576006546801000000000000000081101561030257600181016006556000600654821015611a9757600690527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01819055600654906000526007602052604060002055600190565b50600090565b8051928251908415615bae5761010185111580615ba2575b15615ad157818501946000198601956101008711615ad1578615615b9257615a9187611a42565b9660009586978795885b848110615af6575050505050600119018095149384615aec575b505082615ae2575b505015615ad157615acd91611a9c565b5190565b6309bde33960e01b60005260046000fd5b1490503880615abd565b1492503880615ab5565b6001811b82811603615b8457868a1015615b6f57615b1860018b019a85611a9c565b51905b8c888c1015615b5b5750615b3360018c019b86611a9c565b515b818d11615ad157615b54828f92615b4e90600196615bbf565b92611a9c565b5201615a9b565b60018d019c615b6991611a9c565b51615b35565b615b7d60018c019b8d611a9c565b5190615b1b565b615b7d600189019884611a9c565b505050509050615acd9150611a8a565b50610101821115615a6a565b630469ac9960e21b60005260046000fd5b81811015615bd1579061051691615bd6565b610516915b9060405190602082019260018452604083015260608201526060815261357460808261035856fea164736f6c634300081a000abd1ab25a0ff0a36a588597ba1af11e30f3f210de8b9e818cc9bbc457c94c8d8c" - -type OffRampContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewOffRampContract( - address common.Address, - backend bind.ContractBackend, -) (*OffRampContract, error) { - parsed, err := abi.JSON(strings.NewReader(OffRampABI)) - if err != nil { - return nil, err - } - return &OffRampContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *OffRampContract) Address() common.Address { - return c.address -} - -func (c *OffRampContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *OffRampContract) ApplySourceChainConfigUpdates(opts *bind.TransactOpts, args []SourceChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applySourceChainConfigUpdates", args) -} - -func (c *OffRampContract) SetOCR3Configs(opts *bind.TransactOpts, args []OCRConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "setOCR3Configs", args) -} - -func (c *OffRampContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *OffRampContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *OffRampContract) GetSourceChainConfig(opts *bind.CallOpts, args uint64) (SourceChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getSourceChainConfig", args) - if err != nil { - var zero SourceChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(SourceChainConfig)).(*SourceChainConfig), nil -} - -func (c *OffRampContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -type DynamicConfig struct { - FeeQuoter common.Address - PermissionLessExecutionThresholdSeconds uint32 - MessageInterceptor common.Address -} - -type OCRConfigArgs struct { - ConfigDigest [32]byte - OcrPluginType uint8 - F uint8 - IsSignatureVerificationEnabled bool - Signers []common.Address - Transmitters []common.Address -} - -type SourceChainConfig struct { - Router common.Address - IsEnabled bool - MinSeqNr uint64 - IsRMNVerificationDisabled bool - OnRamp []byte -} - -type SourceChainConfigArgs struct { - Router common.Address - SourceChainSelector uint64 - IsEnabled bool - IsRMNVerificationDisabled bool - OnRamp []byte -} - -type StaticConfig struct { - ChainSelector uint64 - GasForCallExactCheck uint16 - RmnRemote common.Address - TokenAdminRegistry common.Address - NonceManager common.Address -} - type ConstructorArgs struct { - StaticConfig StaticConfig - DynamicConfig DynamicConfig - SourceChainConfigs []SourceChainConfigArgs + StaticConfig gobindings.OffRampStaticConfig `json:"staticConfig"` + DynamicConfig gobindings.OffRampDynamicConfig `json:"dynamicConfig"` + SourceChainConfigs []gobindings.OffRampSourceChainConfigArgs `json:"sourceChainConfigs"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "offramp:deploy", - Version: Version, - Description: "Deploys the OffRamp contract", - ContractMetadata: &bind.MetaData{ - ABI: OffRampABI, - Bin: OffRampBin, - }, + Name: "offramp:deploy", + Version: Version, + Description: "Deploys the OffRamp contract", + ContractMetadata: gobindings.OffRampMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(OffRampBin), + EVM: common.FromHex(gobindings.OffRampMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplySourceChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]SourceChainConfigArgs, *OffRampContract]{ - Name: "offramp:apply-source-chain-config-updates", - Version: Version, - Description: "Calls applySourceChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: OffRampABI, - NewContract: NewOffRampContract, - IsAllowedCaller: contract.OnlyOwner[*OffRampContract, []SourceChainConfigArgs], - Validate: func([]SourceChainConfigArgs) error { return nil }, - CallContract: func( - c *OffRampContract, - opts *bind.TransactOpts, - args []SourceChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplySourceChainConfigUpdates(opts, args) - }, -}) - -var SetOCR3Configs = contract.NewWrite(contract.WriteParams[[]OCRConfigArgs, *OffRampContract]{ - Name: "offramp:set-ocr3-configs", - Version: Version, - Description: "Calls setOCR3Configs on the contract", - ContractType: ContractType, - ContractABI: OffRampABI, - NewContract: NewOffRampContract, - IsAllowedCaller: contract.OnlyOwner[*OffRampContract, []OCRConfigArgs], - Validate: func([]OCRConfigArgs) error { return nil }, - CallContract: func( - c *OffRampContract, - opts *bind.TransactOpts, - args []OCRConfigArgs, - ) (*types.Transaction, error) { - return c.SetOCR3Configs(opts, args) - }, -}) - -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *OffRampContract]{ - Name: "offramp:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *OffRampContract]{ - Name: "offramp:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, }) -var GetSourceChainConfig = contract.NewRead(contract.ReadParams[uint64, SourceChainConfig, *OffRampContract]{ - Name: "offramp:get-source-chain-config", - Version: Version, - Description: "Calls getSourceChainConfig on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args uint64) (SourceChainConfig, error) { - return c.GetSourceChainConfig(opts, args) - }, -}) - -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *OffRampContract]{ - Name: "offramp:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: OffRampABI, - NewContract: NewOffRampContract, - IsAllowedCaller: contract.OnlyOwner[*OffRampContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *OffRampContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) +func NewWriteApplySourceChainConfigUpdates(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.OffRampSourceChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.OffRampSourceChainConfigArgs, gobindings.OffRampInterface]{ + Name: "offramp:apply-source-chain-config-updates", + Version: Version, + Description: "Calls applySourceChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.OffRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OffRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.OffRampSourceChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OffRampInterface, + opts *bind.TransactOpts, + args []gobindings.OffRampSourceChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplySourceChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteSetOCR3Configs(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.MultiOCR3BaseOCRConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.MultiOCR3BaseOCRConfigArgs, gobindings.OffRampInterface]{ + Name: "offramp:set-ocr3-configs", + Version: Version, + Description: "Calls setOCR3Configs on the contract", + ContractType: ContractType, + ContractABI: gobindings.OffRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OffRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.MultiOCR3BaseOCRConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OffRampInterface, + opts *bind.TransactOpts, + args []gobindings.MultiOCR3BaseOCRConfigArgs, + ) (*types.Transaction, error) { + return c.SetOCR3Configs(opts, args) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OffRampStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OffRampStaticConfig, gobindings.OffRampInterface]{ + Name: "offramp:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OffRampStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OffRampDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OffRampDynamicConfig, gobindings.OffRampInterface]{ + Name: "offramp:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OffRampDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewReadGetSourceChainConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.OffRampSourceChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.OffRampSourceChainConfig, gobindings.OffRampInterface]{ + Name: "offramp:get-source-chain-config", + Version: Version, + Description: "Calls getSourceChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args uint64) (gobindings.OffRampSourceChainConfig, error) { + return c.GetSourceChainConfig(opts, args) + }, + }) +} + +func NewWriteSetDynamicConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.OffRampDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.OffRampDynamicConfig, gobindings.OffRampInterface]{ + Name: "offramp:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.OffRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OffRampInterface, opts *bind.CallOpts, caller common.Address, args gobindings.OffRampDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OffRampInterface, + opts *bind.TransactOpts, + args gobindings.OffRampDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go b/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go index 18e5f79d0f..b6e9d411ae 100644 --- a/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go +++ b/chains/evm/deployment/v1_6_0/operations/onramp/onramp.go @@ -3,278 +3,151 @@ package onramp import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "OnRamp" var Version = semver.MustParse("1.6.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const OnRampABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"nonceManager","type":"address","internalType":"address"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]},{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"messageInterceptor","type":"address","internalType":"address"},{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]},{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct OnRamp.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowlistUpdates","inputs":[{"name":"allowlistConfigArgsItems","type":"tuple[]","internalType":"struct OnRamp.AllowlistConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"addedAllowlistedSenders","type":"address[]","internalType":"address[]"},{"name":"removedAllowlistedSenders","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainConfigUpdates","inputs":[{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct OnRamp.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"forwardFromRouter","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"originalSender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowedSendersList","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"configuredAddresses","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"sequenceNumber","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"messageInterceptor","type":"address","internalType":"address"},{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getExpectedNextSequenceNumber","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getPoolBySourceToken","inputs":[{"name":"","type":"uint64","internalType":"uint64"},{"name":"sourceToken","type":"address","internalType":"contract IERC20"}],"outputs":[{"name":"","type":"address","internalType":"contract IPoolV1"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"nonceManager","type":"address","internalType":"address"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getSupportedTokens","inputs":[{"name":"","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"pure"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"messageInterceptor","type":"address","internalType":"address"},{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListAdminSet","inputs":[{"name":"allowlistAdmin","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListSendersAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address[]","indexed":false,"internalType":"address[]"}],"anonymous":false},{"type":"event","name":"AllowListSendersRemoved","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address[]","indexed":false,"internalType":"address[]"}],"anonymous":false},{"type":"event","name":"CCIPMessageSent","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"message","type":"tuple","indexed":false,"internalType":"struct Internal.EVM2AnyRampMessage","components":[{"name":"header","type":"tuple","internalType":"struct Internal.RampMessageHeader","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","internalType":"uint64"},{"name":"nonce","type":"uint64","internalType":"uint64"}]},{"name":"sender","type":"address","internalType":"address"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"extraArgs","type":"bytes","internalType":"bytes"},{"name":"feeToken","type":"address","internalType":"address"},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"feeValueJuels","type":"uint256","internalType":"uint256"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Internal.EVM2AnyTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"address","internalType":"address"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"destExecData","type":"bytes","internalType":"bytes"}]}]}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"staticConfig","type":"tuple","indexed":false,"internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"nonceManager","type":"address","internalType":"address"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]},{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"messageInterceptor","type":"address","internalType":"address"},{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"DestChainConfigSet","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sequenceNumber","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"router","type":"address","indexed":false,"internalType":"contract IRouter"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"feeAggregator","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotSendZeroTokens","inputs":[]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry","inputs":[]},{"type":"error","name":"InvalidAllowListRequest","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidConfig","inputs":[]},{"type":"error","name":"InvalidDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"MustBeCalledByRouter","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwnerOrAllowlistAdmin","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"RouterMustSetOriginalSender","inputs":[]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"UnsupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}]}]` -const OnRampBin = "0x6101006040523461055f57613ce88038038061001a81610599565b92833981019080820390610140821261055f576080821261055f5761003d61057a565b90610047816105be565b82526020810151906001600160a01b038216820361055f5760208301918252610072604082016105d2565b926040810193845260a0610088606084016105d2565b6060830190815295607f19011261055f5760405160a081016001600160401b03811182821017610564576040526100c1608084016105d2565b81526100cf60a084016105e6565b602082019081526100e260c085016105d2565b91604081019283526100f660e086016105d2565b936060820194855261010b61010087016105d2565b6080830190815261012087015190966001600160401b03821161055f57018a601f8201121561055f578051906001600160401b0382116105645760209b8c6060610159828660051b01610599565b9e8f8681520194028301019181831161055f57602001925b8284106104f1575050505033156104e057600180546001600160a01b0319163317905580516001600160401b03161580156104ce575b80156104bc575b80156104aa575b61047d57516001600160401b0316608081905295516001600160a01b0390811660a08190529751811660c08190529851811660e08190528251909116158015610498575b801561048e575b61047d57815160028054855160ff60a01b90151560a01b166001600160a01b039384166001600160a81b0319909216919091171790558451600380549183166001600160a01b03199283161790558651600480549184169183169190911790558751600580549190931691161790557fc7372d2d886367d7bb1b0e0708a5436f2c91d6963de210eb2dc1ec2ecd6d21f19861012098606061029f61057a565b8a8152602080820193845260408083019586529290910194855281519a8b5291516001600160a01b03908116928b019290925291518116918901919091529051811660608801529051811660808701529051151560a08601529051811660c08501529051811660e0840152905116610100820152a16000905b805182101561040b5761032b82826105f3565b51916001600160401b0361033f82846105f3565b5151169283156103f65760008481526006602090815260409182902081840151815494840151600160401b600160e81b03198616604883901b600160481b600160e81b031617901515851b68ff000000000000000016179182905583516001600160401b0390951685526001600160a01b031691840191909152811c60ff1615159082015291926001927fd5ad72bc37dc7a80a8b9b9df20500046fd7341adb1be2258a540466fdd7dcef590606090a20190610318565b8363c35aa79d60e01b60005260045260246000fd5b6040516136ca908161061e82396080518181816103e301528181610bd901528181612163015261290a015260a05181818161219c015281816126bd0152612943015260c051818181610f9c015281816121d8015261297f015260e051818181612214015281816129bb0152612f990152f35b6306b7c75960e31b60005260046000fd5b5082511515610200565b5084516001600160a01b0316156101f9565b5088516001600160a01b0316156101b5565b5087516001600160a01b0316156101ae565b5086516001600160a01b0316156101a7565b639b15e16f60e01b60005260046000fd5b60608483031261055f5760405190606082016001600160401b0381118382101761056457604052610521856105be565b82526020850151906001600160a01b038216820361055f578260209283606095015261054f604088016105e6565b6040820152815201930192610171565b600080fd5b634e487b7160e01b600052604160045260246000fd5b60405190608082016001600160401b0381118382101761056457604052565b6040519190601f01601f191682016001600160401b0381118382101761056457604052565b51906001600160401b038216820361055f57565b51906001600160a01b038216820361055f57565b5190811515820361055f57565b80518210156106075760209160051b010190565b634e487b7160e01b600052603260045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c90816306285c69146128a457508063181f5a771461282557806320487ded146125e15780632716072b1461233157806327e936f114611f2757806348a98aa414611ea45780635cb80c5d14611bbc5780636def4ce714611b2d5780637437ff9f14611a1057806379ba50971461192b5780638da5cb5b146118d95780639041be3d1461182c578063972b46121461175e578063c9b146b314611391578063df0aa9e91461022c578063f2fde38b1461013f5763fbca3b74146100dc57600080fd5b3461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57600490610116612bb0565b507f9e7177c8000000000000000000000000000000000000000000000000000000008152fd5b80fd5b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c5773ffffffffffffffffffffffffffffffffffffffff61018c612c06565b610194613367565b1633811461020457807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b503461013c5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57610264612bb0565b67ffffffffffffffff6024351161138d5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6024353603011261138d576102ab612c29565b60025460ff8160a01c16611365577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001760025567ffffffffffffffff8216835260066020526040832073ffffffffffffffffffffffffffffffffffffffff82161561133d57805460ff8160401c166112cf575b60481c73ffffffffffffffffffffffffffffffffffffffff1633036112a75773ffffffffffffffffffffffffffffffffffffffff600354168061123e575b50805467ffffffffffffffff811667ffffffffffffffff8114611211579067ffffffffffffffff60017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009493011692839116179055604051906103d582612a7a565b84825267ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602083015267ffffffffffffffff8416604083015260608201528360808201526104366024803501602435600401613147565b61044560046024350180613147565b610453606460243501613053565b93610468604460243501602435600401613198565b9490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06104ae61049887612be1565b966104a66040519889612acf565b808852612be1565b018a5b8181106111fa575050604051966104c788612a96565b875273ffffffffffffffffffffffffffffffffffffffff8816602088015236906104f092613218565b6040860152369061050092613218565b60608401526020916040516105158482612acf565b878152608085015273ffffffffffffffffffffffffffffffffffffffff1660a084015260443560c08401528560e084015261010083015260025473ffffffffffffffffffffffffffffffffffffffff16938560243560640161057690613053565b9561058a6024356084810190600401613147565b90919061059c60046024350180613147565b99906040519a8b95869485947f3a49bb4900000000000000000000000000000000000000000000000000000000865267ffffffffffffffff8b16600487015273ffffffffffffffffffffffffffffffffffffffff16602486015260443560448601526064850160a0905260a485019061061492612d45565b908382037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc01608485015261064892612d45565b03915afa80156110f85786879688908993611179575b50608086015260e085015261067d604460243501602435600401613198565b909661068882612be1565b916106966040519384612acf565b8083528583018099368360061b8201116111755780915b8360061b8201831061113e5750505050885b6106d3604460243501602435600401613198565b9050811015610a3b576106e68184613104565b51906106f06131ec565b508682015115610a135773ffffffffffffffffffffffffffffffffffffffff61071b81845116612f3a565b169182158015610970575b61092e57808c878a8a73ffffffffffffffffffffffffffffffffffffffff8f836107d39801518280895116926040519761075f89612a7a565b885267ffffffffffffffff87890196168652816040890191168152606088019283526080880193845267ffffffffffffffff6040519b8c998a997f9a4575b9000000000000000000000000000000000000000000000000000000008b5260048b01525160a060248b015260c48a0190612b6d565b965116604488015251166064860152516084850152511660a4830152038183885af1918215610923578d809361086b575b50506001938284928b806108649651930151910151916040519361082785612a7a565b84528c840152604083015260608201528d604051906108468c83612acf565b815260808201526101008b01519061085e8383613104565b52613104565b50016106bf565b9250933d8093863e61087d8386612acf565b8985848101031261091f5784519167ffffffffffffffff831161091b576040838701858801031261091b576040516108b481612ab3565b8387015167ffffffffffffffff8111610916576108d89086890190868a010161324f565b81528b84880101519467ffffffffffffffff861161091657876108649688966109079360019b0192010161324f565b8c82015293509150938d610804565b508f80fd5b8e80fd5b8d80fd5b6040513d8f823e3d90fd5b517fbf16aab6000000000000000000000000000000000000000000000000000000008c5273ffffffffffffffffffffffffffffffffffffffff1660045260248bfd5b506040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527faff2afbf0000000000000000000000000000000000000000000000000000000060048201528881602481875afa908115610923578d916109da575b5015610726565b90508881813d8311610a0c575b6109f18183612acf565b81010312610a0857610a0290612ce8565b386109d3565b8c80fd5b503d6109e7565b60048b7f5cf04449000000000000000000000000000000000000000000000000000000008152fd5b5090889692508690610ab39873ffffffffffffffffffffffffffffffffffffffff600254169061010089015192886040519c8d957f01447eaa00000000000000000000000000000000000000000000000000000000875267ffffffffffffffff8b166004880152606060248801526064870190613291565b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8684030160448701525191828152019190855b8a828210611103575050505082809103915afa9687156110f857869761101f575b5015610f2d5750835b67ffffffffffffffff608085510191169052835b61010084015151811015610b5c5780610b4160019288613104565b516080610b5383610100890151613104565b51015201610b26565b5090926060610100604051610b7081612a96565b610b78613074565b8152838782015282604082015282808201528260808201528360a08201528360c08201528360e08201520152604051848101907f130ac867e79e2789f923760a88743d292acdf7002139a588206e2260f73f7321825267ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604082015267ffffffffffffffff8416606082015230608082015260808152610c2360a082612acf565b51902073ffffffffffffffffffffffffffffffffffffffff602085015116845167ffffffffffffffff6080816060840151169201511673ffffffffffffffffffffffffffffffffffffffff60a08801511660c088015191604051938a850195865260408501526060840152608083015260a082015260a08152610ca760c082612acf565b51902060608501518681519101206040860151878151910120610100870151604051610d0d81610ce18c8201948d86526040830190613291565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282612acf565b51902091608088015189815191012093604051958a870197885260408701526060860152608085015260a084015260c083015260e082015260e08152610d5561010082612acf565b51902082515267ffffffffffffffff60608351015116907f192442a2b2adb6a7948f097023cb6b57d29d3a7a5dd33e6666d33c39cc456f3260405185815267ffffffffffffffff608086518051898501528289820151166040850152826040820151166060850152826060820151168285015201511660a082015273ffffffffffffffffffffffffffffffffffffffff60208601511660c082015280610ef8610e7f610e4a610e1560408a01516101a060e08701526101c0860190612b6d565b60608a01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086830301610100870152612b6d565b60808901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085830301610120860152612b6d565b73ffffffffffffffffffffffffffffffffffffffff60a08901511661014084015260c088015161016084015260e088015161018084015267ffffffffffffffff610100890151967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0858403016101a08601521695613291565b0390a37fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff600254166002555151604051908152f35b73ffffffffffffffffffffffffffffffffffffffff604051917fea458c0c00000000000000000000000000000000000000000000000000000000835267ffffffffffffffff8416600484015216602482015282816044818873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af1908115611014578591610fd2575b50610b12565b90508281813d831161100d575b610fe98183612acf565b81010312611009575167ffffffffffffffff811681036110095786610fcc565b8480fd5b503d610fdf565b6040513d87823e3d90fd5b9096503d908187823e6110328282612acf565b848183810103126110f45780519167ffffffffffffffff83116110f057808201601f8484010112156110f057828201519161106c83612be1565b9361107a6040519586612acf565b83855287850192808301898660051b8486010101116110ec578882840101935b898660051b848601010185106110b7575050505050509587610b09565b845167ffffffffffffffff8111610a08578a80926110df829383878a0191898b01010161324f565b815201950194905061109a565b8a80fd5b8780fd5b8680fd5b6040513d88823e3d90fd5b8351805173ffffffffffffffffffffffffffffffffffffffff168652810151818601528d97508e965060409094019390920191600101610ae8565b604083360312610a085788604091825161115781612ab3565b61116086612c4c565b815282860135838201528152019201916106ad565b8b80fd5b97505050503d8087873e61118d8187612acf565b60808682810103126110f4578551906111a7848801612ce8565b90604088015167ffffffffffffffff81116111f6576111cb90828a01908a0161324f565b97606081015167ffffffffffffffff81116110ec576111ed928201910161324f565b9190963861065e565b8980fd5b6020906112056131ec565b82828a010152016104b1565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b803b15611009578460405180927fe0a0e5060000000000000000000000000000000000000000000000000000000082528183816112846024356004018b60048401612d84565b03925af18015611014571561037357846112a091959295612acf565b9238610373565b6004847f1c0a3529000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526002830160205260409020546103355760248573ffffffffffffffffffffffffffffffffffffffff857fd0d2597600000000000000000000000000000000000000000000000000000000835216600452fd5b6004847fa4ec7479000000000000000000000000000000000000000000000000000000008152fd5b6004847f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b5080fd5b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c5760043567ffffffffffffffff811161138d576113e1903690600401612c6d565b73ffffffffffffffffffffffffffffffffffffffff600154163303611716575b919081907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181360301915b84811015611712578060051b8201358381121561100957820191608083360312611009576040519461145d86612a2f565b61146684612bcc565b865261147460208501612bf9565b9660208701978852604085013567ffffffffffffffff811161170e5761149d903690870161309f565b9460408801958652606081013567ffffffffffffffff811161170a576114c59136910161309f565b60608801908152875167ffffffffffffffff1683526006602052604080842099518a547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff169015159182901b68ff000000000000000016178a559095908151516115e2575b5095976001019550815b85518051821015611573579061156c73ffffffffffffffffffffffffffffffffffffffff61156483600195613104565b51168961345b565b5001611534565b50509590969450600192919351908151611593575b50500193929361142c565b6115d867ffffffffffffffff7fc237ec1921f855ccd5e9a5af9733f2d58943a5a8501ec5988e305d7a4d42158692511692604051918291602083526020830190612c9e565b0390a23880611588565b989395929691909497986000146116d357600184019591875b86518051821015611678576116258273ffffffffffffffffffffffffffffffffffffffff92613104565b51168015611641579061163a6001928a6133ca565b50016115fb565b60248a67ffffffffffffffff8e51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b50509692955090929796937f330939f6eafe8bb516716892fe962ff19770570838686e6579dbc1cc51fc32816116c967ffffffffffffffff8a51169251604051918291602083526020830190612c9e565b0390a2388061152a565b60248767ffffffffffffffff8b51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b8380fd5b8280fd5b8380f35b73ffffffffffffffffffffffffffffffffffffffff60055416330315611401576004837f905d7d9b000000000000000000000000000000000000000000000000000000008152fd5b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c5767ffffffffffffffff61179f612bb0565b16808252600660205260ff604083205460401c16908252600660205260016040832001916040518093849160208254918281520191845260208420935b8181106118135750506117f192500383612acf565b61180f60405192839215158352604060208401526040830190612c9e565b0390f35b84548352600194850194879450602090930192016117dc565b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c5767ffffffffffffffff61186d612bb0565b1681526006602052600167ffffffffffffffff604083205416019067ffffffffffffffff82116118ac5760208267ffffffffffffffff60405191168152f35b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b503461013c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461013c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57805473ffffffffffffffffffffffffffffffffffffffff811633036119e8577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461013c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57611a47613074565b5060a0604051611a5681612a7a565b60ff60025473ffffffffffffffffffffffffffffffffffffffff81168352831c161515602082015273ffffffffffffffffffffffffffffffffffffffff60035416604082015273ffffffffffffffffffffffffffffffffffffffff60045416606082015273ffffffffffffffffffffffffffffffffffffffff600554166080820152611b2b604051809273ffffffffffffffffffffffffffffffffffffffff60808092828151168552602081015115156020860152826040820151166040860152826060820151166060860152015116910152565bf35b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57604060609167ffffffffffffffff611b73612bb0565b1681526006602052205473ffffffffffffffffffffffffffffffffffffffff6040519167ffffffffffffffff8116835260ff8160401c161515602084015260481c166040820152f35b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c5760043567ffffffffffffffff811161138d57611c0c903690600401612c6d565b9073ffffffffffffffffffffffffffffffffffffffff6004541690835b83811015611ea05773ffffffffffffffffffffffffffffffffffffffff611c548260051b8401613053565b1690604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa928315611e95578793611e62575b5082611cac575b506001915001611c29565b8460405193611d6760208601957fa9059cbb00000000000000000000000000000000000000000000000000000000875283602482015282604482015260448152611cf7606482612acf565b8a80604098895193611d098b86612acf565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082895af13d15611e5a573d90611d4a82612b10565b91611d578a519384612acf565b82523d8d602084013e5b866135ed565b805180611da3575b505060207f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e9160019651908152a338611ca1565b819294959693509060209181010312611e56576020611dc29101612ce8565b15611dd35792919085903880611d6f565b608490517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b8880fd5b606090611d61565b9092506020813d8211611e8d575b81611e7d60209383612acf565b810103126110f457519138611c9a565b3d9150611e70565b6040513d89823e3d90fd5b8480f35b503461013c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57611edc612bb0565b506024359073ffffffffffffffffffffffffffffffffffffffff8216820361013c576020611f0983612f3a565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b503461013c5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57604051611f6381612a7a565b611f6b612c06565b8152602435801515810361170e576020820190815260443573ffffffffffffffffffffffffffffffffffffffff8116810361170a5760408301908152611faf612c29565b90606084019182526084359273ffffffffffffffffffffffffffffffffffffffff8416840361232d5760808501938452611fe7613367565b73ffffffffffffffffffffffffffffffffffffffff85511615801561230e575b8015612304575b6122dc579273ffffffffffffffffffffffffffffffffffffffff859381809461012097827fc7372d2d886367d7bb1b0e0708a5436f2c91d6963de210eb2dc1ec2ecd6d21f19a51167fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002555115157fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000006002549260a01b1691161760025551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600354161760035551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600454161760045551167fffffffffffffffffffffffff000000000000000000000000000000000000000060055416176005556122d86040519161215883612a2f565b67ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016835273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602084015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604084015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166060840152612288604051809473ffffffffffffffffffffffffffffffffffffffff6060809267ffffffffffffffff8151168552826020820151166020860152826040820151166040860152015116910152565b608083019073ffffffffffffffffffffffffffffffffffffffff60808092828151168552602081015115156020860152826040820151166040860152826060820151166060860152015116910152565ba180f35b6004867f35be3ac8000000000000000000000000000000000000000000000000000000008152fd5b508051151561200e565b5073ffffffffffffffffffffffffffffffffffffffff83511615612007565b8580fd5b503461013c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c576004359067ffffffffffffffff821161013c573660238301121561013c57816004013561238d81612be1565b9261239b6040519485612acf565b818452602460606020860193028201019036821161170a57602401915b818310612539575050506123ca613367565b805b8251811015612535576123df8184613104565b5167ffffffffffffffff6123f38386613104565b51511690811561250957907fd5ad72bc37dc7a80a8b9b9df20500046fd7341adb1be2258a540466fdd7dcef5606060019493838752600660205260ff604088206124ca604060208501519483547fffffff0000000000000000000000000000000000000000ffffffffffffffffff7cffffffffffffffffffffffffffffffffffffffff0000000000000000008860481b1691161784550151151582907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff68ff0000000000000000835492151560401b169116179055565b5473ffffffffffffffffffffffffffffffffffffffff6040519367ffffffffffffffff8316855216602084015260401c1615156040820152a2016123cc565b602484837fc35aa79d000000000000000000000000000000000000000000000000000000008252600452fd5b5080f35b60608336031261170a576040516060810181811067ffffffffffffffff8211176125b45760405261256984612bcc565b8152602084013573ffffffffffffffffffffffffffffffffffffffff8116810361232d5791816060936020809401526125a460408701612bf9565b60408201528152019201916123b8565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461013c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c57612619612bb0565b60243567ffffffffffffffff811161170e5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261170e576040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815277ffffffffffffffff000000000000000000000000000000008360801b16600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561281a5784916127e0575b506127aa5761274c9160209173ffffffffffffffffffffffffffffffffffffffff60025416906040518095819482937fd8694ccd0000000000000000000000000000000000000000000000000000000084526004019060048401612d84565b03915afa90811561279f578291612769575b602082604051908152f35b90506020813d602011612797575b8161278460209383612acf565b8101031261138d5760209150513861275e565b3d9150612777565b6040513d84823e3d90fd5b60248367ffffffffffffffff847ffdbd6a7200000000000000000000000000000000000000000000000000000000835216600452fd5b90506020813d602011612812575b816127fb60209383612acf565b8101031261170a5761280c90612ce8565b386126ed565b3d91506127ee565b6040513d86823e3d90fd5b503461013c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013c575061180f604051612866604082612acf565b600c81527f4f6e52616d7020312e362e3000000000000000000000000000000000000000006020820152604051918291602083526020830190612b6d565b90503461138d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261138d57806128e0606092612a2f565b828152826020820152826040820152015260806040516128ff81612a2f565b67ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602082015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604082015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166060820152611b2b604051809273ffffffffffffffffffffffffffffffffffffffff6060809267ffffffffffffffff8151168552826020820151166020860152826040820151166040860152015116910152565b6080810190811067ffffffffffffffff821117612a4b57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810190811067ffffffffffffffff821117612a4b57604052565b610120810190811067ffffffffffffffff821117612a4b57604052565b6040810190811067ffffffffffffffff821117612a4b57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612a4b57604052565b67ffffffffffffffff8111612a4b57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b838110612b5d5750506000910152565b8181015183820152602001612b4d565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093612ba981518092818752878088019101612b4a565b0116010190565b6004359067ffffffffffffffff82168203612bc757565b600080fd5b359067ffffffffffffffff82168203612bc757565b67ffffffffffffffff8111612a4b5760051b60200190565b35908115158203612bc757565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203612bc757565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203612bc757565b359073ffffffffffffffffffffffffffffffffffffffff82168203612bc757565b9181601f84011215612bc75782359167ffffffffffffffff8311612bc7576020808501948460051b010111612bc757565b906020808351928381520192019060005b818110612cbc5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101612caf565b51908115158203612bc757565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215612bc757016020813591019167ffffffffffffffff8211612bc7578136038313612bc757565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9067ffffffffffffffff9093929316815260406020820152612dfa612dbd612dac8580612cf5565b60a0604086015260e0850191612d45565b612dca6020860186612cf5565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0858403016060860152612d45565b9060408401357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe185360301811215612bc75784016020813591019267ffffffffffffffff8211612bc7578160061b36038413612bc7578281037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0016080840152818152602001929060005b818110612efb57505050612ec88473ffffffffffffffffffffffffffffffffffffffff612eb86060612ef8979801612c4c565b1660a08401526080810190612cf5565b9160c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc082860301910152612d45565b90565b90919360408060019273ffffffffffffffffffffffffffffffffffffffff612f2289612c4c565b16815260208881013590820152019501929101612e85565b73ffffffffffffffffffffffffffffffffffffffff604051917fbbe4f6db00000000000000000000000000000000000000000000000000000000835216600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561304757600091612fe4575b5073ffffffffffffffffffffffffffffffffffffffff1690565b6020813d60201161303f575b81612ffd60209383612acf565b8101031261138d57519073ffffffffffffffffffffffffffffffffffffffff8216820361013c575073ffffffffffffffffffffffffffffffffffffffff612fca565b3d9150612ff0565b6040513d6000823e3d90fd5b3573ffffffffffffffffffffffffffffffffffffffff81168103612bc75790565b6040519061308182612a7a565b60006080838281528260208201528260408201528260608201520152565b9080601f83011215612bc75781356130b681612be1565b926130c46040519485612acf565b81845260208085019260051b820101928311612bc757602001905b8282106130ec5750505090565b602080916130f984612c4c565b8152019101906130df565b80518210156131185760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215612bc7570180359067ffffffffffffffff8211612bc757602001918136038313612bc757565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215612bc7570180359067ffffffffffffffff8211612bc757602001918160061b36038313612bc757565b604051906131f982612a7a565b6060608083600081528260208201528260408201526000838201520152565b92919261322482612b10565b916132326040519384612acf565b829481845281830111612bc7578281602093846000960137010152565b81601f82011215612bc757805161326581612b10565b926132736040519485612acf565b81845260208284010111612bc757612ef89160208085019101612b4a565b9080602083519182815201916020808360051b8301019401926000915b8383106132bd57505050505090565b9091929394602080613358837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0866001960301875289519073ffffffffffffffffffffffffffffffffffffffff8251168152608061333d61332b8685015160a08886015260a0850190612b6d565b60408501518482036040860152612b6d565b92606081015160608401520151906080818403910152612b6d565b970193019301919392906132ae565b73ffffffffffffffffffffffffffffffffffffffff60015416330361338857565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b80548210156131185760005260206000200190600090565b60008281526001820160205260409020546134545780549068010000000000000000821015612a4b578261343d6134088460018096018555846133b2565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905580549260005201602052604060002055600190565b5050600090565b90600182019181600052826020526040600020548015156000146135e4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116135b5578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116135b55781810361357e575b5050508054801561354f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061351082826133b2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61359e61358e61340893866133b2565b90549060031b1c928392866133b2565b9055600052836020526040600020553880806134d8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50505050600090565b919290156136685750815115613601575090565b3b1561360a5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561367b5750805190602001fd5b6136b9906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190612b6d565b0390fdfea164736f6c634300081a000a" - -type OnRampContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewOnRampContract( - address common.Address, - backend bind.ContractBackend, -) (*OnRampContract, error) { - parsed, err := abi.JSON(strings.NewReader(OnRampABI)) - if err != nil { - return nil, err - } - return &OnRampContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *OnRampContract) Address() common.Address { - return c.address -} - -func (c *OnRampContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *OnRampContract) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, args []DestChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyDestChainConfigUpdates", args) -} - -func (c *OnRampContract) ApplyAllowlistUpdates(opts *bind.TransactOpts, args []AllowlistConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowlistUpdates", args) -} - -func (c *OnRampContract) GetAllowedSendersList(opts *bind.CallOpts, args uint64) (GetAllowedSendersListResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedSendersList", args) - outstruct := new(GetAllowedSendersListResult) - if err != nil { - return *outstruct, err - } - - outstruct.IsEnabled = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.ConfiguredAddresses = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - - return *outstruct, nil -} - -func (c *OnRampContract) GetDestChainConfig(opts *bind.CallOpts, args uint64) (GetDestChainConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChainConfig", args) - outstruct := new(GetDestChainConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.SequenceNumber = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.AllowlistEnabled = *abi.ConvertType(out[1], new(bool)).(*bool) - outstruct.Router = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) - - return *outstruct, nil -} - -func (c *OnRampContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *OnRampContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *OnRampContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -type AllowlistConfigArgs struct { - DestChainSelector uint64 - AllowlistEnabled bool - AddedAllowlistedSenders []common.Address - RemovedAllowlistedSenders []common.Address -} - -type DestChainConfigArgs struct { - DestChainSelector uint64 - Router common.Address - AllowlistEnabled bool -} - -type DynamicConfig struct { - FeeQuoter common.Address - ReentrancyGuardEntered bool - MessageInterceptor common.Address - FeeAggregator common.Address - AllowlistAdmin common.Address -} - -type GetAllowedSendersListResult struct { - IsEnabled bool - ConfiguredAddresses []common.Address -} - -type GetDestChainConfigResult struct { - SequenceNumber uint64 - AllowlistEnabled bool - Router common.Address -} - -type StaticConfig struct { - ChainSelector uint64 - RmnRemote common.Address - NonceManager common.Address - TokenAdminRegistry common.Address -} - type ConstructorArgs struct { - StaticConfig StaticConfig - DynamicConfig DynamicConfig - DestChainConfigArgs []DestChainConfigArgs + StaticConfig gobindings.OnRampStaticConfig `json:"staticConfig"` + DynamicConfig gobindings.OnRampDynamicConfig `json:"dynamicConfig"` + DestChainConfigArgs []gobindings.OnRampDestChainConfigArgs `json:"destChainConfigArgs"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "onramp:deploy", - Version: Version, - Description: "Deploys the OnRamp contract", - ContractMetadata: &bind.MetaData{ - ABI: OnRampABI, - Bin: OnRampBin, - }, + Name: "onramp:deploy", + Version: Version, + Description: "Deploys the OnRamp contract", + ContractMetadata: gobindings.OnRampMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(OnRampBin), + EVM: common.FromHex(gobindings.OnRampMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyDestChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]DestChainConfigArgs, *OnRampContract]{ - Name: "onramp:apply-dest-chain-config-updates", - Version: Version, - Description: "Calls applyDestChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, []DestChainConfigArgs], - Validate: func([]DestChainConfigArgs) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args []DestChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyDestChainConfigUpdates(opts, args) - }, -}) - -var ApplyAllowlistUpdates = contract.NewWrite(contract.WriteParams[[]AllowlistConfigArgs, *OnRampContract]{ - Name: "onramp:apply-allowlist-updates", - Version: Version, - Description: "Calls applyAllowlistUpdates on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, []AllowlistConfigArgs], - Validate: func([]AllowlistConfigArgs) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args []AllowlistConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowlistUpdates(opts, args) - }, -}) - -var GetAllowedSendersList = contract.NewRead(contract.ReadParams[uint64, GetAllowedSendersListResult, *OnRampContract]{ - Name: "onramp:get-allowed-senders-list", - Version: Version, - Description: "Calls getAllowedSendersList on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args uint64) (GetAllowedSendersListResult, error) { - return c.GetAllowedSendersList(opts, args) - }, -}) - -var GetDestChainConfig = contract.NewRead(contract.ReadParams[uint64, GetDestChainConfigResult, *OnRampContract]{ - Name: "onramp:get-dest-chain-config", - Version: Version, - Description: "Calls getDestChainConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args uint64) (GetDestChainConfigResult, error) { - return c.GetDestChainConfig(opts, args) - }, -}) - -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *OnRampContract]{ - Name: "onramp:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *OnRampContract]{ - Name: "onramp:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, }) -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *OnRampContract]{ - Name: "onramp:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) +func NewWriteApplyDestChainConfigUpdates(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.OnRampDestChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.OnRampDestChainConfigArgs, gobindings.OnRampInterface]{ + Name: "onramp:apply-dest-chain-config-updates", + Version: Version, + Description: "Calls applyDestChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.OnRampDestChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args []gobindings.OnRampDestChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyDestChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteApplyAllowlistUpdates(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.OnRampAllowlistConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.OnRampAllowlistConfigArgs, gobindings.OnRampInterface]{ + Name: "onramp:apply-allowlist-updates", + Version: Version, + Description: "Calls applyAllowlistUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.OnRampAllowlistConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args []gobindings.OnRampAllowlistConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowlistUpdates(opts, args) + }, + }) +} + +func NewReadGetAllowedSendersList(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetAllowedSendersList, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetAllowedSendersList, gobindings.OnRampInterface]{ + Name: "onramp:get-allowed-senders-list", + Version: Version, + Description: "Calls getAllowedSendersList on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args uint64) (gobindings.GetAllowedSendersList, error) { + return c.GetAllowedSendersList(opts, args) + }, + }) +} + +func NewReadGetDestChainConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetDestChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetDestChainConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-dest-chain-config", + Version: Version, + Description: "Calls getDestChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args uint64) (gobindings.GetDestChainConfig, error) { + return c.GetDestChainConfig(opts, args) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OnRampStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OnRampStaticConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OnRampStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OnRampDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OnRampDynamicConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OnRampDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewWriteSetDynamicConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.OnRampDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.OnRampDynamicConfig, gobindings.OnRampInterface]{ + Name: "onramp:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args gobindings.OnRampDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args gobindings.OnRampDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_0/operations/rmn_remote/rmn_remote.go b/chains/evm/deployment/v1_6_0/operations/rmn_remote/rmn_remote.go index 91af58d87b..966ff03f4f 100644 --- a/chains/evm/deployment/v1_6_0/operations/rmn_remote/rmn_remote.go +++ b/chains/evm/deployment/v1_6_0/operations/rmn_remote/rmn_remote.go @@ -3,209 +3,145 @@ package rmn_remote import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_remote" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "RMNRemote" var Version = semver.MustParse("1.6.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const RMNRemoteABI = `[{"type":"constructor","inputs":[{"name":"localChainSelector","type":"uint64","internalType":"uint64"},{"name":"legacyRMN","type":"address","internalType":"contract IRMN"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"curse","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"curse","inputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getCursedSubjects","inputs":[],"outputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"stateMutability":"view"},{"type":"function","name":"getLocalChainSelector","inputs":[],"outputs":[{"name":"localChainSelector","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getReportDigestHeader","inputs":[],"outputs":[{"name":"digestHeader","type":"bytes32","internalType":"bytes32"}],"stateMutability":"pure"},{"type":"function","name":"getVersionedConfig","inputs":[],"outputs":[{"name":"version","type":"uint32","internalType":"uint32"},{"name":"config","type":"tuple","internalType":"struct RMNRemote.Config","components":[{"name":"rmnHomeContractConfigDigest","type":"bytes32","internalType":"bytes32"},{"name":"signers","type":"tuple[]","internalType":"struct RMNRemote.Signer[]","components":[{"name":"onchainPublicKey","type":"address","internalType":"address"},{"name":"nodeIndex","type":"uint64","internalType":"uint64"}]},{"name":"fSign","type":"uint64","internalType":"uint64"}]}],"stateMutability":"view"},{"type":"function","name":"isBlessed","inputs":[{"name":"taggedRoot","type":"tuple","internalType":"struct IRMN.TaggedRoot","components":[{"name":"commitStore","type":"address","internalType":"address"},{"name":"root","type":"bytes32","internalType":"bytes32"}]}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isCursed","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isCursed","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setConfig","inputs":[{"name":"newConfig","type":"tuple","internalType":"struct RMNRemote.Config","components":[{"name":"rmnHomeContractConfigDigest","type":"bytes32","internalType":"bytes32"},{"name":"signers","type":"tuple[]","internalType":"struct RMNRemote.Signer[]","components":[{"name":"onchainPublicKey","type":"address","internalType":"address"},{"name":"nodeIndex","type":"uint64","internalType":"uint64"}]},{"name":"fSign","type":"uint64","internalType":"uint64"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"uncurse","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"uncurse","inputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verify","inputs":[{"name":"offRampAddress","type":"address","internalType":"address"},{"name":"merkleRoots","type":"tuple[]","internalType":"struct Internal.MerkleRoot[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"minSeqNr","type":"uint64","internalType":"uint64"},{"name":"maxSeqNr","type":"uint64","internalType":"uint64"},{"name":"merkleRoot","type":"bytes32","internalType":"bytes32"}]},{"name":"signatures","type":"tuple[]","internalType":"struct IRMNRemote.Signature[]","components":[{"name":"r","type":"bytes32","internalType":"bytes32"},{"name":"s","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"view"},{"type":"event","name":"ConfigSet","inputs":[{"name":"version","type":"uint32","indexed":true,"internalType":"uint32"},{"name":"config","type":"tuple","indexed":false,"internalType":"struct RMNRemote.Config","components":[{"name":"rmnHomeContractConfigDigest","type":"bytes32","internalType":"bytes32"},{"name":"signers","type":"tuple[]","internalType":"struct RMNRemote.Signer[]","components":[{"name":"onchainPublicKey","type":"address","internalType":"address"},{"name":"nodeIndex","type":"uint64","internalType":"uint64"}]},{"name":"fSign","type":"uint64","internalType":"uint64"}]}],"anonymous":false},{"type":"event","name":"Cursed","inputs":[{"name":"subjects","type":"bytes16[]","indexed":false,"internalType":"bytes16[]"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Uncursed","inputs":[{"name":"subjects","type":"bytes16[]","indexed":false,"internalType":"bytes16[]"}],"anonymous":false},{"type":"error","name":"AlreadyCursed","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ConfigNotSet","inputs":[]},{"type":"error","name":"DuplicateOnchainPublicKey","inputs":[]},{"type":"error","name":"InvalidSignature","inputs":[]},{"type":"error","name":"InvalidSignerOrder","inputs":[]},{"type":"error","name":"IsBlessedNotAvailable","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NotCursed","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}]},{"type":"error","name":"NotEnoughSigners","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OutOfOrderSignatures","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ThresholdNotMet","inputs":[]},{"type":"error","name":"UnexpectedSigner","inputs":[]},{"type":"error","name":"ZeroValueNotAllowed","inputs":[]}]` -const RMNRemoteBin = "0x60c0346100d357601f6121f938819003918201601f19168301916001600160401b038311848410176100d85780849260409485528339810103126100d35780516001600160401b038116918282036100d35760200151916001600160a01b03831683036100d35733156100c257600180546001600160a01b03191633179055156100b15760805260a05260405161210a90816100ef82396080518181816102fe0152610712015260a05181610f7d0152f35b63273e150360e21b60005260046000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c8063181f5a77146119ce578063198f0f77146112df5780631add205f146111145780632cbc26bb146110d3578063397796f7146110905780634d61677114610f3557806362eed41514610e155780636509a95414610dbc5780636d2d399314610c9c57806370a9089e146105f057806379ba5097146105075780638da5cb5b146104b55780639a19b329146103c7578063d881e09214610322578063eaa83ddd146102bf578063f2fde38b146101cf5763f8bb876e146100d757600080fd5b346101ca576100e536611b71565b6100ed611ec2565b60005b81518110156101955761012e7fffffffffffffffffffffffffffffffff000000000000000000000000000000006101278385611eae565b51166120a3565b1561013b576001016100f0565b610166907fffffffffffffffffffffffffffffffff0000000000000000000000000000000092611eae565b51167f19d5c79b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6040517f1716e663a90a76d3b6c7e5f680673d1b051454c19c627e184c8daf28f3104f7490806101c58582611c38565b0390a1005b600080fd5b346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5773ffffffffffffffffffffffffffffffffffffffff61021b611b36565b610223611ec2565b1633811461029557807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57602060405167ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760405180602060065491828152019060066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9060005b8181106103b1576103ad856103a181870382611a67565b60405191829182611c38565b0390f35b825484526020909301926001928301920161038a565b346101ca576103d536611b71565b6103dd611ec2565b60005b81518110156104855761041e7fffffffffffffffffffffffffffffffff000000000000000000000000000000006104178385611eae565b5116611f0d565b1561042b576001016103e0565b610456907fffffffffffffffffffffffffffffffff0000000000000000000000000000000092611eae565b51167f73281fa10000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6040517f0676e709c9cc74fa0519fd78f7c33be0f1b2b0bae0507c724aef7229379c6ba190806101c58582611c38565b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760005473ffffffffffffffffffffffffffffffffffffffff811633036105c6577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346101ca5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57610627611b36565b67ffffffffffffffff602435116101ca573660236024350112156101ca57602435600401359067ffffffffffffffff82116101ca573660248360051b81350101116101ca576044359067ffffffffffffffff82116101ca57366023830112156101ca5767ffffffffffffffff8260040135116101ca57366024836004013560061b840101116101ca5763ffffffff6005541615610c725767ffffffffffffffff6106d48160045416611d3c565b16826004013510610c485760025460405160c0810181811067ffffffffffffffff821117610c1957604052468152602081019267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168452604082019230845273ffffffffffffffffffffffffffffffffffffffff60608401921682526080830190815261076987611b59565b916107776040519384611a67565b8783526000976024803501602085015b60248360051b813501018210610a61575050509073ffffffffffffffffffffffffffffffffffffffff8095939260a0860193845260405196879567ffffffffffffffff602088019a7f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf538c526040808a01526101208901995160608a015251166080880152511660a0860152511660c08401525160e08301525160c0610100830152805180935261014082019260206101408260051b85010192019388905b8282106109c8575050506108809250037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282611a67565b5190208290815b83600401358310610896578480f35b60208560806108ad86886004013560248a01611ce8565b35836108c1888a6004013560248c01611ce8565b013560405191878352601b868401526040830152606082015282805260015afa156109bd5784519073ffffffffffffffffffffffffffffffffffffffff82169081156109955773ffffffffffffffffffffffffffffffffffffffff829116101561096d578552600860205260ff604086205416156109455760019290920191610887565b6004857faaaa9141000000000000000000000000000000000000000000000000000000008152fd5b6004867fbbe15e7f000000000000000000000000000000000000000000000000000000008152fd5b6004877f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b6040513d86823e3d90fd5b91936020847ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec08293600195970301855287519067ffffffffffffffff8251168152608080610a238585015160a08786015260a0850190611aa8565b9367ffffffffffffffff604082015116604085015267ffffffffffffffff606082015116606085015201519101529601920192018593919492610845565b81359067ffffffffffffffff8211610c155760a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc836024350136030112610c15576040519060a0820182811067ffffffffffffffff821117610be457604052610ad060248481350101611d95565b82526044836024350101359167ffffffffffffffff8311610c115736604360243586018501011215610c115767ffffffffffffffff6024848682350101013511610be457908d9160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6024878982350101013501160193610b576040519586611a67565b60248035870182019081013580875236910160440111610be057602495602095869560a49387908a90813586018101808301359060440186850137858235010101358301015285840152610bb060648289350101611d95565b6040840152610bc460848289350101611d95565b6060840152863501013560808201528152019201919050610787565b8380fd5b60248e7f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8d80fd5b8b80fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f59fa4a930000000000000000000000000000000000000000000000000000000060005260046000fd5b7face124bc0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57610cd3611b07565b604090815190610ce38383611a67565b600182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe083013660208401377fffffffffffffffffffffffffffffffff00000000000000000000000000000000610d3a83611ea1565b91169052610d46611ec2565b60005b8151811015610d8d57610d807fffffffffffffffffffffffffffffffff000000000000000000000000000000006104178385611eae565b1561042b57600101610d49565b82517f0676e709c9cc74fa0519fd78f7c33be0f1b2b0bae0507c724aef7229379c6ba190806101c58582611c38565b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760206040517f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf538152f35b346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57610e4c611b07565b604090815190610e5c8383611a67565b600182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe083013660208401377fffffffffffffffffffffffffffffffff00000000000000000000000000000000610eb383611ea1565b91169052610ebf611ec2565b60005b8151811015610f0657610ef97fffffffffffffffffffffffffffffffff000000000000000000000000000000006101278385611eae565b1561013b57600101610ec2565b82517f1716e663a90a76d3b6c7e5f680673d1b051454c19c627e184c8daf28f3104f7490806101c58582611c38565b346101ca5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca57600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168015611068576020604491604051928380927f4d61677100000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff610fef611b36565b16600483015260243560248301525afa90811561105d57829161101a575b6020826040519015158152f35b90506020813d602011611055575b8161103560209383611a67565b810103126110515751801515810361105157602091508261100d565b5080fd5b3d9150611028565b6040513d84823e3d90fd5b6004827f0a7c4edd000000000000000000000000000000000000000000000000000000008152fd5b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760206110c9611e44565b6040519015158152f35b346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760206110c961110f611b07565b611daa565b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760006040805161115281611a4b565b82815260606020820152015263ffffffff600554166040519061117482611a4b565b60025482526003549161118683611b59565b926111946040519485611a67565b808452600360009081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9190602086015b82821061128057505050506020810192835267ffffffffffffffff6004541692604082019384526040519283526040602084015260a083019151604084015251906060808401528151809152602060c0840192019060005b81811061123e5750505067ffffffffffffffff8293511660808301520390f35b8251805173ffffffffffffffffffffffffffffffffffffffff16855260209081015167ffffffffffffffff16818601526040909401939092019160010161121e565b6040516040810181811067ffffffffffffffff821117610c1957600192839260209260405267ffffffffffffffff885473ffffffffffffffffffffffffffffffffffffffff8116835260a01c16838201528152019401910190926111c6565b346101ca5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca5760043567ffffffffffffffff81116101ca57806004018136039160607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8401126101ca5761135a611ec2565b81359081156119a457909260248201919060015b6113788486611c94565b90508110156114595761138b8486611c94565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83019183831161142a576113cc926020926113c692611ce8565b01611d27565b67ffffffffffffffff806113ef60206113c6866113e98b8d611c94565b90611ce8565b16911610156114005760010161136e565b7f448515170000000000000000000000000000000000000000000000000000000060005260046000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b508390856114678584611c94565b60448601915061147682611d27565b60011b6801fffffffffffffffe67fffffffffffffffe82169116810361142a576114a867ffffffffffffffff91611d3c565b161161197a57600354805b611877575060005b6114c58786611c94565b905081101561159e5773ffffffffffffffffffffffffffffffffffffffff6114f96114f4836113e98b8a611c94565b611d74565b16600052600860205260ff60406000205416611574578073ffffffffffffffffffffffffffffffffffffffff6115386114f46001946113e98c8b611c94565b1660005260086020526040600020827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055016114bb565b7f28cae27d0000000000000000000000000000000000000000000000000000000060005260046000fd5b50846115b08780959685600255611c94565b90680100000000000000008211610c195760035482600355808310611831575b50600360005260206000206000915b838310611783575050505067ffffffffffffffff6115fc83611d27565b167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000060045416176004556005549463ffffffff86169563ffffffff871461142a5763ffffffff60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000098011696879116176005557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd6040519560208752608087019560208801523591018112156101ca57016024600482013591019267ffffffffffffffff82116101ca578160061b360384136101ca578190606060408701525260a0840192906000905b80821061173057867f7f22bf988149dbe8de8fb879c6b97a4e56e68b2bd57421ce1a4e79d4ef6b496c87808867ffffffffffffffff6117258a611d95565b1660608301520390a2005b90919384359073ffffffffffffffffffffffffffffffffffffffff82168092036101ca5760408160019382935267ffffffffffffffff61177260208a01611d95565b1660208201520195019201906116e7565b600160408273ffffffffffffffffffffffffffffffffffffffff6117a78495611d74565b167fffffffffffffffffffffffff00000000000000000000000000000000000000008654161785556117db60208201611d27565b7fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff7bffffffffffffffff000000000000000000000000000000000000000087549260a01b169116178555019201920191906115df565b60036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9081019083015b81811061186b57506115d0565b6000815560010161185e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161142a57600090600354111561194d57600390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85a81015473ffffffffffffffffffffffffffffffffffffffff16600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055801561142a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01806114b3565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b7f014c50200000000000000000000000000000000000000000000000000000000060005260046000fd5b7f9cf8540c0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101ca5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101ca576103ad6040805190611a0f8183611a67565b600f82527f524d4e52656d6f746520312e362e300000000000000000000000000000000000602083015251918291602083526020830190611aa8565b6060810190811067ffffffffffffffff821117610c1957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610c1957604052565b919082519283825260005b848110611af25750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201611ab3565b600435907fffffffffffffffffffffffffffffffff00000000000000000000000000000000821682036101ca57565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101ca57565b67ffffffffffffffff8111610c195760051b60200190565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101ca576004359067ffffffffffffffff82116101ca57806023830112156101ca57816004013590611bc882611b59565b92611bd66040519485611a67565b8284526024602085019360051b8201019182116101ca57602401915b818310611bff5750505090565b82357fffffffffffffffffffffffffffffffff00000000000000000000000000000000811681036101ca57815260209283019201611bf2565b602060408183019282815284518094520192019060005b818110611c5c5750505090565b82517fffffffffffffffffffffffffffffffff0000000000000000000000000000000016845260209384019390920191600101611c4f565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101ca570180359067ffffffffffffffff82116101ca57602001918160061b360383136101ca57565b9190811015611cf85760061b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3567ffffffffffffffff811681036101ca5790565b67ffffffffffffffff60019116019067ffffffffffffffff821161142a57565b8054821015611cf85760005260206000200190600090565b3573ffffffffffffffffffffffffffffffffffffffff811681036101ca5790565b359067ffffffffffffffff821682036101ca57565b60065415611e3e577fffffffffffffffffffffffffffffffff0000000000000000000000000000000016600052600760205260406000205415801590611ded5790565b507f010000000000000000000000000000010000000000000000000000000000000060005260076020527f70b766b11586b6b505ed3893938b0cc6c6c98bd6f65e969ac311168d34e4f9e254151590565b50600090565b60065415611e9c577f010000000000000000000000000000010000000000000000000000000000000060005260076020527f70b766b11586b6b505ed3893938b0cc6c6c98bd6f65e969ac311168d34e4f9e254151590565b600090565b805115611cf85760200190565b8051821015611cf85760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff600154163303611ee357565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b600081815260076020526040902054801561209c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161142a57600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161142a5781810361202d575b5050506006548015611ffe577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611fbb816006611d5c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61208461203e61204f936006611d5c565b90549060031b1c9283926006611d5c565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526007602052604060002055388080611f82565b5050600090565b80600052600760205260406000205415600014611e3e5760065468010000000000000000811015610c19576120e461204f8260018594016006556006611d5c565b905560065490600052600760205260406000205560019056fea164736f6c634300081a000a" - -type RMNRemoteContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewRMNRemoteContract( - address common.Address, - backend bind.ContractBackend, -) (*RMNRemoteContract, error) { - parsed, err := abi.JSON(strings.NewReader(RMNRemoteABI)) - if err != nil { - return nil, err - } - return &RMNRemoteContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *RMNRemoteContract) Address() common.Address { - return c.address -} - -func (c *RMNRemoteContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *RMNRemoteContract) Curse(opts *bind.TransactOpts, args [16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "curse", args) -} - -func (c *RMNRemoteContract) Curse0(opts *bind.TransactOpts, args [][16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "curse0", args) -} - -func (c *RMNRemoteContract) Uncurse(opts *bind.TransactOpts, args [16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "uncurse", args) -} - -func (c *RMNRemoteContract) Uncurse0(opts *bind.TransactOpts, args [][16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "uncurse0", args) -} - -func (c *RMNRemoteContract) IsCursed(opts *bind.CallOpts, args [16]byte) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isCursed", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *RMNRemoteContract) IsCursed0(opts *bind.CallOpts) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isCursed0") - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - type ConstructorArgs struct { - LocalChainSelector uint64 - LegacyRMN common.Address + LocalChainSelector uint64 `json:"localChainSelector"` + LegacyRMN common.Address `json:"legacyRMN"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "rmn-remote:deploy", - Version: Version, - Description: "Deploys the RMNRemote contract", - ContractMetadata: &bind.MetaData{ - ABI: RMNRemoteABI, - Bin: RMNRemoteBin, - }, + Name: "rmn-remote:deploy", + Version: Version, + Description: "Deploys the RMNRemote contract", + ContractMetadata: gobindings.RMNRemoteMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(RMNRemoteBin), + EVM: common.FromHex(gobindings.RMNRemoteMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var Curse = contract.NewWrite(contract.WriteParams[[16]byte, *RMNRemoteContract]{ - Name: "rmn-remote:curse", - Version: Version, - Description: "Calls curse on the contract", - ContractType: ContractType, - ContractABI: RMNRemoteABI, - NewContract: NewRMNRemoteContract, - IsAllowedCaller: contract.OnlyOwner[*RMNRemoteContract, [16]byte], - Validate: func([16]byte) error { return nil }, - CallContract: func( - c *RMNRemoteContract, - opts *bind.TransactOpts, - args [16]byte, - ) (*types.Transaction, error) { - return c.Curse(opts, args) - }, -}) +func NewWriteCurse(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[16]byte, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:curse", + Version: Version, + Description: "Calls curse on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNRemoteMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, caller common.Address, args [16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNRemoteInterface, + opts *bind.TransactOpts, + args [16]byte, + ) (*types.Transaction, error) { + return c.Curse(opts, args) + }, + }) +} -var Curse0 = contract.NewWrite(contract.WriteParams[[][16]byte, *RMNRemoteContract]{ - Name: "rmn-remote:curse0", - Version: Version, - Description: "Calls curse0 on the contract", - ContractType: ContractType, - ContractABI: RMNRemoteABI, - NewContract: NewRMNRemoteContract, - IsAllowedCaller: contract.OnlyOwner[*RMNRemoteContract, [][16]byte], - Validate: func([][16]byte) error { return nil }, - CallContract: func( - c *RMNRemoteContract, - opts *bind.TransactOpts, - args [][16]byte, - ) (*types.Transaction, error) { - return c.Curse0(opts, args) - }, -}) +func NewWriteCurse0(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[[][16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[][16]byte, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:curse0", + Version: Version, + Description: "Calls curse0 on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNRemoteMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, caller common.Address, args [][16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNRemoteInterface, + opts *bind.TransactOpts, + args [][16]byte, + ) (*types.Transaction, error) { + return c.Curse0(opts, args) + }, + }) +} -var Uncurse = contract.NewWrite(contract.WriteParams[[16]byte, *RMNRemoteContract]{ - Name: "rmn-remote:uncurse", - Version: Version, - Description: "Calls uncurse on the contract", - ContractType: ContractType, - ContractABI: RMNRemoteABI, - NewContract: NewRMNRemoteContract, - IsAllowedCaller: contract.OnlyOwner[*RMNRemoteContract, [16]byte], - Validate: func([16]byte) error { return nil }, - CallContract: func( - c *RMNRemoteContract, - opts *bind.TransactOpts, - args [16]byte, - ) (*types.Transaction, error) { - return c.Uncurse(opts, args) - }, -}) +func NewWriteUncurse(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[16]byte, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:uncurse", + Version: Version, + Description: "Calls uncurse on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNRemoteMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, caller common.Address, args [16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNRemoteInterface, + opts *bind.TransactOpts, + args [16]byte, + ) (*types.Transaction, error) { + return c.Uncurse(opts, args) + }, + }) +} -var Uncurse0 = contract.NewWrite(contract.WriteParams[[][16]byte, *RMNRemoteContract]{ - Name: "rmn-remote:uncurse0", - Version: Version, - Description: "Calls uncurse0 on the contract", - ContractType: ContractType, - ContractABI: RMNRemoteABI, - NewContract: NewRMNRemoteContract, - IsAllowedCaller: contract.OnlyOwner[*RMNRemoteContract, [][16]byte], - Validate: func([][16]byte) error { return nil }, - CallContract: func( - c *RMNRemoteContract, - opts *bind.TransactOpts, - args [][16]byte, - ) (*types.Transaction, error) { - return c.Uncurse0(opts, args) - }, -}) +func NewWriteUncurse0(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[[][16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[][16]byte, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:uncurse0", + Version: Version, + Description: "Calls uncurse0 on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNRemoteMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, caller common.Address, args [][16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNRemoteInterface, + opts *bind.TransactOpts, + args [][16]byte, + ) (*types.Transaction, error) { + return c.Uncurse0(opts, args) + }, + }) +} -var IsCursed = contract.NewRead(contract.ReadParams[[16]byte, bool, *RMNRemoteContract]{ - Name: "rmn-remote:is-cursed", - Version: Version, - Description: "Calls isCursed on the contract", - ContractType: ContractType, - NewContract: NewRMNRemoteContract, - CallContract: func(c *RMNRemoteContract, opts *bind.CallOpts, args [16]byte) (bool, error) { - return c.IsCursed(opts, args) - }, -}) +func NewReadIsCursed(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[[16]byte, bool, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:is-cursed", + Version: Version, + Description: "Calls isCursed on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, args [16]byte) (bool, error) { + return c.IsCursed(opts, args) + }, + }) +} -var IsCursed0 = contract.NewRead(contract.ReadParams[struct{}, bool, *RMNRemoteContract]{ - Name: "rmn-remote:is-cursed0", - Version: Version, - Description: "Calls isCursed0 on the contract", - ContractType: ContractType, - NewContract: NewRMNRemoteContract, - CallContract: func(c *RMNRemoteContract, opts *bind.CallOpts, args struct{}) (bool, error) { - return c.IsCursed0(opts) - }, -}) +func NewReadIsCursed0(c gobindings.RMNRemoteInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, bool, gobindings.RMNRemoteInterface]{ + Name: "rmn-remote:is-cursed0", + Version: Version, + Description: "Calls isCursed0 on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNRemoteInterface, opts *bind.CallOpts, args struct{}) (bool, error) { + return c.IsCursed0(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_0/sequences/adapter.go b/chains/evm/deployment/v1_6_0/sequences/adapter.go index 9eaea02e04..f3a1f96b7e 100644 --- a/chains/evm/deployment/v1_6_0/sequences/adapter.go +++ b/chains/evm/deployment/v1_6_0/sequences/adapter.go @@ -24,7 +24,8 @@ import ( pingpongdapp "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/ping_pong_dapp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" deployops "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" ccipapi "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" @@ -46,8 +47,8 @@ type EVMAdapter struct { func (a *EVMAdapter) GetOnRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) { addr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ ChainSelector: chainSelector, - Type: datastore.ContractType(onramp.ContractType), - Version: onramp.Version, + Type: datastore.ContractType(onrampops.ContractType), + Version: onrampops.Version, }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) if err != nil { return nil, err @@ -272,8 +273,8 @@ func (a *EVMAdapter) GetFQVersion(ds datastore.DataStore, address []byte, chainS func GetFeeQuoterAddressAndVersionFromOnRamp(ds datastore.DataStore, chainSelector uint64, chains cldf_chain.BlockChains) (common.Address, *semver.Version, error) { onRampAddr, err := datastore_utils.FindAndFormatRef(ds, datastore.AddressRef{ ChainSelector: chainSelector, - Type: datastore.ContractType(onramp.ContractType), - Version: onramp.Version, + Type: datastore.ContractType(onrampops.ContractType), + Version: onrampops.Version, }, chainSelector, evm_datastore_utils.ToEVMAddressBytes) if err != nil { return common.Address{}, nil, fmt.Errorf("failed to find onramp address for chain selector %d: %w", chainSelector, err) @@ -284,7 +285,7 @@ func GetFeeQuoterAddressAndVersionFromOnRamp(ds datastore.DataStore, chainSelect return common.Address{}, nil, fmt.Errorf("chain selector %d not found in provided chains", chainSelector) } - onrampContract, err := onramp.NewOnRampContract(common.BytesToAddress(onRampAddr), chain.Client) + onrampContract, err := orbind.NewOnRamp(common.BytesToAddress(onRampAddr), chain.Client) if err != nil { return common.Address{}, nil, fmt.Errorf("failed to create onramp contract instance for chain selector %d: %w", chainSelector, err) } diff --git a/chains/evm/deployment/v1_6_0/sequences/deploy_chain_contracts.go b/chains/evm/deployment/v1_6_0/sequences/deploy_chain_contracts.go index a4f8471555..ca3bf55225 100644 --- a/chains/evm/deployment/v1_6_0/sequences/deploy_chain_contracts.go +++ b/chains/evm/deployment/v1_6_0/sequences/deploy_chain_contracts.go @@ -13,8 +13,8 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/link" - "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -26,12 +26,14 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" pingpongdappops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/ping_pong_dapp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" - fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" - fq163ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/nonce_manager" offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" + fq163ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + fqbind163 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" deployops "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) @@ -53,12 +55,12 @@ func (a *EVMAdapter) FinalizeDeployMCMS() *cldf_ops.Sequence[deployops.MCMSDeplo } // Sets a timelock as admin of a newly deployed timelock -func (a *EVMAdapter) GrantAdminRoleToTimelock() *operations.Sequence[deployops.GrantAdminRoleToTimelockConfigPerChainWithSelector, sequences.OnChainOutput, chain.BlockChains] { +func (a *EVMAdapter) GrantAdminRoleToTimelock() *operations.Sequence[deployops.GrantAdminRoleToTimelockConfigPerChainWithSelector, sequences.OnChainOutput, cldf_chain.BlockChains] { evmDeployer := &evm1_0_0.EVMDeployer{} return evmDeployer.GrantAdminRoleToTimelock() } -func (a *EVMAdapter) UpdateMCMSConfig() *operations.Sequence[deployops.UpdateMCMSConfigInputPerChainWithSelector, sequences.OnChainOutput, chain.BlockChains] { +func (a *EVMAdapter) UpdateMCMSConfig() *operations.Sequence[deployops.UpdateMCMSConfigInputPerChainWithSelector, sequences.OnChainOutput, cldf_chain.BlockChains] { evmDeployer := &evm1_0_0.EVMDeployer{} return evmDeployer.UpdateMCMSConfig() } @@ -95,9 +97,8 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, linkRef) // Deploy RMNRemote - rmnRemoteRef, err := contract.MaybeDeployContract(b, rmn_remote.Deploy, chain, contract.DeployInput[rmn_remote.ConstructorArgs]{ + rmnRemoteRef, err := ops2contract.MaybeDeployContract(b, rmn_remote.Deploy, chain, ops2contract.DeployInput[rmn_remote.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(rmn_remote.ContractType, *rmn_remote.Version), - ChainSelector: chain.Selector, Args: rmn_remote.ConstructorArgs{ LocalChainSelector: chain.Selector, LegacyRMN: common.HexToAddress(input.LegacyRMN), @@ -186,11 +187,10 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, nonceManagerRef) // Deploy FeeQuoter - feeQuoterRef, err := contract.MaybeDeployContract(b, fq163ops.Deploy, chain, contract.DeployInput[fq163ops.ConstructorArgs]{ + feeQuoterRef, err := ops2contract.MaybeDeployContract(b, fq163ops.Deploy, chain, ops2contract.DeployInput[fq163ops.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(fq163ops.ContractType, *fq163ops.Version), - ChainSelector: chain.Selector, Args: fq163ops.ConstructorArgs{ - StaticConfig: fq163ops.StaticConfig{ + StaticConfig: fqbind163.FeeQuoterStaticConfig{ MaxFeeJuelsPerMsg: input.MaxFeeJuelsPerMsg, LinkToken: common.HexToAddress(linkRef.Address), TokenPriceStalenessThreshold: input.TokenPriceStalenessThreshold, @@ -203,9 +203,9 @@ var DeployChainContracts = cldf_ops.NewSequence( common.HexToAddress(linkRef.Address), common.HexToAddress(wethRef.Address), }, - TokenPriceFeeds: []fq163ops.TokenPriceFeedUpdate{}, - TokenTransferFeeConfigArgs: []fq163ops.TokenTransferFeeConfigArgs{}, - PremiumMultiplierWeiPerEthArgs: []fq163ops.PremiumMultiplierWeiPerEthArgs{ + TokenPriceFeeds: []fqbind163.FeeQuoterTokenPriceFeedUpdate{}, + TokenTransferFeeConfigArgs: []fqbind163.FeeQuoterTokenTransferFeeConfigArgs{}, + PremiumMultiplierWeiPerEthArgs: []fqbind163.FeeQuoterPremiumMultiplierWeiPerEthArgs{ { PremiumMultiplierWeiPerEth: input.LinkPremiumMultiplier, Token: common.HexToAddress(linkRef.Address), @@ -215,7 +215,7 @@ var DeployChainContracts = cldf_ops.NewSequence( Token: common.HexToAddress(wethRef.Address), }, }, - DestChainConfigArgs: []fq163ops.DestChainConfigArgs{}, + DestChainConfigArgs: []fqbind163.FeeQuoterDestChainConfigArgs{}, }, }, input.ExistingAddresses) if err != nil { @@ -224,18 +224,17 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, feeQuoterRef) // Deploy OffRamp - offRampRef, err := contract.MaybeDeployContract(b, offrampops.Deploy, chain, contract.DeployInput[offrampops.ConstructorArgs]{ + offRampRef, err := ops2contract.MaybeDeployContract(b, offrampops.Deploy, chain, ops2contract.DeployInput[offrampops.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(offrampops.ContractType, *offrampops.Version), - ChainSelector: chain.Selector, Args: offrampops.ConstructorArgs{ - StaticConfig: offrampops.StaticConfig{ + StaticConfig: offbind.OffRampStaticConfig{ ChainSelector: chain.Selector, GasForCallExactCheck: input.GasForCallExactCheck, RmnRemote: common.HexToAddress(rmnProxyRef.Address), NonceManager: common.HexToAddress(nonceManagerRef.Address), TokenAdminRegistry: common.HexToAddress(tokenAdminRegistryRef.Address), }, - DynamicConfig: offrampops.DynamicConfig{ + DynamicConfig: offbind.OffRampDynamicConfig{ FeeQuoter: common.HexToAddress(feeQuoterRef.Address), PermissionLessExecutionThresholdSeconds: input.PermissionLessExecutionThresholdSeconds, MessageInterceptor: common.HexToAddress(input.MessageInterceptor), @@ -248,19 +247,21 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, offRampRef) // Deploy OnRamp - onRampRef, err := contract.MaybeDeployContract(b, onrampops.Deploy, chain, contract.DeployInput[onrampops.ConstructorArgs]{ + onRampRef, err := ops2contract.MaybeDeployContract(b, onrampops.Deploy, chain, ops2contract.DeployInput[onrampops.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(onrampops.ContractType, *onrampops.Version), - ChainSelector: chain.Selector, Args: onrampops.ConstructorArgs{ - StaticConfig: onrampops.StaticConfig{ + StaticConfig: orbind.OnRampStaticConfig{ ChainSelector: chain.Selector, RmnRemote: common.HexToAddress(rmnProxyRef.Address), TokenAdminRegistry: common.HexToAddress(tokenAdminRegistryRef.Address), NonceManager: common.HexToAddress(nonceManagerRef.Address), }, - DynamicConfig: onrampops.DynamicConfig{ - FeeQuoter: common.HexToAddress(feeQuoterRef.Address), - FeeAggregator: chain.DeployerKey.From, + DynamicConfig: orbind.OnRampDynamicConfig{ + FeeQuoter: common.HexToAddress(feeQuoterRef.Address), + ReentrancyGuardEntered: false, + MessageInterceptor: common.Address{}, + FeeAggregator: chain.DeployerKey.From, + AllowlistAdmin: common.Address{}, }, }, }, input.ExistingAddresses) @@ -346,11 +347,13 @@ var DeployChainContracts = cldf_ops.NewSequence( return sequences.OnChainOutput{}, err } - // Add Authorized Caller to FQ - _, err = cldf_ops.ExecuteOperation(b, fqops.ApplyAuthorizedCallerUpdates, chain, contract.FunctionInput[fqops.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(feeQuoterRef.Address), - Args: fqops.AuthorizedCallerArgs{ + // Add Authorized Caller to FQ (v1.6.3 FeeQuoter) + fq163Contract, err := fqbind163.NewFeeQuoter(common.HexToAddress(feeQuoterRef.Address), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind fee quoter: %w", err) + } + _, err = cldf_ops.ExecuteOperation(b, fq163ops.NewWriteApplyAuthorizedCallerUpdates(fq163Contract), chain, ops2contract.FunctionInput[fqbind163.AuthorizedCallersAuthorizedCallerArgs]{ + Args: fqbind163.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{ common.HexToAddress(offRampRef.Address), }, diff --git a/chains/evm/deployment/v1_6_0/sequences/deploy_token_pool_contracts.go b/chains/evm/deployment/v1_6_0/sequences/deploy_token_pool_contracts.go index fa80292c95..00c1069883 100644 --- a/chains/evm/deployment/v1_6_0/sequences/deploy_token_pool_contracts.go +++ b/chains/evm/deployment/v1_6_0/sequences/deploy_token_pool_contracts.go @@ -8,6 +8,7 @@ import ( mcms_types "github.com/smartcontractkit/mcms/types" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -140,9 +141,8 @@ var DeployTokenPool = cldf_ops.NewSequence( switch typeAndVersion { // v1.6.1 pools case v1_6_1_burn_mint_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_burn_mint_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_burn_mint_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_burn_mint_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_burn_mint_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_burn_mint_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_burn_mint_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -157,9 +157,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_burn_from_mint_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_burn_from_mint_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_burn_from_mint_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_burn_from_mint_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_burn_from_mint_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_burn_from_mint_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_burn_from_mint_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -174,9 +173,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_burn_mint_with_lock_release_flag_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_burn_mint_with_lock_release_flag_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_burn_mint_with_lock_release_flag_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_burn_mint_with_lock_release_flag_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_burn_mint_with_lock_release_flag_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_burn_mint_with_lock_release_flag_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_burn_mint_with_lock_release_flag_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -191,9 +189,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_burn_to_address_mint_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_burn_to_address_mint_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_burn_to_address_mint_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_burn_to_address_mint_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_burn_to_address_mint_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_burn_to_address_mint_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_burn_to_address_mint_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -209,9 +206,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_burn_with_from_mint_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_burn_with_from_mint_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_burn_with_from_mint_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_burn_with_from_mint_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_burn_with_from_mint_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_burn_with_from_mint_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_burn_with_from_mint_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -226,9 +222,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_lock_release_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_lock_release_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_lock_release_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_lock_release_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_lock_release_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_lock_release_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_lock_release_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, @@ -243,9 +238,8 @@ var DeployTokenPool = cldf_ops.NewSequence( } case v1_6_1_siloed_lock_release_token_pool.TypeAndVersion.String(): - poolRef, err = contract.MaybeDeployContract(b, v1_6_1_siloed_lock_release_token_pool.Deploy, chain, contract.DeployInput[v1_6_1_siloed_lock_release_token_pool.ConstructorArgs]{ + poolRef, err = ops2contract.MaybeDeployContract(b, v1_6_1_siloed_lock_release_token_pool.Deploy, chain, ops2contract.DeployInput[v1_6_1_siloed_lock_release_token_pool.ConstructorArgs]{ TypeAndVersion: v1_6_1_siloed_lock_release_token_pool.TypeAndVersion, - ChainSelector: chain.Selector, Args: v1_6_1_siloed_lock_release_token_pool.ConstructorArgs{ Token: common.HexToAddress(tokenAddr), LocalTokenDecimals: tokenDecimal, diff --git a/chains/evm/deployment/v1_6_0/sequences/fee_quoter.go b/chains/evm/deployment/v1_6_0/sequences/fee_quoter.go index a806235bed..dc20a0cee7 100644 --- a/chains/evm/deployment/v1_6_0/sequences/fee_quoter.go +++ b/chains/evm/deployment/v1_6_0/sequences/fee_quoter.go @@ -12,30 +12,31 @@ import ( "golang.org/x/sync/errgroup" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" + fqops0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) type FeeQuoterApplyDestChainConfigUpdatesSequenceInput struct { Address common.Address ChainSelector uint64 - UpdatesByChain []fqops.DestChainConfigArgs + UpdatesByChain []fqbind.FeeQuoterDestChainConfigArgs } type FeeQuoterUpdatePricesSequenceInput struct { Address common.Address ChainSelector uint64 - UpdatesByChain fqops.PriceUpdates + UpdatesByChain fqbind.InternalPriceUpdates } type FeeQuoterApplyTokenTransferFeeConfigUpdatesSequenceInput struct { Address common.Address ChainSelector uint64 - UpdatesByChain fqops.ApplyTokenTransferFeeConfigUpdatesArgs + UpdatesByChain fqops0.ApplyTokenTransferFeeConfigUpdatesArgs } type FeeQuoterImportConfigSequenceInput struct { @@ -48,13 +49,13 @@ type FeeQuoterImportConfigSequenceInput struct { type FeeQuoterImportConfigSequenceOutput struct { RemoteChainCfgs map[uint64]FeeQuoterImportConfigSequenceOutputPerRemoteChain PriceUpdaters []common.Address - StaticCfg fqops.StaticConfig + StaticCfg fqbind.FeeQuoterStaticConfig TokenPrices map[common.Address]*big.Int } type FeeQuoterImportConfigSequenceOutputPerRemoteChain struct { - DestChainCfg fqops.DestChainConfig - TokenTransferFeeCfgs map[common.Address]fqops.TokenTransferFeeConfig + DestChainCfg fqbind.FeeQuoterDestChainConfig + TokenTransferFeeCfgs map[common.Address]fqbind.FeeQuoterTokenTransferFeeConfig GasPrice *big.Int } @@ -64,21 +65,23 @@ var ( semver.MustParse("1.6.0"), "Apply updates to destination chain configs on the FeeQuoter 1.6.0 contract across multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input FeeQuoterApplyDestChainConfigUpdatesSequenceInput) (sequences.OnChainOutput, error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, fqops.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]fqops.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: input.UpdatesByChain, + fq, err := fqbind.NewFeeQuoter(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind fee quoter: %w", err) + } + report, err := operations.ExecuteOperation(b, fqops0.NewWriteApplyDestChainConfigUpdates(fq), chain, ops2contract.FunctionInput[[]fqbind.FeeQuoterDestChainConfigArgs]{ + Args: input.UpdatesByChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute FeeQuoterApplyDestChainConfigUpdatesOp on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -92,21 +95,23 @@ var ( semver.MustParse("1.6.0"), "Update token and gas prices on FeeQuoter 1.6.0 contracts on multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input FeeQuoterUpdatePricesSequenceInput) (sequences.OnChainOutput, error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, fqops.UpdatePrices, chain, contract.FunctionInput[fqops.PriceUpdates]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: input.UpdatesByChain, + fq, err := fqbind.NewFeeQuoter(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind fee quoter: %w", err) + } + report, err := operations.ExecuteOperation(b, fqops0.NewWriteUpdatePrices(fq), chain, ops2contract.FunctionInput[fqbind.InternalPriceUpdates]{ + Args: input.UpdatesByChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute FeeQuoterUpdatePricesOp on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -120,21 +125,23 @@ var ( semver.MustParse("1.6.0"), "Update token transfer fee configs on FeeQuoter 1.6.0 contracts on multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input FeeQuoterApplyTokenTransferFeeConfigUpdatesSequenceInput) (sequences.OnChainOutput, error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, fqops.ApplyTokenTransferFeeConfigUpdates, chain, contract.FunctionInput[fqops.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: input.UpdatesByChain, + fq, err := fqbind.NewFeeQuoter(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind fee quoter: %w", err) + } + report, err := operations.ExecuteOperation(b, fqops0.NewWriteApplyTokenTransferFeeConfigUpdates(fq), chain, ops2contract.FunctionInput[fqops0.ApplyTokenTransferFeeConfigUpdatesArgs]{ + Args: input.UpdatesByChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute FeeQuoterApplyTokenTransferFeeConfigUpdatesOp on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -156,18 +163,22 @@ var ( fqAddress := in.Address chainSelector := in.ChainSelector b.Logger.Infof("Importing configuration for FeeQuoter %s on chain %d (%s)", fqAddress.Hex(), chainSelector, evmChain.Name()) + + fq, err := fqbind.NewFeeQuoter(fqAddress, evmChain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind fee quoter: %w", err) + } + fqOutput := make(map[uint64]FeeQuoterImportConfigSequenceOutputPerRemoteChain) - destChainConfigs := make(map[uint64]fqops.DestChainConfig) + destChainConfigs := make(map[uint64]fqbind.FeeQuoterDestChainConfig) var destChainMu sync.Mutex destGrp, _ := errgroup.WithContext(b.GetContext()) destGrp.SetLimit(10) gasPricePerChain := make(map[uint64]*big.Int) gasPriceMu := sync.Mutex{} // fetch fee tokens - feeTokensRep, err := operations.ExecuteOperation(b, fqops.GetFeeTokens, evmChain, contract.FunctionInput[struct{}]{ - Address: fqAddress, - ChainSelector: chainSelector, - Args: struct{}{}, + feeTokensRep, err := operations.ExecuteOperation(b, fqops0.NewReadGetFeeTokens(fq), evmChain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get fee tokens from feequoter %s on chain %s: %w", @@ -176,10 +187,8 @@ var ( for _, remoteChain := range in.RemoteChains { remoteChain := remoteChain destGrp.Go(func() error { - opsOutput, err := operations.ExecuteOperation(b, fqops.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - Address: fqAddress, - ChainSelector: chainSelector, - Args: remoteChain, + opsOutput, err := operations.ExecuteOperation(b, fqops0.NewReadGetDestChainConfig(fq), evmChain, ops2contract.FunctionInput[uint64]{ + Args: remoteChain, }) if err != nil { return fmt.Errorf("failed to get dest chain config for "+ @@ -192,10 +201,8 @@ var ( destChainMu.Lock() destChainConfigs[remoteChain] = opsOutput.Output destChainMu.Unlock() - gasPriceOutput, err := operations.ExecuteOperation(b, fqops.GetDestinationChainGasPrice, evmChain, contract.FunctionInput[uint64]{ - Address: fqAddress, - ChainSelector: chainSelector, - Args: remoteChain, + gasPriceOutput, err := operations.ExecuteOperation(b, fqops0.NewReadGetDestinationChainGasPrice(fq), evmChain, ops2contract.FunctionInput[uint64]{ + Args: remoteChain, }) if err != nil { return fmt.Errorf("failed to get destination chain gas price for "+ @@ -212,7 +219,7 @@ var ( return sequences.OnChainOutput{}, err } - tokenTransferFeeCfgsPerChain := make(map[uint64]map[common.Address]fqops.TokenTransferFeeConfig) + tokenTransferFeeCfgsPerChain := make(map[uint64]map[common.Address]fqbind.FeeQuoterTokenTransferFeeConfig) allTokens := make(map[common.Address]struct{}) var ttfcMu sync.Mutex tokenGrp, _ := errgroup.WithContext(b.GetContext()) @@ -237,7 +244,7 @@ var ( return nil // skip if dest chain config is not enabled } - tokenTransferFeeCfgs := make(map[common.Address]fqops.TokenTransferFeeConfig) + tokenTransferFeeCfgs := make(map[common.Address]fqbind.FeeQuoterTokenTransferFeeConfig) var tokenTransferFeeCfgsMu sync.Mutex innerTokenGrp, _ := errgroup.WithContext(b.GetContext()) innerTokenGrp.SetLimit(10) @@ -247,11 +254,9 @@ var ( continue } innerTokenGrp.Go(func() error { - opsOutput, err := operations.ExecuteOperation(b, fqops.GetTokenTransferFeeConfig, evmChain, - contract.FunctionInput[fqops.GetTokenTransferFeeConfigArgs]{ - Address: fqAddress, - ChainSelector: chainSelector, - Args: fqops.GetTokenTransferFeeConfigArgs{ + opsOutput, err := operations.ExecuteOperation(b, fqops0.NewReadGetTokenTransferFeeConfig(fq), evmChain, + ops2contract.FunctionInput[fqops0.GetTokenTransferFeeConfigArgs]{ + Args: fqops0.GetTokenTransferFeeConfigArgs{ Token: token, DestChainSelector: remoteChain, }, @@ -291,17 +296,15 @@ var ( GasPrice: gasPricePerChain[remoteChain], } } - staticCfgOutput, err := operations.ExecuteOperation(b, fqops.GetStaticConfig, evmChain, contract.FunctionInput[struct{}]{ - Address: fqAddress, - ChainSelector: chainSelector, + staticCfgOutput, err := operations.ExecuteOperation(b, fqops0.NewReadGetStaticConfig(fq), evmChain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get static config from feequoter %s on chain %d: %w", fqAddress.Hex(), chainSelector, err) } - priceUpdaters, err := operations.ExecuteOperation(b, fqops.GetAllAuthorizedCallers, evmChain, contract.FunctionInput[struct{}]{ - Address: fqAddress, - ChainSelector: chainSelector, + priceUpdaters, err := operations.ExecuteOperation(b, fqops0.NewReadGetAllAuthorizedCallers(fq), evmChain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get all authorized callers from feequoter %s on chain %d: %w", @@ -317,10 +320,8 @@ var ( tokenSlice := maps.Keys(allTokens) // add fee tokens - tokenPrices, err := operations.ExecuteOperation(b, fqops.GetTokenPrices, evmChain, contract.FunctionInput[[]common.Address]{ - Address: fqAddress, - ChainSelector: chainSelector, - Args: tokenSlice, + tokenPrices, err := operations.ExecuteOperation(b, fqops0.NewReadGetTokenPrices(fq), evmChain, ops2contract.FunctionInput[[]common.Address]{ + Args: tokenSlice, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token prices from feequoter %s on chain %d: %w", diff --git a/chains/evm/deployment/v1_6_0/sequences/ocr.go b/chains/evm/deployment/v1_6_0/sequences/ocr.go index 2bb3893823..b673a3959b 100644 --- a/chains/evm/deployment/v1_6_0/sequences/ocr.go +++ b/chains/evm/deployment/v1_6_0/sequences/ocr.go @@ -5,14 +5,17 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" - deployops "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" - "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" + mcms_types "github.com/smartcontractkit/mcms/types" + cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" - mcms_types "github.com/smartcontractkit/mcms/types" + + offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + deployops "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" + "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) func (a *EVMAdapter) SetOCR3Config() *cldf_ops.Sequence[deployops.SetOCR3ConfigInput, sequences.OnChainOutput, cldf_chain.BlockChains] { @@ -24,49 +27,52 @@ var SetOCR3Config = cldf_ops.NewSequence( semver.MustParse("1.6.0"), "Sets the OCR3 configuration for CCIP 1.6.0 on an EVM chain", func(b operations.Bundle, chains cldf_chain.BlockChains, input deployops.SetOCR3ConfigInput) (output sequences.OnChainOutput, err error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } e := &EVMAdapter{} offRampAddr, err := e.GetOffRampAddress(input.Datastore, input.ChainSelector) - if err != nil { - return sequences.OnChainOutput{}, err - } - update := make([]offrampops.OCRConfigArgs, 0) - for _, cfg := range input.Configs { - var signerAddresses []common.Address - var transmitterAddresses []common.Address - for _, s := range cfg.Signers { - signerAddresses = append(signerAddresses, common.BytesToAddress(s)) + if err != nil { + return sequences.OnChainOutput{}, err } - for _, t := range cfg.Transmitters { - transmitterAddresses = append(transmitterAddresses, common.BytesToAddress(t)) + offContract, err := offbind.NewOffRamp(common.BytesToAddress(offRampAddr), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind offRamp: %w", err) + } + update := make([]offbind.MultiOCR3BaseOCRConfigArgs, 0) + for _, cfg := range input.Configs { + var signerAddresses []common.Address + var transmitterAddresses []common.Address + for _, s := range cfg.Signers { + signerAddresses = append(signerAddresses, common.BytesToAddress(s)) + } + for _, t := range cfg.Transmitters { + transmitterAddresses = append(transmitterAddresses, common.BytesToAddress(t)) + } + update = append(update, offbind.MultiOCR3BaseOCRConfigArgs{ + ConfigDigest: cfg.ConfigDigest, + OcrPluginType: uint8(cfg.PluginType), + F: cfg.F, + IsSignatureVerificationEnabled: cfg.IsSignatureVerificationEnabled, + Signers: signerAddresses, + Transmitters: transmitterAddresses, + }) } - update = append(update, offrampops.OCRConfigArgs{ - ConfigDigest: cfg.ConfigDigest, - OcrPluginType: uint8(cfg.PluginType), - F: cfg.F, - IsSignatureVerificationEnabled: cfg.IsSignatureVerificationEnabled, - Signers: signerAddresses, - Transmitters: transmitterAddresses, + report, err := operations.ExecuteOperation(b, offrampops.NewWriteSetOCR3Configs(offContract), chain, ops2contract.FunctionInput[[]offbind.MultiOCR3BaseOCRConfigArgs]{ + Args: update, }) - } - report, err := operations.ExecuteOperation(b, offrampops.SetOCR3Configs, chain, contract.FunctionInput[[]offrampops.OCRConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.BytesToAddress(offRampAddr), - Args: update, - }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute OffRampSetOcr3 on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } return sequences.OnChainOutput{ BatchOps: []mcms_types.BatchOperation{batch}, }, nil - }) + }, +) diff --git a/chains/evm/deployment/v1_6_0/sequences/offramp.go b/chains/evm/deployment/v1_6_0/sequences/offramp.go index e84486e358..b95134cf5b 100644 --- a/chains/evm/deployment/v1_6_0/sequences/offramp.go +++ b/chains/evm/deployment/v1_6_0/sequences/offramp.go @@ -8,19 +8,19 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) type OffRampApplySourceChainConfigUpdatesSequenceInput struct { Address common.Address ChainSelector uint64 - UpdatesByChain []offrampops.SourceChainConfigArgs + UpdatesByChain []offbind.OffRampSourceChainConfigArgs } type OffRampImportConfigSequenceInput struct { @@ -30,9 +30,9 @@ type OffRampImportConfigSequenceInput struct { } type OffRampImportConfigSequenceOutput struct { - SourceChainCfgs map[uint64]offrampops.SourceChainConfig - StaticConfig offrampops.StaticConfig - DynamicConfig offrampops.DynamicConfig + SourceChainCfgs map[uint64]offbind.OffRampSourceChainConfig + StaticConfig offbind.OffRampStaticConfig + DynamicConfig offbind.OffRampDynamicConfig } var ( @@ -41,21 +41,23 @@ var ( semver.MustParse("1.6.0"), "Applies updates to source chain configurations stored on OffRamp contracts on multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input OffRampApplySourceChainConfigUpdatesSequenceInput) (sequences.OnChainOutput, error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, offrampops.ApplySourceChainConfigUpdates, chain, contract.FunctionInput[[]offrampops.SourceChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: input.UpdatesByChain, + oor, err := offbind.NewOffRamp(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind off ramp: %w", err) + } + report, err := operations.ExecuteOperation(b, offrampops.NewWriteApplySourceChainConfigUpdates(oor), chain, ops2contract.FunctionInput[[]offbind.OffRampSourceChainConfigArgs]{ + Args: input.UpdatesByChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute OffRampApplySourceChainConfigUpdatesOp on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -70,33 +72,33 @@ var ( "Imports OffRamp contract configuration from multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input OffRampImportConfigSequenceInput) (sequences.OnChainOutput, error) { output := OffRampImportConfigSequenceOutput{ - SourceChainCfgs: make(map[uint64]offrampops.SourceChainConfig), + SourceChainCfgs: make(map[uint64]offbind.OffRampSourceChainConfig), } chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, offrampops.GetStaticConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: input.Address, + oor, err := offbind.NewOffRamp(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind off ramp: %w", err) + } + report, err := operations.ExecuteOperation(b, offrampops.NewReadGetStaticConfig(oor), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute GetStaticConfig on %s: %w", chain, err) } output.StaticConfig = report.Output - out, err := operations.ExecuteOperation(b, offrampops.GetDynamicConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: input.Address, + out, err := operations.ExecuteOperation(b, offrampops.NewReadGetDynamicConfig(oor), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute GetDynamicConfig on %s: %w", chain, err) } output.DynamicConfig = out.Output for _, remoteChain := range input.RemoteChains { - report, err := operations.ExecuteOperation(b, offrampops.GetSourceChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: remoteChain, + report, err := operations.ExecuteOperation(b, offrampops.NewReadGetSourceChainConfig(oor), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute GetSourceChainConfig for chain %d on %s: %w", remoteChain, chain, err) diff --git a/chains/evm/deployment/v1_6_0/sequences/onramp.go b/chains/evm/deployment/v1_6_0/sequences/onramp.go index faf75f257c..994a042ee8 100644 --- a/chains/evm/deployment/v1_6_0/sequences/onramp.go +++ b/chains/evm/deployment/v1_6_0/sequences/onramp.go @@ -8,18 +8,19 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) type OnRampApplyDestChainConfigUpdatesSequenceInput struct { Address common.Address ChainSelector uint64 - UpdatesByChain []onrampops.DestChainConfigArgs + UpdatesByChain []orbind.OnRampDestChainConfigArgs } type OnRampImportConfigSequenceInput struct { @@ -29,9 +30,9 @@ type OnRampImportConfigSequenceInput struct { } type OnRampImportConfigSequenceOutput struct { - DestChainCfgs map[uint64]onrampops.GetDestChainConfigResult - StaticConfig onrampops.StaticConfig - DynamicConfig onrampops.DynamicConfig + DestChainCfgs map[uint64]orbind.GetDestChainConfig + StaticConfig orbind.OnRampStaticConfig + DynamicConfig orbind.OnRampDynamicConfig } var ( @@ -40,21 +41,23 @@ var ( semver.MustParse("1.6.0"), "Applies updates to destination chain configurations stored on OnRamp contracts on multiple EVM chains", func(b operations.Bundle, chains cldf_chain.BlockChains, input OnRampApplyDestChainConfigUpdatesSequenceInput) (sequences.OnChainOutput, error) { - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) chain, ok := chains.EVMChains()[input.ChainSelector] if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - report, err := operations.ExecuteOperation(b, onrampops.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]onrampops.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: input.UpdatesByChain, + or, err := orbind.NewOnRamp(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind on ramp: %w", err) + } + report, err := operations.ExecuteOperation(b, onrampops.NewWriteApplyDestChainConfigUpdates(or), chain, ops2contract.FunctionInput[[]orbind.OnRampDestChainConfigArgs]{ + Args: input.UpdatesByChain, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute OnRampApplyDestChainConfigUpdatesOp on %s: %w", chain, err) } writes = append(writes, report.Output) - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -72,29 +75,29 @@ var ( if !ok { return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", input.ChainSelector) } - onRampDestConfigs := make(map[uint64]onrampops.GetDestChainConfigResult) + or, err := orbind.NewOnRamp(input.Address, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind on ramp: %w", err) + } + onRampDestConfigs := make(map[uint64]orbind.GetDestChainConfig) for _, remoteChain := range input.RemoteChains { - report, err := operations.ExecuteOperation(b, onrampops.GetDestChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: input.Address, - Args: remoteChain, + report, err := operations.ExecuteOperation(b, onrampops.NewReadGetDestChainConfig(or), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChain, }) - onRampDestConfigs[remoteChain] = report.Output if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get dest chain config for chain %d from OnRamp at %s on %s: %w", remoteChain, input.Address.String(), chain, err) } + onRampDestConfigs[remoteChain] = report.Output } - report, err := operations.ExecuteOperation(b, onrampops.GetStaticConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: input.Address, + report, err := operations.ExecuteOperation(b, onrampops.NewReadGetStaticConfig(or), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get static config from OnRamp at %s on %s: %w", input.Address.String(), chain, err) } staticConfig := report.Output - out, err := operations.ExecuteOperation(b, onrampops.GetDynamicConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: input.Address, + out, err := operations.ExecuteOperation(b, onrampops.NewReadGetDynamicConfig(or), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get dynamic config from OnRamp at %s on %s: %w", input.Address.String(), chain, err) diff --git a/chains/evm/deployment/v1_6_0/sequences/rmn_remote.go b/chains/evm/deployment/v1_6_0/sequences/rmn_remote.go index 9d1cfab61d..8adf025fea 100644 --- a/chains/evm/deployment/v1_6_0/sequences/rmn_remote.go +++ b/chains/evm/deployment/v1_6_0/sequences/rmn_remote.go @@ -6,11 +6,12 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" + rmnbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_remote" api "github.com/smartcontractkit/chainlink-ccip/deployment/fastcurse" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -26,22 +27,22 @@ var SeqCurse = cldf_ops.NewSequence( semver.MustParse("1.0.0"), "Cursing subjects with RMNRemote", func(b cldf_ops.Bundle, chain cldf_evm.Chain, in SeqCurseInput) (output sequences.OnChainOutput, err error) { - // Use Curse0 which takes an array of subjects - opOutput, err := cldf_ops.ExecuteOperation(b, ops.Curse0, chain, contract.FunctionInput[[][16]byte]{ - Address: in.Addr, - ChainSelector: chain.Selector, - Args: in.Subjects, + rmn, err := rmnbind.NewRMNRemote(in.Addr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind RMNRemote: %w", err) + } + opOutput, err := cldf_ops.ExecuteOperation(b, ops.NewWriteCurse0(rmn), chain, ops2contract.FunctionInput[[][16]byte]{ + Args: in.Subjects, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to curse subjects with RMNRemote at %s on chain %d: %w", in.Addr.String(), chain.Selector, err) } - - batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{opOutput.Output}) + + batchOp, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{opOutput.Output}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } - output.BatchOps = append(output.BatchOps, batchOp) return sequences.OnChainOutput{BatchOps: []mcms_types.BatchOperation{batchOp}}, nil }) @@ -50,21 +51,21 @@ var SeqUncurse = cldf_ops.NewSequence( semver.MustParse("1.0.0"), "Uncursing subjects with RMNRemote", func(b cldf_ops.Bundle, chain cldf_evm.Chain, in SeqCurseInput) (output sequences.OnChainOutput, err error) { - // Use Uncurse0 which takes an array of subjects - opOutput, err := cldf_ops.ExecuteOperation(b, ops.Uncurse0, chain, contract.FunctionInput[[][16]byte]{ - Address: in.Addr, - ChainSelector: chain.Selector, - Args: in.Subjects, + rmn, err := rmnbind.NewRMNRemote(in.Addr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind RMNRemote: %w", err) + } + opOutput, err := cldf_ops.ExecuteOperation(b, ops.NewWriteUncurse0(rmn), chain, ops2contract.FunctionInput[[][16]byte]{ + Args: in.Subjects, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to uncurse subjects with RMNRemote at %s on chain %d: %w", in.Addr.String(), chain.Selector, err) } - - batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{opOutput.Output}) + + batchOp, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{opOutput.Output}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } - output.BatchOps = append(output.BatchOps, batchOp) return sequences.OnChainOutput{BatchOps: []mcms_types.BatchOperation{batchOp}}, nil }) diff --git a/chains/evm/deployment/v1_6_0/sequences/update_lanes.go b/chains/evm/deployment/v1_6_0/sequences/update_lanes.go index 661e2f6166..9c3b92cdb3 100644 --- a/chains/evm/deployment/v1_6_0/sequences/update_lanes.go +++ b/chains/evm/deployment/v1_6_0/sequences/update_lanes.go @@ -11,14 +11,18 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" - offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" + fqops0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" - fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" fqops2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" + fqbind160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + fqbind2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) @@ -49,7 +53,7 @@ var ConfigureLaneLegAsSource = operations.NewSequence( result, err = sequences.RunAndMergeSequence(b, chains, FeeQuoterApplyDestChainConfigUpdatesSequence, FeeQuoterApplyDestChainConfigUpdatesSequenceInput{ Address: fqAddr, ChainSelector: input.Source.Selector, - UpdatesByChain: []fqops.DestChainConfigArgs{ + UpdatesByChain: []fqbind160.FeeQuoterDestChainConfigArgs{ { DestChainSelector: input.Dest.Selector, DestChainConfig: TranslateFQ(input.Dest.FeeQuoterDestChainConfig), @@ -72,7 +76,7 @@ var ConfigureLaneLegAsSource = operations.NewSequence( result, err = sequences.RunAndMergeSequence(b, chains, FeeQuoterUpdatePricesSequence, FeeQuoterUpdatePricesSequenceInput{ Address: fqAddr, ChainSelector: input.Source.Selector, - UpdatesByChain: fqops.PriceUpdates{ + UpdatesByChain: fqbind160.InternalPriceUpdates{ GasPriceUpdates: translateGasPrice(input.Dest.Selector, input.Dest.GasPrice), TokenPriceUpdates: TranslateTokenPrices(input.Source.TokenPrices), }, @@ -88,7 +92,7 @@ var ConfigureLaneLegAsSource = operations.NewSequence( result, err = sequences.RunAndMergeSequence(b, chains, OnRampApplyDestChainConfigUpdatesSequence, OnRampApplyDestChainConfigUpdatesSequenceInput{ Address: common.BytesToAddress(input.Source.OnRamp), ChainSelector: input.Source.Selector, - UpdatesByChain: []onrampops.DestChainConfigArgs{ + UpdatesByChain: []orbind.OnRampDestChainConfigArgs{ { Router: common.BytesToAddress(input.Source.Router), DestChainSelector: input.Dest.Selector, @@ -139,7 +143,7 @@ var ConfigureLaneLegAsDest = operations.NewSequence( result, err := sequences.RunAndMergeSequence(b, chains, OffRampApplySourceChainConfigUpdatesSequence, OffRampApplySourceChainConfigUpdatesSequenceInput{ Address: common.BytesToAddress(input.Dest.OffRamp), ChainSelector: input.Dest.Selector, - UpdatesByChain: []offrampops.SourceChainConfigArgs{ + UpdatesByChain: []offbind.OffRampSourceChainConfigArgs{ { Router: common.BytesToAddress(input.Dest.Router), SourceChainSelector: input.Source.Selector, @@ -209,10 +213,12 @@ func feeQuoterPricesAlreadySeeded( sourceChainSelector uint64, destChainSelector uint64, ) (bool, error) { - rep, err := operations.ExecuteOperation(b, fqops.GetDestinationChainGasPrice, chain, contract.FunctionInput[uint64]{ - ChainSelector: sourceChainSelector, - Address: feeQuoter, - Args: destChainSelector, + fq, err := fqbind160.NewFeeQuoter(feeQuoter, chain.Client) + if err != nil { + return false, fmt.Errorf("bind fee quoter: %w", err) + } + rep, err := operations.ExecuteOperation(b, fqops0.NewReadGetDestinationChainGasPrice(fq), chain, ops2contract.FunctionInput[uint64]{ + Args: destChainSelector, }) if err != nil { return false, fmt.Errorf("read destination gas price from fee quoter: %w", err) @@ -228,22 +234,24 @@ func feeQuoterV2PricesAlreadySeeded( sourceChainSelector uint64, destChainSelector uint64, ) (bool, error) { - rep, err := operations.ExecuteOperation(b, fqops2.GetDestinationChainGasPrice, chain, contract.FunctionInput[uint64]{ - ChainSelector: sourceChainSelector, - Address: feeQuoter, - Args: destChainSelector, + fq, err := fqbind2.NewFeeQuoter(feeQuoter, chain.Client) + if err != nil { + return false, fmt.Errorf("bind fee quoter v2: %w", err) + } + rep, err := operations.ExecuteOperation(b, fqops2.NewReadGetDestinationChainGasPrice(fq), chain, ops2contract.FunctionInput[uint64]{ + Args: destChainSelector, }) if err != nil { return false, fmt.Errorf("read destination gas price from fee quoter v2: %w", err) } - return rep.Output.Timestamp > 0, nil + return rep.Output.Timestamp > 0 && rep.Output.Value != nil && rep.Output.Value.Cmp(big.NewInt(0)) > 0, nil } -func translateGasPrice(destChainSelector uint64, gasPrice *big.Int) []fqops.GasPriceUpdate { +func translateGasPrice(destChainSelector uint64, gasPrice *big.Int) []fqbind160.InternalGasPriceUpdate { if gasPrice == nil { return nil } - return []fqops.GasPriceUpdate{{DestChainSelector: destChainSelector, UsdPerUnitGas: gasPrice}} + return []fqbind160.InternalGasPriceUpdate{{DestChainSelector: destChainSelector, UsdPerUnitGas: gasPrice}} } // applyOnRampAllowlist reconciles the on-chain allowlist with the desired state @@ -255,10 +263,12 @@ func applyOnRampAllowlist(b operations.Bundle, chain cldf_evm.Chain, input lanes } onRampAddr := common.BytesToAddress(input.Source.OnRamp) - currentRep, err := operations.ExecuteOperation(b, onrampops.GetAllowedSendersList, chain, contract.FunctionInput[uint64]{ - ChainSelector: input.Source.Selector, - Address: onRampAddr, - Args: input.Dest.Selector, + or, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return fmt.Errorf("bind on ramp: %w", err) + } + currentRep, err := operations.ExecuteOperation(b, onrampops.NewReadGetAllowedSendersList(or), chain, ops2contract.FunctionInput[uint64]{ + Args: input.Dest.Selector, }) if err != nil { return fmt.Errorf("read current onramp allowlist: %w", err) @@ -279,10 +289,8 @@ func applyOnRampAllowlist(b operations.Bundle, chain cldf_evm.Chain, input lanes return nil } - writeRep, err := operations.ExecuteOperation(b, onrampops.ApplyAllowlistUpdates, chain, contract.FunctionInput[[]onrampops.AllowlistConfigArgs]{ - ChainSelector: input.Source.Selector, - Address: onRampAddr, - Args: []onrampops.AllowlistConfigArgs{{ + writeRep, err := operations.ExecuteOperation(b, onrampops.NewWriteApplyAllowlistUpdates(or), chain, ops2contract.FunctionInput[[]orbind.OnRampAllowlistConfigArgs]{ + Args: []orbind.OnRampAllowlistConfigArgs{{ DestChainSelector: input.Dest.Selector, AllowlistEnabled: input.Source.AllowListEnabled, AddedAllowlistedSenders: added, @@ -292,7 +300,7 @@ func applyOnRampAllowlist(b operations.Bundle, chain cldf_evm.Chain, input lanes if err != nil { return fmt.Errorf("apply onramp allowlist updates: %w", err) } - batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{writeRep.Output}) + batch, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{writeRep.Output}) if err != nil { return err } @@ -338,12 +346,12 @@ func (a *EVMAdapter) ConfigureLaneLegAsDest() *operations.Sequence[lanes.UpdateL return ConfigureLaneLegAsDest } -func TranslateFQ(fqc lanes.FeeQuoterDestChainConfig) fqops.DestChainConfig { +func TranslateFQ(fqc lanes.FeeQuoterDestChainConfig) fqbind160.FeeQuoterDestChainConfig { var v1 lanes.FeeQuoterV1Params if fqc.V1Params != nil { v1 = *fqc.V1Params } - return fqops.DestChainConfig{ + return fqbind160.FeeQuoterDestChainConfig{ IsEnabled: fqc.IsEnabled, MaxNumberOfTokensPerMsg: v1.MaxNumberOfTokensPerMsg, MaxDataBytes: fqc.MaxDataBytes, @@ -366,12 +374,12 @@ func TranslateFQ(fqc lanes.FeeQuoterDestChainConfig) fqops.DestChainConfig { } } -func TranslateFQtoV2(fqc lanes.FeeQuoterDestChainConfig) fqops2.DestChainConfig { +func TranslateFQtoV2(fqc lanes.FeeQuoterDestChainConfig) fqbind2.FeeQuoterDestChainConfig { var v2 lanes.FeeQuoterV2Params if fqc.V2Params != nil { v2 = *fqc.V2Params } - return fqops2.DestChainConfig{ + return fqbind2.FeeQuoterDestChainConfig{ IsEnabled: fqc.IsEnabled, MaxDataBytes: fqc.MaxDataBytes, MaxPerMsgGasLimit: fqc.MaxPerMsgGasLimit, @@ -388,7 +396,7 @@ func TranslateFQtoV2(fqc lanes.FeeQuoterDestChainConfig) fqops2.DestChainConfig // ReverseTranslateFQ is the inverse of TranslateFQ: it maps the EVM v1.6 on-chain // DestChainConfig back to the product-level FeeQuoterDestChainConfig. -func ReverseTranslateFQ(dc fqops.DestChainConfig) lanes.FeeQuoterDestChainConfig { +func ReverseTranslateFQ(dc fqbind160.FeeQuoterDestChainConfig) lanes.FeeQuoterDestChainConfig { return lanes.FeeQuoterDestChainConfig{ IsEnabled: dc.IsEnabled, MaxDataBytes: dc.MaxDataBytes, @@ -416,7 +424,7 @@ func ReverseTranslateFQ(dc fqops.DestChainConfig) lanes.FeeQuoterDestChainConfig // ReverseTranslateFQV2 is the inverse of TranslateFQtoV2: it maps the EVM v2.0 on-chain // DestChainConfig back to the product-level FeeQuoterDestChainConfig. -func ReverseTranslateFQV2(dc fqops2.DestChainConfig) lanes.FeeQuoterDestChainConfig { +func ReverseTranslateFQV2(dc fqbind2.FeeQuoterDestChainConfig) lanes.FeeQuoterDestChainConfig { return lanes.FeeQuoterDestChainConfig{ IsEnabled: dc.IsEnabled, MaxDataBytes: dc.MaxDataBytes, @@ -434,10 +442,10 @@ func ReverseTranslateFQV2(dc fqops2.DestChainConfig) lanes.FeeQuoterDestChainCon } } -func TranslateTokenPrices(prices map[string]*big.Int) []fqops.TokenPriceUpdate { - var result []fqops.TokenPriceUpdate +func TranslateTokenPrices(prices map[string]*big.Int) []fqbind160.InternalTokenPriceUpdate { + var result []fqbind160.InternalTokenPriceUpdate for k, v := range prices { - result = append(result, fqops.TokenPriceUpdate{ + result = append(result, fqbind160.InternalTokenPriceUpdate{ SourceToken: common.HexToAddress(k), UsdPerToken: v, }) @@ -445,10 +453,10 @@ func TranslateTokenPrices(prices map[string]*big.Int) []fqops.TokenPriceUpdate { return result } -func TranslateTokenPricesV2(prices map[string]*big.Int) []fqops2.TokenPriceUpdate { - var result []fqops2.TokenPriceUpdate +func TranslateTokenPricesV2(prices map[string]*big.Int) []fqbind2.InternalTokenPriceUpdate { + var result []fqbind2.InternalTokenPriceUpdate for k, v := range prices { - result = append(result, fqops2.TokenPriceUpdate{ + result = append(result, fqbind2.InternalTokenPriceUpdate{ SourceToken: common.HexToAddress(k), UsdPerToken: v, }) @@ -457,12 +465,14 @@ func TranslateTokenPricesV2(prices map[string]*big.Int) []fqops2.TokenPriceUpdat } func configureFeeQuoterV2(b operations.Bundle, input lanes.UpdateLanesInput, fqAddr common.Address, evmChain cldf_evm.Chain, result sequences.OnChainOutput) (sequences.OnChainOutput, error) { + fq, err := fqbind2.NewFeeQuoter(fqAddr, evmChain.Client) + if err != nil { + return result, fmt.Errorf("bind fee quoter v2: %w", err) + } destChainCfgReport, err := operations.ExecuteOperation( - b, fqops2.ApplyDestChainConfigUpdates, evmChain, - contract.FunctionInput[[]fqops2.DestChainConfigArgs]{ - ChainSelector: evmChain.Selector, - Address: fqAddr, - Args: []fqops2.DestChainConfigArgs{ + b, fqops2.NewWriteApplyDestChainConfigUpdates(fq), evmChain, + ops2contract.FunctionInput[[]fqbind2.FeeQuoterDestChainConfigArgs]{ + Args: []fqbind2.FeeQuoterDestChainConfigArgs{ { DestChainSelector: input.Dest.Selector, DestChainConfig: TranslateFQtoV2(input.Dest.FeeQuoterDestChainConfig), @@ -474,7 +484,7 @@ func configureFeeQuoterV2(b operations.Bundle, input lanes.UpdateLanesInput, fqA } b.Logger.Info("Destination configs updated on FeeQuoters") - batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{destChainCfgReport.Output}) + batch, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{destChainCfgReport.Output}) if err != nil { return result, err } @@ -488,12 +498,10 @@ func configureFeeQuoterV2(b operations.Bundle, input lanes.UpdateLanesInput, fqA if skip { b.Logger.Info("Skipping FeeQuoter v2 price updates: prices already seeded for dest chain") } else { - priceReport, err := operations.ExecuteOperation(b, fqops2.UpdatePrices, evmChain, contract.FunctionInput[fqops2.PriceUpdates]{ - ChainSelector: evmChain.Selector, - Address: fqAddr, - Args: fqops2.PriceUpdates{ + priceReport, err := operations.ExecuteOperation(b, fqops2.NewWriteUpdatePrices(fq), evmChain, ops2contract.FunctionInput[fqbind2.InternalPriceUpdates]{ + Args: fqbind2.InternalPriceUpdates{ TokenPriceUpdates: TranslateTokenPricesV2(input.Source.TokenPrices), - GasPriceUpdates: []fqops2.GasPriceUpdate{ + GasPriceUpdates: []fqbind2.InternalGasPriceUpdate{ { DestChainSelector: input.Dest.Selector, UsdPerUnitGas: input.Dest.GasPrice, @@ -504,7 +512,7 @@ func configureFeeQuoterV2(b operations.Bundle, input lanes.UpdateLanesInput, fqA if err != nil { return result, err } - priceBatch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{priceReport.Output}) + priceBatch, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{priceReport.Output}) if err != nil { return result, err } diff --git a/chains/evm/deployment/v1_6_1/adapters/non_canonical_usdc_chain.go b/chains/evm/deployment/v1_6_1/adapters/non_canonical_usdc_chain.go index 1147a9e116..54cd9f8d44 100644 --- a/chains/evm/deployment/v1_6_1/adapters/non_canonical_usdc_chain.go +++ b/chains/evm/deployment/v1_6_1/adapters/non_canonical_usdc_chain.go @@ -6,8 +6,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" tokens "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/sequences" + tpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" seq_core "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" @@ -92,7 +92,7 @@ func (c *NonCanonicalUSDCChainAdapter) TokenAddress(d datastore.DataStore, b cha return nil, fmt.Errorf("chain with selector %d not found", chainSelector) } - boundTokenPool, err := token_pool.NewTokenPoolContract(common.HexToAddress(poolAddressRef.Address), chain.Client) + boundTokenPool, err := tpbind.NewTokenPool(common.HexToAddress(poolAddressRef.Address), chain.Client) if err != nil { return nil, fmt.Errorf("failed to bind token pool: %w", err) } diff --git a/chains/evm/deployment/v1_6_1/adapters/tokens.go b/chains/evm/deployment/v1_6_1/adapters/tokens.go index d41f4d8215..448f3ab38e 100644 --- a/chains/evm/deployment/v1_6_1/adapters/tokens.go +++ b/chains/evm/deployment/v1_6_1/adapters/tokens.go @@ -18,6 +18,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) @@ -70,13 +71,26 @@ func (t *TokenAdapter) ConfigureTokenForTransfersSequence() *cldf_ops.Sequence[t // poolOpsV161 implements PoolOps using v1.6.1 bindings. type poolOpsV161 struct{} +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) evm_contract.WriteOutput { + var ei *evm_contract.ExecInfo + if w.ExecInfo != nil { + ei = &evm_contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return evm_contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + func (p *poolOpsV161) GetToken(b cldf_ops.Bundle, chain evm.Chain, poolAddr common.Address) (common.Address, error) { + pool, err := tpV1_6_1.NewTokenPool(poolAddr, chain.Client) + if err != nil { + return common.Address{}, fmt.Errorf("GetToken v1.6.1: bind pool: %w", err) + } res, err := cldf_ops.ExecuteOperation(b, - tpOpsV1_6_1.GetToken, chain, - evm_contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: poolAddr, - }, + tpOpsV1_6_1.NewReadGetToken(pool), chain, + ops2contract.FunctionInput[struct{}]{}, ) if err != nil { return common.Address{}, fmt.Errorf("GetToken v1.6.1: %w", err) @@ -109,18 +123,20 @@ func (p *poolOpsV161) GetPoolAdmins(ctx context.Context, chain *evm.Chain, poolA } func (p *poolOpsV161) SetRateLimiterConfig(b cldf_ops.Bundle, chain evm.Chain, poolAddr common.Address, remoteChainSelector uint64, outbound, inbound tokensapi.RateLimiterConfig) (evm_contract.WriteOutput, error) { + pool, err := tpV1_6_1.NewTokenPool(poolAddr, chain.Client) + if err != nil { + return evm_contract.WriteOutput{}, fmt.Errorf("SetChainRateLimiterConfig v1.6.1: bind pool: %w", err) + } report, err := cldf_ops.ExecuteOperation(b, - tpOpsV1_6_1.SetChainRateLimiterConfig, chain, - evm_contract.FunctionInput[tpOpsV1_6_1.SetChainRateLimiterConfigArgs]{ - ChainSelector: chain.Selector, - Address: poolAddr, + tpOpsV1_6_1.NewWriteSetChainRateLimiterConfig(pool), chain, + ops2contract.FunctionInput[tpOpsV1_6_1.SetChainRateLimiterConfigArgs]{ Args: tpOpsV1_6_1.SetChainRateLimiterConfigArgs{ - OutboundConfig: tpOpsV1_6_1.Config{ + OutboundConfig: tpV1_6_1.RateLimiterConfig{ IsEnabled: outbound.IsEnabled, Capacity: outbound.Capacity, Rate: outbound.Rate, }, - InboundConfig: tpOpsV1_6_1.Config{ + InboundConfig: tpV1_6_1.RateLimiterConfig{ IsEnabled: inbound.IsEnabled, Capacity: inbound.Capacity, Rate: inbound.Rate, @@ -131,21 +147,23 @@ func (p *poolOpsV161) SetRateLimiterConfig(b cldf_ops.Bundle, chain evm.Chain, p if err != nil { return evm_contract.WriteOutput{}, fmt.Errorf("SetChainRateLimiterConfig v1.6.1: %w", err) } - return report.Output, nil + return writeOutputOps2ToLegacy(report.Output), nil } func (p *poolOpsV161) SetRateLimitAdmin(b cldf_ops.Bundle, chain evm.Chain, poolAddr common.Address, newAdmin common.Address) (evm_contract.WriteOutput, error) { + pool, err := tpV1_6_1.NewTokenPool(poolAddr, chain.Client) + if err != nil { + return evm_contract.WriteOutput{}, fmt.Errorf("SetRateLimitAdmin v1.6.1: bind pool: %w", err) + } report, err := cldf_ops.ExecuteOperation(b, - tpOpsV1_6_1.SetRateLimitAdmin, chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chain.Selector, - Address: poolAddr, - Args: newAdmin, + tpOpsV1_6_1.NewWriteSetRateLimitAdmin(pool), chain, + ops2contract.FunctionInput[common.Address]{ + Args: newAdmin, }) if err != nil { return evm_contract.WriteOutput{}, fmt.Errorf("SetRateLimitAdmin v1.6.1: %w", err) } - return report.Output, nil + return writeOutputOps2ToLegacy(report.Output), nil } func (p *poolOpsV161) Version() *semver.Version { diff --git a/chains/evm/deployment/v1_6_1/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go b/chains/evm/deployment/v1_6_1/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go index 9525000268..85b5b451ab 100644 --- a/chains/evm/deployment/v1_6_1/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_from_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/burn_from_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnFromMintTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnFromMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnFromMintTokenPoolBin = "0x610100806040523461035457614c0f803803809161001d82856105b2565b8339810160a0828203126103545781516001600160a01b03811692908390036103545761004c602082016105d5565b60408201516001600160401b0381116103545782019280601f85011215610354578351936001600160401b038511610359578460051b90602082019561009560405197886105b2565b865260208087019282010192831161035457602001905b82821061059a575050506100ce60806100c7606085016105e3565b93016105e3565b91331561058957600180546001600160a01b0319163317905584158015610578575b8015610567575b61055657608085905260c05260405163313ce56760e01b8152602081600481885afa6000918161051a575b506104ef575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526103d2575b50604051636eb1769f60e11b81523060048201819052602482015290602082604481845afa9182156103c657600092610392575b50600019820180921161037c57604051602081019263095ea7b360e01b84523060248301526044820152604481526101c76064826105b2565b6000806040948551936101da87866105b2565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082865af13d1561036f573d906001600160401b03821161035957845161024b94909261023c601f8201601f1916602001856105b2565b83523d6000602085013e610781565b8051806102d9575b82516143bd908161085282396080518181816115fc015281816117ec015281816122f4015281816124c4015281816128210152612899015260a05181818161190e015281816127a80152818161325f01526132e2015260c051818181610bd5015281816116980152612390015260e051818181610b65015281816116db01526120730152f35b81602091810103126103545760200151801590811503610354576102fe573880610253565b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b9161024b92606091610781565b634e487b7160e01b600052601160045260246000fd5b9091506020813d6020116103be575b816103ae602093836105b2565b810103126103545751903861018e565b3d91506103a1565b6040513d6000823e3d90fd5b60206040516103e182826105b2565b60008152600036813760e051156104de5760005b815181101561045c576001906001600160a01b0361041382856105f7565b51168461041f82610639565b61042c575b5050016103f5565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a13884610424565b505060005b82518110156104d5576001906001600160a01b0361047f82866105f7565b511680156104cf578361049182610721565b61049f575b50505b01610461565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a13883610496565b50610499565b5050503861015a565b6335f4a7b360e01b60005260046000fd5b60ff1660ff82168181036105035750610128565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161054e575b81610536602093836105b2565b8101031261035457610547906105d5565b9038610122565b3d9150610529565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038116156100f7565b506001600160a01b038316156100f0565b639b15e16f60e01b60005260046000fd5b602080916105a7846105e3565b8152019101906100ac565b601f909101601f19168101906001600160401b0382119082101761035957604052565b519060ff8216820361035457565b51906001600160a01b038216820361035457565b805182101561060b5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561060b5760005260206000200190600090565b600081815260036020526040902054801561071a57600019810181811161037c5760025460001981019190821161037c578181036106c9575b50505060025480156106b3576000190161068d816002610621565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b6107026106da6106eb936002610621565b90549060031b1c9283926002610621565b819391549060031b91821b91600019901b19161790565b90556000526003602052604060002055388080610672565b5050600090565b8060005260036020526040600020541560001461077b5760025468010000000000000000811015610359576107626106eb8260018594016002556002610621565b9055600254906000526003602052604060002055600190565b50600090565b919290156107e35750815115610795575090565b3b1561079e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156107f65750805190602001fd5b6040519062461bcd60e51b8252602060048301528181519182602483015260005b8381106108395750508160006044809484010152601f80199101168101030190fd5b6020828201810151604487840101528593500161081756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461293c57508063181f5a77146128bd57806321df0da71461284e578063240028e8146127cc57806324f65ee71461277057806339077537146122215780634c5ef0ed146121bc57806354c8a4f31461203f57806362ddd3c414611fbb5780636d3d1a5814611f6957806379ba509714611e845780637d54534e14611dd75780638926f54f14611d735780638da5cb5b14611d21578063962d402014611b7d5780639a4575b914611554578063a42a7b8b146113cf578063a7cd63b714611303578063acfecf91146111df578063af58d59f14611178578063b0f479a114611126578063b7946580146110cf578063c0d7865514610fd7578063c4bffe2b14610e8e578063c75eea9c14610dc8578063cf7401f314610bf9578063dc0bd97114610b8a578063e0351e1314610b2f578063e8a1da171461025a5763f2fde38b1461016b57600080fd5b346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff6101b7612b6a565b6101bf613404565b1633811461022f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b50346102575761026936612c58565b93919092610275613404565b82915b80831061099a575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b85821015610996578160051b85013581811215610992578501906101208236031261099257604051956102e387612a92565b823567ffffffffffffffff8116810361098d578752602083013567ffffffffffffffff81116109895783019536601f880112156109895786359661032688612ea9565b97610334604051998a612aca565b8089526020808a019160051b830101903682116109855760208301905b828210610952575050505060208801968752604084013567ffffffffffffffff811161094e576103849036908601612c09565b9860408901998a526103ae61039c3660608801612d99565b9560608b0196875260c0369101612d99565b9660808a019788526103c0865161387b565b6103ca885161387b565b8a515115610926576103e667ffffffffffffffff8b51166140ba565b156108ef5767ffffffffffffffff8a5116815260076020526040812061052687516fffffffffffffffffffffffffffffffff604082015116906104e16fffffffffffffffffffffffffffffffff6020830151169151151583608060405161044c81612a92565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61064c89516fffffffffffffffffffffffffffffffff604082015116906106076fffffffffffffffffffffffffffffffff6020830151169151151583608060405161057081612a92565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff82116108c25761066f8354612f8c565b601f8111610887575b50602090601f83116001146107e8576106c692918591836107dd575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b8951805182101561070157906106fb6001926106f4838f67ffffffffffffffff90511692612f78565b519061344f565b016106cb565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2929593966107cf67ffffffffffffffff600197949c511692519351915161079b61076660405196879687526101006020880152610100870190612b0b565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10190939492916102b1565b015190503880610694565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b81811061086f5750908460019594939210610838575b505050811b0190556106c9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061082b565b92936020600181928786015181550195019301610815565b6108b29084865260208620601f850160051c810191602086106108b8575b601f0160051c0190613193565b38610678565b90915081906108a5565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610981576020916109768392833691890101612c09565b815201910190610351565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff6109ba6109b5878588612f29565b612e57565b16956109c587613dee565b15610b035786845260076020526109e160056040862001613bf5565b94845b8651811015610a1a576001908987526007602052610a1360056040892001610a0c838b612f78565b5190613f19565b50016109e4565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610a538154612f8c565b80610ac2575b5050500180549086815581610aa4575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a1019190949394610278565b865260208620908101905b81811015610a6957868155600101610aaf565b601f8111600114610ad85750555b863880610a59565b81835260208320610af391601f01861c810190600101613193565b8082528160208120915555610ad0565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610c31612b8d565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261025757604051610c6881612aae565b6024358015158103610dc45781526044356fffffffffffffffffffffffffffffffff81168103610dc45760208201526064356fffffffffffffffffffffffffffffffff81168103610dc457604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610dc05760405190610cef82612aae565b608435801515810361099257825260a4356fffffffffffffffffffffffffffffffff8116810361099257602083015260c4356fffffffffffffffffffffffffffffffff8116810361099257604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610d9e575b610d7257610d6f92936136b9565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610d61565b5080fd5b8280fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c6040610e8a9367ffffffffffffffff610e15612b8d565b610e1d6130e0565b5016815260076020522061310b565b6137f6565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051906005548083528260208101600584526020842092845b818110610fbe575050610eec92500383612aca565b8151610f10610efa82612ea9565b91610f086040519384612aca565b808352612ea9565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015610f6f578067ffffffffffffffff610f5c60019388612f78565b5116610f688286612f78565b5201610f3d565b50925090604051928392602084019060208552518091526040840192915b818110610f9b575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101610f8d565b8454835260019485019487945060209093019201610ed7565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff611024612b6a565b61102c613404565b1680156110a75760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a180f35b6004827f8579befe000000000000000000000000000000000000000000000000000000008152fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e8a61111261110d612b8d565b613171565b604051918291602083526020830190612b0b565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c60026040610e8a9467ffffffffffffffff6111c7612b8d565b6111cf6130e0565b501681526007602052200161310b565b50346102575767ffffffffffffffff6111f736612cc8565b929091611202613404565b169161121b836000526006602052604060002054151590565b156112d757828452600760205261124a6005604086200161123d368486612ba4565b6020815191012090613f19565b1561128f57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76916112896040519283926020845260208401916130a1565b0390a280f35b826112d3836040519384937f74f23c7c00000000000000000000000000000000000000000000000000000000855260048501526040602485015260448401916130a1565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051600254808252602082018091600285526020852090855b8181106113b95750505082611362910383612aca565b604051928392602084019060208552518091526040840192915b81811061138a575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161137c565b825484526020909301926001928301920161134c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575767ffffffffffffffff611410612b8d565b168152600760205261142760056040832001613bf5565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061146c61145683612ea9565b926114646040519485612aca565b808452612ea9565b01835b818110611543575050825b82518110156114c0578061149060019285612f78565b51855260086020526114a460408620612fdf565b6114ae8285612f78565b526114b98184612f78565b500161147a565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106114f857505050500390f35b91936020611533827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612b0b565b96019201920185949391926114e9565b80606060208093860101520161146f565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610dc057606060206040516115d281612a76565b8281520152608481016115e481612e36565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611b335750602481019077ffffffffffffffff0000000000000000000000000000000061164b83612e57565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a54578491611b04575b50611adc576116d960448201612e36565b7f0000000000000000000000000000000000000000000000000000000000000000611a8a575b5067ffffffffffffffff61171283612e57565b1661172a816000526006602052604060002054151590565b15611a5f57602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611a545784906119f1575b73ffffffffffffffffffffffffffffffffffffffff91501633036119c557819260646117bf67ffffffffffffffff94612e57565b9201359283921680825260076020526118146040832073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016948591614169565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018690527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a2813b15610257576040517f79cc679000000000000000000000000000000000000000000000000000000000815230600482015260248101849052818160448183875af180156119ba576119a5575b61197461190461110d87877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1060608967ffffffffffffffff6118eb86612e57565b16936040519182523360208301526040820152a2612e57565b610e8a60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152611942604082612aca565b6040519261194f84612a76565b8352602083019081526040519384936020855251604060208601526060850190612b0b565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b0b565b6119b0828092612aca565b61025757806118aa565b6040513d84823e3d90fd5b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611a4c575b81611a0b60209383612aca565b81010312610992575173ffffffffffffffffffffffffffffffffffffffff811681036109925773ffffffffffffffffffffffffffffffffffffffff9061178b565b3d91506119fe565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b73ffffffffffffffffffffffffffffffffffffffff16808452600360205260408420546116ff577fd0d25976000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611b26915060203d602011611b2c575b611b1e8183612aca565b8101906133ec565b386116c8565b503d611b14565b8273ffffffffffffffffffffffffffffffffffffffff611b54602493612e36565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346102575760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057611bcd903690600401612c27565b60243567ffffffffffffffff811161099257611bed903690600401612d4b565b60449291923567ffffffffffffffff811161098957611c10903690600401612d4b565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611cff575b611cd357818114801590611cc9575b611ca157865b818110611c55578780f35b80611c9b611c696109b5600194868c612f29565b611c7483878b612f68565b611c95611c8d611c85868b8d612f68565b923690612d99565b913690612d99565b916136b9565b01611c4a565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611c44565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611c35565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576020611dcd67ffffffffffffffff611db9612b8d565b166000526006602052604060002054151590565b6040519015158152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611e47612b6a565b611e4f613404565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757805473ffffffffffffffffffffffffffffffffffffffff81163303611f41577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461025757611fca36612cc8565b611fd693929193613404565b67ffffffffffffffff8216611ff8816000526006602052604060002054151590565b156120145750610d6f929361200e913691612ba4565b9061344f565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b5034610257576120699061207161205536612c58565b9591612062939193613404565b3691612ec1565b933691612ec1565b7f00000000000000000000000000000000000000000000000000000000000000001561219457815b835181101561210c578073ffffffffffffffffffffffffffffffffffffffff6120c460019387612f78565b51166120cf81613c58565b6120db575b5001612099565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1386120d4565b5090805b8251811015612190578073ffffffffffffffffffffffffffffffffffffffff61213b60019386612f78565b5116801561218a5761214c8161405a565b612159575b505b01612110565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a184612151565b50612153565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b50346102575760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576121f4612b8d565b906024359067ffffffffffffffff8211610257576020611dcd8461221b3660048701612c09565b90612e6c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8336030112610dc457826040516122a181612a2b565b526122ce6122c46122bf6122b860c4860185612de5565b3691612ba4565b6131ec565b60648401356132df565b91608481016122dc81612e36565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361274f5750602481019177ffffffffffffffff0000000000000000000000000000000061234384612e57565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612640578691612730575b506127085767ffffffffffffffff6123d784612e57565b166123ef816000526006602052604060002054151590565b156126dd57602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156126405786916126be575b50156126925761246683612e57565b9061247c60a484019261221b6122b88585612de5565b1561264b575050906044839267ffffffffffffffff61249a84612e57565b1680875260076020526124ec6002604089200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016968791614169565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a2019061253f82612e36565b85843b15610257576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff929092166004830152602482018690528160448183885af18015612640579273ffffffffffffffffffffffffffffffffffffffff6126006125fa60809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc099612630575b5050612e57565b92612e36565b60405196875233898801521660408601528560608601521692a28060405161262781612a2b565b52604051908152f35b8161263a91612aca565b386125f3565b6040513d88823e3d90fd5b6126559250612de5565b6112d36040519283927f24eb47e50000000000000000000000000000000000000000000000000000000084526020600485015260248401916130a1565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6126d7915060203d602011611b2c57611b1e8183612aca565b38612457565b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612749915060203d602011611b2c57611b1e8183612aca565b386123c0565b8473ffffffffffffffffffffffffffffffffffffffff611b54602493612e36565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602090612807612b6a565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575750610e8a6040516128fe604082612aca565b601b81527f4275726e46726f6d4d696e74546f6b656e506f6f6c20312e362e3100000000006020820152604051918291602083526020830190612b0b565b905034610dc05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dc0576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610dc457602092507faff2afbf000000000000000000000000000000000000000000000000000000008114908115612a01575b81156129d7575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386129d0565b7f0e64dd2900000000000000000000000000000000000000000000000000000000811491506129c9565b6020810190811067ffffffffffffffff821117612a4757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612a4757604052565b60a0810190811067ffffffffffffffff821117612a4757604052565b6060810190811067ffffffffffffffff821117612a4757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612a4757604052565b919082519283825260005b848110612b555750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612b16565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098d57565b6004359067ffffffffffffffff8216820361098d57565b92919267ffffffffffffffff8211612a475760405191612bec601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184612aca565b82948184528183011161098d578281602093846000960137010152565b9080601f8301121561098d57816020612c2493359101612ba4565b90565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501948460051b01011161098d57565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff811161098d5781612ca191600401612c27565b929092916024359067ffffffffffffffff821161098d57612cc491600401612c27565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff8116810361098d579160243567ffffffffffffffff811161098d578260238201121561098d5780600401359267ffffffffffffffff841161098d576024848301011161098d576024019190565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501946060850201011161098d57565b35906fffffffffffffffffffffffffffffffff8216820361098d57565b919082606091031261098d57604051612db181612aae565b8092803590811515820361098d576040612de09181938552612dd560208201612d7c565b602086015201612d7c565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561098d570180359067ffffffffffffffff821161098d5760200191813603831361098d57565b3573ffffffffffffffffffffffffffffffffffffffff8116810361098d5790565b3567ffffffffffffffff8116810361098d5790565b9067ffffffffffffffff612c2492166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612a475760051b60200190565b9291612ecc82612ea9565b93612eda6040519586612aca565b602085848152019260051b810191821161098d57915b818310612efc57505050565b823573ffffffffffffffffffffffffffffffffffffffff8116810361098d57815260209283019201612ef0565b9190811015612f395760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612f39576060020190565b8051821015612f395760209160051b010190565b90600182811c92168015612fd5575b6020831014612fa657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612f9b565b9060405191826000825492612ff384612f8c565b8084529360018116908115613061575060011461301a575b5061301892500383612aca565b565b90506000929192526020600020906000915b818310613045575050906020613018928201013861300b565b602091935080600191548385890101520191019091849261302c565b602093506130189592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013861300b565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b604051906130ed82612a92565b60006080838281528260208201528260408201528260608201520152565b9060405161311881612a92565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff166000526007602052612c246004604060002001612fdf565b81811061319e575050565b60008155600101613193565b818102929181159184041417156131bd57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8051801561325b5760200361321d5760208180518101031261098d5760208101519060ff821161321d575060ff1690565b6112d3906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190612b0b565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff82116131bd57565b60ff16604d81116131bd57600a0a90565b81156132b0570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146133e5578284116133bb579061332491613281565b91604d60ff8416118015613382575b61334c57505090613346612c2492613295565b906131aa565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b5061338c83613295565b80156132b0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411613333565b6133c491613281565b91604d60ff84161161334c575050906133df612c2492613295565b906132a6565b5050505090565b9081602091031261098d5751801515810361098d5790565b73ffffffffffffffffffffffffffffffffffffffff60015416330361342557565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b9080511561368f5767ffffffffffffffff81516020830120921691826000526007602052613484816005604060002001614114565b1561364b5760005260086020526040600020815167ffffffffffffffff8111612a47576134b18254612f8c565b601f8111613619575b506020601f8211600114613553579161352d827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea959361354395600091613548575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612b0b565b0390a2565b9050840151386134fc565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106136015750926135439492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9896106135ca575b5050811b019055611112565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538806135be565b9192602060018192868a015181550194019201613583565b61364590836000526020600020601f840160051c810191602085106108b857601f0160051c0190613193565b386134ba565b50906112d36040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612b0b565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff1660008181526006602052604090205490929190156137bb57916137b860e092613784856137107f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b9761387b565b8460005260076020526137278160406000206139c2565b6137308361387b565b84600052600760205261374a8360026040600020016139c2565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b919082039182116131bd57565b6137fe6130e0565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff808351169161385b602085019361385561384863ffffffff875116426137e9565b85608089015116906131aa565b9061404d565b8082101561387457505b16825263ffffffff4216905290565b9050613865565b80511561391b576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff602083015116106138b85750565b606490613919604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604082015116158015906139a3575b6139425750565b606490613919604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff602082015116151561393b565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991613afb60609280546139ff63ffffffff8260801c16426137e9565b9081613b3a575b50506fffffffffffffffffffffffffffffffff6001816020860151169282815416808510600014613b3257508280855b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155613aaf8651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b6137b860405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091613a36565b6fffffffffffffffffffffffffffffffff91613b6f839283613b686001880154948286169560801c906131aa565b911661404d565b80821015613bee57505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff00000000000000000000000000000000161781553880613a06565b9050613b79565b906040519182815491828252602082019060005260206000209260005b818110613c2757505061301892500383612aca565b8454835260019485019487945060209093019201613c12565b8054821015612f395760005260206000200190600090565b6000818152600360205260409020548015613de7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd57818103613d78575b5050506002548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613d06816002613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613dcf613d89613d9a936002613c40565b90549060031b1c9283926002613c40565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080613ccd565b5050600090565b6000818152600660205260409020548015613de7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd57600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd57818103613edf575b5050506005548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613e9c816005613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b613f01613ef0613d9a936005613c40565b90549060031b1c9283926005613c40565b90556000526006602052604060002055388080613e63565b9060018201918160005282602052604060002054801515600014614044577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd5781810361400d575b50505080548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190613fce8282613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61402d61401d613d9a9386613c40565b90549060031b1c92839286613c40565b905560005283602052604060002055388080613f96565b50505050600090565b919082018092116131bd57565b806000526003602052604060002054156000146140b45760025468010000000000000000811015612a475761409b613d9a8260018594016002556002613c40565b9055600254906000526003602052604060002055600190565b50600090565b806000526006602052604060002054156000146140b45760055468010000000000000000811015612a47576140fb613d9a8260018594016005556005613c40565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054613de75780549068010000000000000000821015612a475782614152613d9a846001809601855584613c40565b905580549260005201602052604060002055600190565b9182549060ff8260a01c161580156143a8575b6143a2576fffffffffffffffffffffffffffffffff821691600185019081546141c163ffffffff6fffffffffffffffffffffffffffffffff83169360801c16426137e9565b9081614304575b50508481106142b857508383106142225750506141f76fffffffffffffffffffffffffffffffff9283926137e9565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c9161423181856137e9565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116131bd5761427f6142849273ffffffffffffffffffffffffffffffffffffffff9661404d565b6132a6565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b8286929396116143785761431f926138559160801c906131aa565b808410156143735750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806141c8565b61432a565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561417c56fea164736f6c634300081a000a" - -type BurnFromMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnFromMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnFromMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnFromMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnFromMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnFromMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnFromMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-from-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnFromMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnFromMintTokenPoolABI, - Bin: BurnFromMintTokenPoolBin, - }, + Name: "burn-from-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnFromMintTokenPool contract", + ContractMetadata: gobindings.BurnFromMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnFromMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnFromMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v1_6_1/operations/burn_mint_token_pool/burn_mint_token_pool.go b/chains/evm/deployment/v1_6_1/operations/burn_mint_token_pool/burn_mint_token_pool.go index 8a980ddd9d..9948dedf1a 100644 --- a/chains/evm/deployment/v1_6_1/operations/burn_mint_token_pool/burn_mint_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/burn_mint_token_pool/burn_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/burn_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnMintTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnMintTokenPoolBin = "0x61010080604052346103635761497e803803809161001d82856103e2565b833981019060a0818303126103635780516001600160a01b038116908190036103635761004c60208301610405565b60408301519091906001600160401b0381116103635783019380601f86011215610363578451946001600160401b0386116103cc578560051b90602082019661009860405198896103e2565b875260208088019282010192831161036357602001905b8282106103b4575050506100d160806100ca60608601610413565b9401610413565b9233156103a357600180546001600160a01b0319163317905581158015610392575b8015610381575b610370578160209160049360805260c0526040519283809263313ce56760e01b82525afa6000918161032f575b50610304575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526101e6575b6040516143b690816105c882396080518181816115fc015281816117ec015281816122ed015281816124bd0152818161281a0152612892015260a051818181611907015281816127a10152818161325801526132db015260c051818181610bd5015281816116980152612389015260e051818181610b65015281816116db015261206c0152f35b60405160206101f581836103e2565b60008252600036813760e051156102f35760005b8251811015610270576001906001600160a01b036102278286610427565b51168361023382610469565b610240575b505001610209565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a13883610238565b50905060005b82518110156102ea576001906001600160a01b036102948286610427565b511680156102e457836102a682610567565b6102b4575b50505b01610276565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a138836102ab565b506102ae565b5050503861015f565b6335f4a7b360e01b60005260046000fd5b60ff1660ff8216818103610318575061012d565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d602011610368575b8161034b602093836103e2565b810103126103635761035c90610405565b9038610127565b600080fd5b3d915061033e565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038116156100fa565b506001600160a01b038416156100f3565b639b15e16f60e01b60005260046000fd5b602080916103c184610413565b8152019101906100af565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176103cc57604052565b519060ff8216820361036357565b51906001600160a01b038216820361036357565b805182101561043b5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561043b5760005260206000200190600090565b600081815260036020526040902054801561056057600019810181811161054a5760025460001981019190821161054a578181036104f9575b50505060025480156104e357600019016104bd816002610451565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61053261050a61051b936002610451565b90549060031b1c9283926002610451565b819391549060031b91821b91600019901b19161790565b905560005260036020526040600020553880806104a2565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146105c157600254680100000000000000008110156103cc576105a861051b8260018594016002556002610451565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461293557508063181f5a77146128b657806321df0da714612847578063240028e8146127c557806324f65ee714612769578063390775371461221a5780634c5ef0ed146121b557806354c8a4f31461203857806362ddd3c414611fb45780636d3d1a5814611f6257806379ba509714611e7d5780637d54534e14611dd05780638926f54f14611d6c5780638da5cb5b14611d1a578063962d402014611b765780639a4575b914611554578063a42a7b8b146113cf578063a7cd63b714611303578063acfecf91146111df578063af58d59f14611178578063b0f479a114611126578063b7946580146110cf578063c0d7865514610fd7578063c4bffe2b14610e8e578063c75eea9c14610dc8578063cf7401f314610bf9578063dc0bd97114610b8a578063e0351e1314610b2f578063e8a1da171461025a5763f2fde38b1461016b57600080fd5b346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff6101b7612b63565b6101bf6133fd565b1633811461022f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b50346102575761026936612c51565b939190926102756133fd565b82915b80831061099a575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b85821015610996578160051b85013581811215610992578501906101208236031261099257604051956102e387612a8b565b823567ffffffffffffffff8116810361098d578752602083013567ffffffffffffffff81116109895783019536601f880112156109895786359661032688612ea2565b97610334604051998a612ac3565b8089526020808a019160051b830101903682116109855760208301905b828210610952575050505060208801968752604084013567ffffffffffffffff811161094e576103849036908601612c02565b9860408901998a526103ae61039c3660608801612d92565b9560608b0196875260c0369101612d92565b9660808a019788526103c08651613874565b6103ca8851613874565b8a515115610926576103e667ffffffffffffffff8b51166140b3565b156108ef5767ffffffffffffffff8a5116815260076020526040812061052687516fffffffffffffffffffffffffffffffff604082015116906104e16fffffffffffffffffffffffffffffffff6020830151169151151583608060405161044c81612a8b565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61064c89516fffffffffffffffffffffffffffffffff604082015116906106076fffffffffffffffffffffffffffffffff6020830151169151151583608060405161057081612a8b565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff82116108c25761066f8354612f85565b601f8111610887575b50602090601f83116001146107e8576106c692918591836107dd575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b8951805182101561070157906106fb6001926106f4838f67ffffffffffffffff90511692612f71565b5190613448565b016106cb565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2929593966107cf67ffffffffffffffff600197949c511692519351915161079b61076660405196879687526101006020880152610100870190612b04565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10190939492916102b1565b015190503880610694565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b81811061086f5750908460019594939210610838575b505050811b0190556106c9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061082b565b92936020600181928786015181550195019301610815565b6108b29084865260208620601f850160051c810191602086106108b8575b601f0160051c019061318c565b38610678565b90915081906108a5565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610981576020916109768392833691890101612c02565b815201910190610351565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff6109ba6109b5878588612f22565b612e50565b16956109c587613de7565b15610b035786845260076020526109e160056040862001613bee565b94845b8651811015610a1a576001908987526007602052610a1360056040892001610a0c838b612f71565b5190613f12565b50016109e4565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610a538154612f85565b80610ac2575b5050500180549086815581610aa4575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a1019190949394610278565b865260208620908101905b81811015610a6957868155600101610aaf565b601f8111600114610ad85750555b863880610a59565b81835260208320610af391601f01861c81019060010161318c565b8082528160208120915555610ad0565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610c31612b86565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261025757604051610c6881612aa7565b6024358015158103610dc45781526044356fffffffffffffffffffffffffffffffff81168103610dc45760208201526064356fffffffffffffffffffffffffffffffff81168103610dc457604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610dc05760405190610cef82612aa7565b608435801515810361099257825260a4356fffffffffffffffffffffffffffffffff8116810361099257602083015260c4356fffffffffffffffffffffffffffffffff8116810361099257604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610d9e575b610d7257610d6f92936136b2565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610d61565b5080fd5b8280fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c6040610e8a9367ffffffffffffffff610e15612b86565b610e1d6130d9565b50168152600760205220613104565b6137ef565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051906005548083528260208101600584526020842092845b818110610fbe575050610eec92500383612ac3565b8151610f10610efa82612ea2565b91610f086040519384612ac3565b808352612ea2565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015610f6f578067ffffffffffffffff610f5c60019388612f71565b5116610f688286612f71565b5201610f3d565b50925090604051928392602084019060208552518091526040840192915b818110610f9b575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101610f8d565b8454835260019485019487945060209093019201610ed7565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff611024612b63565b61102c6133fd565b1680156110a75760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a180f35b6004827f8579befe000000000000000000000000000000000000000000000000000000008152fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e8a61111261110d612b86565b61316a565b604051918291602083526020830190612b04565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c60026040610e8a9467ffffffffffffffff6111c7612b86565b6111cf6130d9565b5016815260076020522001613104565b50346102575767ffffffffffffffff6111f736612cc1565b9290916112026133fd565b169161121b836000526006602052604060002054151590565b156112d757828452600760205261124a6005604086200161123d368486612b9d565b6020815191012090613f12565b1561128f57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769161128960405192839260208452602084019161309a565b0390a280f35b826112d3836040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485015260406024850152604484019161309a565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051600254808252602082018091600285526020852090855b8181106113b95750505082611362910383612ac3565b604051928392602084019060208552518091526040840192915b81811061138a575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161137c565b825484526020909301926001928301920161134c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575767ffffffffffffffff611410612b86565b168152600760205261142760056040832001613bee565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061146c61145683612ea2565b926114646040519485612ac3565b808452612ea2565b01835b818110611543575050825b82518110156114c0578061149060019285612f71565b51855260086020526114a460408620612fd8565b6114ae8285612f71565b526114b98184612f71565b500161147a565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106114f857505050500390f35b91936020611533827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612b04565b96019201920185949391926114e9565b80606060208093860101520161146f565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610dc057606060206040516115d281612a6f565b8281520152608481016115e481612e2f565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611b2c5750602481019077ffffffffffffffff0000000000000000000000000000000061164b83612e50565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a4d578491611afd575b50611ad5576116d960448201612e2f565b7f0000000000000000000000000000000000000000000000000000000000000000611a83575b5067ffffffffffffffff61171283612e50565b1661172a816000526006602052604060002054151590565b15611a5857602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611a4d5784906119ea575b73ffffffffffffffffffffffffffffffffffffffff91501633036119be57819260646117bf67ffffffffffffffff94612e50565b9201359283921680825260076020526118146040832073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016948591614162565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018690527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a2813b15610257576040517f42966c68000000000000000000000000000000000000000000000000000000008152836004820152818160248183875af180156119b35761199e575b61196d6118fd61110d87877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1060608967ffffffffffffffff6118e486612e50565b16936040519182523360208301526040820152a2612e50565b610e8a60405160ff7f00000000000000000000000000000000000000000000000000000000000000001660208201526020815261193b604082612ac3565b6040519261194884612a6f565b8352602083019081526040519384936020855251604060208601526060850190612b04565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b04565b6119a9828092612ac3565b61025757806118a3565b6040513d84823e3d90fd5b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611a45575b81611a0460209383612ac3565b81010312610992575173ffffffffffffffffffffffffffffffffffffffff811681036109925773ffffffffffffffffffffffffffffffffffffffff9061178b565b3d91506119f7565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b73ffffffffffffffffffffffffffffffffffffffff16808452600360205260408420546116ff577fd0d25976000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611b1f915060203d602011611b25575b611b178183612ac3565b8101906133e5565b386116c8565b503d611b0d565b8273ffffffffffffffffffffffffffffffffffffffff611b4d602493612e2f565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346102575760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057611bc6903690600401612c20565b60243567ffffffffffffffff811161099257611be6903690600401612d44565b60449291923567ffffffffffffffff811161098957611c09903690600401612d44565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611cf8575b611ccc57818114801590611cc2575b611c9a57865b818110611c4e578780f35b80611c94611c626109b5600194868c612f22565b611c6d83878b612f61565b611c8e611c86611c7e868b8d612f61565b923690612d92565b913690612d92565b916136b2565b01611c43565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611c3d565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611c2e565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576020611dc667ffffffffffffffff611db2612b86565b166000526006602052604060002054151590565b6040519015158152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611e40612b63565b611e486133fd565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757805473ffffffffffffffffffffffffffffffffffffffff81163303611f3a577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461025757611fc336612cc1565b611fcf939291936133fd565b67ffffffffffffffff8216611ff1816000526006602052604060002054151590565b1561200d5750610d6f9293612007913691612b9d565b90613448565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b5034610257576120629061206a61204e36612c51565b959161205b9391936133fd565b3691612eba565b933691612eba565b7f00000000000000000000000000000000000000000000000000000000000000001561218d57815b8351811015612105578073ffffffffffffffffffffffffffffffffffffffff6120bd60019387612f71565b51166120c881613c51565b6120d4575b5001612092565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1386120cd565b5090805b8251811015612189578073ffffffffffffffffffffffffffffffffffffffff61213460019386612f71565b511680156121835761214581614053565b612152575b505b01612109565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a18461214a565b5061214c565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b50346102575760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576121ed612b86565b906024359067ffffffffffffffff8211610257576020611dc6846122143660048701612c02565b90612e65565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8336030112610dc4578260405161229a81612a24565b526122c76122bd6122b86122b160c4860185612dde565b3691612b9d565b6131e5565b60648401356132d8565b91608481016122d581612e2f565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036127485750602481019177ffffffffffffffff0000000000000000000000000000000061233c84612e50565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612639578691612729575b506127015767ffffffffffffffff6123d084612e50565b166123e8816000526006602052604060002054151590565b156126d657602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156126395786916126b7575b501561268b5761245f83612e50565b9061247560a48401926122146122b18585612dde565b15612644575050906044839267ffffffffffffffff61249384612e50565b1680875260076020526124e56002604089200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016968791614162565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a2019061253882612e2f565b85843b15610257576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff929092166004830152602482018690528160448183885af18015612639579273ffffffffffffffffffffffffffffffffffffffff6125f96125f360809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc099612629575b5050612e50565b92612e2f565b60405196875233898801521660408601528560608601521692a28060405161262081612a24565b52604051908152f35b8161263391612ac3565b386125ec565b6040513d88823e3d90fd5b61264e9250612dde565b6112d36040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161309a565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6126d0915060203d602011611b2557611b178183612ac3565b38612450565b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612742915060203d602011611b2557611b178183612ac3565b386123b9565b8473ffffffffffffffffffffffffffffffffffffffff611b4d602493612e2f565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602090612800612b63565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575750610e8a6040516128f7604082612ac3565b601781527f4275726e4d696e74546f6b656e506f6f6c20312e362e310000000000000000006020820152604051918291602083526020830190612b04565b905034610dc05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dc0576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610dc457602092507faff2afbf0000000000000000000000000000000000000000000000000000000081149081156129fa575b81156129d0575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386129c9565b7f0e64dd2900000000000000000000000000000000000000000000000000000000811491506129c2565b6020810190811067ffffffffffffffff821117612a4057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612a4057604052565b60a0810190811067ffffffffffffffff821117612a4057604052565b6060810190811067ffffffffffffffff821117612a4057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612a4057604052565b919082519283825260005b848110612b4e5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612b0f565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098d57565b6004359067ffffffffffffffff8216820361098d57565b92919267ffffffffffffffff8211612a405760405191612be5601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184612ac3565b82948184528183011161098d578281602093846000960137010152565b9080601f8301121561098d57816020612c1d93359101612b9d565b90565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501948460051b01011161098d57565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff811161098d5781612c9a91600401612c20565b929092916024359067ffffffffffffffff821161098d57612cbd91600401612c20565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff8116810361098d579160243567ffffffffffffffff811161098d578260238201121561098d5780600401359267ffffffffffffffff841161098d576024848301011161098d576024019190565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501946060850201011161098d57565b35906fffffffffffffffffffffffffffffffff8216820361098d57565b919082606091031261098d57604051612daa81612aa7565b8092803590811515820361098d576040612dd99181938552612dce60208201612d75565b602086015201612d75565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561098d570180359067ffffffffffffffff821161098d5760200191813603831361098d57565b3573ffffffffffffffffffffffffffffffffffffffff8116810361098d5790565b3567ffffffffffffffff8116810361098d5790565b9067ffffffffffffffff612c1d92166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612a405760051b60200190565b9291612ec582612ea2565b93612ed36040519586612ac3565b602085848152019260051b810191821161098d57915b818310612ef557505050565b823573ffffffffffffffffffffffffffffffffffffffff8116810361098d57815260209283019201612ee9565b9190811015612f325760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612f32576060020190565b8051821015612f325760209160051b010190565b90600182811c92168015612fce575b6020831014612f9f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612f94565b9060405191826000825492612fec84612f85565b808452936001811690811561305a5750600114613013575b5061301192500383612ac3565b565b90506000929192526020600020906000915b81831061303e5750509060206130119282010138613004565b6020919350806001915483858901015201910190918492613025565b602093506130119592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138613004565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b604051906130e682612a8b565b60006080838281528260208201528260408201528260608201520152565b9060405161311181612a8b565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff166000526007602052612c1d6004604060002001612fd8565b818110613197575050565b6000815560010161318c565b818102929181159184041417156131b657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518015613254576020036132165760208180518101031261098d5760208101519060ff8211613216575060ff1690565b6112d3906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190612b04565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff82116131b657565b60ff16604d81116131b657600a0a90565b81156132a9570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146133de578284116133b4579061331d9161327a565b91604d60ff841611801561337b575b6133455750509061333f612c1d9261328e565b906131a3565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b506133858361328e565b80156132a9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04841161332c565b6133bd9161327a565b91604d60ff841611613345575050906133d8612c1d9261328e565b9061329f565b5050505090565b9081602091031261098d5751801515810361098d5790565b73ffffffffffffffffffffffffffffffffffffffff60015416330361341e57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b908051156136885767ffffffffffffffff8151602083012092169182600052600760205261347d81600560406000200161410d565b156136445760005260086020526040600020815167ffffffffffffffff8111612a40576134aa8254612f85565b601f8111613612575b506020601f821160011461354c5791613526827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea959361353c95600091613541575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612b04565b0390a2565b9050840151386134f5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106135fa57509261353c9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9896106135c3575b5050811b019055611112565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538806135b7565b9192602060018192868a01518155019401920161357c565b61363e90836000526020600020601f840160051c810191602085106108b857601f0160051c019061318c565b386134b3565b50906112d36040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612b04565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff1660008181526006602052604090205490929190156137b457916137b160e09261377d856137097f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b97613874565b8460005260076020526137208160406000206139bb565b61372983613874565b8460005260076020526137438360026040600020016139bb565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b919082039182116131b657565b6137f76130d9565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691613854602085019361384e61384163ffffffff875116426137e2565b85608089015116906131a3565b90614046565b8082101561386d57505b16825263ffffffff4216905290565b905061385e565b805115613914576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff602083015116106138b15750565b606490613912604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff6040820151161580159061399c575b61393b5750565b606490613912604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020820151161515613934565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991613af460609280546139f863ffffffff8260801c16426137e2565b9081613b33575b50506fffffffffffffffffffffffffffffffff6001816020860151169282815416808510600014613b2b57508280855b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155613aa88651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b6137b160405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091613a2f565b6fffffffffffffffffffffffffffffffff91613b68839283613b616001880154948286169560801c906131a3565b9116614046565b80821015613be757505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff000000000000000000000000000000001617815538806139ff565b9050613b72565b906040519182815491828252602082019060005260206000209260005b818110613c2057505061301192500383612ac3565b8454835260019485019487945060209093019201613c0b565b8054821015612f325760005260206000200190600090565b6000818152600360205260409020548015613de0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131b657600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131b657818103613d71575b5050506002548015613d42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613cff816002613c39565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613dc8613d82613d93936002613c39565b90549060031b1c9283926002613c39565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080613cc6565b5050600090565b6000818152600660205260409020548015613de0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131b657600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131b657818103613ed8575b5050506005548015613d42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613e95816005613c39565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b613efa613ee9613d93936005613c39565b90549060031b1c9283926005613c39565b90556000526006602052604060002055388080613e5c565b906001820191816000528260205260406000205480151560001461403d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131b6578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131b657818103614006575b50505080548015613d42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190613fc78282613c39565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b614026614016613d939386613c39565b90549060031b1c92839286613c39565b905560005283602052604060002055388080613f8f565b50505050600090565b919082018092116131b657565b806000526003602052604060002054156000146140ad5760025468010000000000000000811015612a4057614094613d938260018594016002556002613c39565b9055600254906000526003602052604060002055600190565b50600090565b806000526006602052604060002054156000146140ad5760055468010000000000000000811015612a40576140f4613d938260018594016005556005613c39565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054613de05780549068010000000000000000821015612a40578261414b613d93846001809601855584613c39565b905580549260005201602052604060002055600190565b9182549060ff8260a01c161580156143a1575b61439b576fffffffffffffffffffffffffffffffff821691600185019081546141ba63ffffffff6fffffffffffffffffffffffffffffffff83169360801c16426137e2565b90816142fd575b50508481106142b1575083831061421b5750506141f06fffffffffffffffffffffffffffffffff9283926137e2565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c9161422a81856137e2565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116131b65761427861427d9273ffffffffffffffffffffffffffffffffffffffff96614046565b61329f565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611614371576143189261384e9160801c906131a3565b8084101561436c5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806141c1565b614323565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561417556fea164736f6c634300081a000a" - -type BurnMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnMintTokenPoolABI, - Bin: BurnMintTokenPoolBin, - }, + Name: "burn-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnMintTokenPool contract", + ContractMetadata: gobindings.BurnMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go b/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go index 44a66e8372..d86a0a6c5a 100644 --- a/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go @@ -3,80 +3,33 @@ package burn_mint_with_lock_release_flag_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/burn_mint_with_lock_release_flag_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnMintWithLockReleaseFlagTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnMintWithLockReleaseFlagTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnMintWithLockReleaseFlagTokenPoolBin = "0x6101008060405234610355576148bb803803809161001d82856103d4565b833981019060a0818303126103555780516001600160a01b038116908190036103555761004c602083016103f7565b60408301519091906001600160401b0381116103555783019380601f86011215610355578451946001600160401b0386116103be578560051b90602082019661009860405198896103d4565b875260208088019282010192831161035557602001905b8282106103a6575050506100d160806100ca60608601610405565b9401610405565b92331561039557600180546001600160a01b0319163317905581158015610384575b8015610373575b610362578160209160049360805260c0526040519283809263313ce56760e01b82525afa60009181610321575b506102f6575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526101d8575b60405161430190816105ba82396080518181816115fc015281816117ec015281816122cb015281816124a2015281816127ff0152612877015260a05181818161278601526131d9015260c051818181610bd5015281816116980152612367015260e051818181610b65015281816116db01526120690152f35b60405160206101e781836103d4565b60008252600036813760e051156102e55760005b8251811015610262576001906001600160a01b036102198286610419565b5116836102258261045b565b610232575b5050016101fb565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1388361022a565b50905060005b82518110156102dc576001906001600160a01b036102868286610419565b511680156102d6578361029882610559565b6102a6575b50505b01610268565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a1388361029d565b506102a0565b5050503861015f565b6335f4a7b360e01b60005260046000fd5b60ff1660ff821681810361030a575061012d565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161035a575b8161033d602093836103d4565b810103126103555761034e906103f7565b9038610127565b600080fd5b3d9150610330565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038116156100fa565b506001600160a01b038416156100f3565b639b15e16f60e01b60005260046000fd5b602080916103b384610405565b8152019101906100af565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176103be57604052565b519060ff8216820361035557565b51906001600160a01b038216820361035557565b805182101561042d5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561042d5760005260206000200190600090565b600081815260036020526040902054801561055257600019810181811161053c5760025460001981019190821161053c578181036104eb575b50505060025480156104d557600019016104af816002610443565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b6105246104fc61050d936002610443565b90549060031b1c9283926002610443565b819391549060031b91821b91600019901b19161790565b90556000526003602052604060002055388080610494565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146105b357600254680100000000000000008110156103be5761059a61050d8260018594016002556002610443565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461291a57508063181f5a771461289b57806321df0da71461282c578063240028e8146127aa57806324f65ee71461274e57806339077537146122175780634c5ef0ed146121b257806354c8a4f31461203557806362ddd3c414611fb15780636d3d1a5814611f5f57806379ba509714611e7a5780637d54534e14611dcd5780638926f54f14611d695780638da5cb5b14611d17578063962d402014611b735780639a4575b914611554578063a42a7b8b146113cf578063a7cd63b714611303578063acfecf91146111df578063af58d59f14611178578063b0f479a114611126578063b7946580146110cf578063c0d7865514610fd7578063c4bffe2b14610e8e578063c75eea9c14610dc8578063cf7401f314610bf9578063dc0bd97114610b8a578063e0351e1314610b2f578063e8a1da171461025a5763f2fde38b1461016b57600080fd5b346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff6101b7612b48565b6101bf613348565b1633811461022f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b50346102575761026936612c36565b93919092610275613348565b82915b80831061099a575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b85821015610996578160051b85013581811215610992578501906101208236031261099257604051956102e387612a70565b823567ffffffffffffffff8116810361098d578752602083013567ffffffffffffffff81116109895783019536601f880112156109895786359661032688612e36565b97610334604051998a612aa8565b8089526020808a019160051b830101903682116109855760208301905b828210610952575050505060208801968752604084013567ffffffffffffffff811161094e576103849036908601612be7565b9860408901998a526103ae61039c3660608801612d77565b9560608b0196875260c0369101612d77565b9660808a019788526103c086516137bf565b6103ca88516137bf565b8a515115610926576103e667ffffffffffffffff8b5116613ffe565b156108ef5767ffffffffffffffff8a5116815260076020526040812061052687516fffffffffffffffffffffffffffffffff604082015116906104e16fffffffffffffffffffffffffffffffff6020830151169151151583608060405161044c81612a70565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61064c89516fffffffffffffffffffffffffffffffff604082015116906106076fffffffffffffffffffffffffffffffff6020830151169151151583608060405161057081612a70565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff82116108c25761066f8354612f19565b601f8111610887575b50602090601f83116001146107e8576106c692918591836107dd575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b8951805182101561070157906106fb6001926106f4838f67ffffffffffffffff90511692612f05565b5190613393565b016106cb565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2929593966107cf67ffffffffffffffff600197949c511692519351915161079b61076660405196879687526101006020880152610100870190612ae9565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10190939492916102b1565b015190503880610694565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b81811061086f5750908460019594939210610838575b505050811b0190556106c9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061082b565b92936020600181928786015181550195019301610815565b6108b29084865260208620601f850160051c810191602086106108b8575b601f0160051c0190613120565b38610678565b90915081906108a5565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610981576020916109768392833691890101612be7565b815201910190610351565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff6109ba6109b5878588612eb6565b612de4565b16956109c587613d32565b15610b035786845260076020526109e160056040862001613b39565b94845b8651811015610a1a576001908987526007602052610a1360056040892001610a0c838b612f05565b5190613e5d565b50016109e4565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610a538154612f19565b80610ac2575b5050500180549086815581610aa4575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a1019190949394610278565b865260208620908101905b81811015610a6957868155600101610aaf565b601f8111600114610ad85750555b863880610a59565b81835260208320610af391601f01861c810190600101613120565b8082528160208120915555610ad0565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610c31612b6b565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261025757604051610c6881612a8c565b6024358015158103610dc45781526044356fffffffffffffffffffffffffffffffff81168103610dc45760208201526064356fffffffffffffffffffffffffffffffff81168103610dc457604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610dc05760405190610cef82612a8c565b608435801515810361099257825260a4356fffffffffffffffffffffffffffffffff8116810361099257602083015260c4356fffffffffffffffffffffffffffffffff8116810361099257604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610d9e575b610d7257610d6f92936135fd565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610d61565b5080fd5b8280fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c6040610e8a9367ffffffffffffffff610e15612b6b565b610e1d61306d565b50168152600760205220613098565b61373a565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051906005548083528260208101600584526020842092845b818110610fbe575050610eec92500383612aa8565b8151610f10610efa82612e36565b91610f086040519384612aa8565b808352612e36565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015610f6f578067ffffffffffffffff610f5c60019388612f05565b5116610f688286612f05565b5201610f3d565b50925090604051928392602084019060208552518091526040840192915b818110610f9b575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101610f8d565b8454835260019485019487945060209093019201610ed7565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff611024612b48565b61102c613348565b1680156110a75760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a180f35b6004827f8579befe000000000000000000000000000000000000000000000000000000008152fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e8a61111261110d612b6b565b6130fe565b604051918291602083526020830190612ae9565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c60026040610e8a9467ffffffffffffffff6111c7612b6b565b6111cf61306d565b5016815260076020522001613098565b50346102575767ffffffffffffffff6111f736612ca6565b929091611202613348565b169161121b836000526006602052604060002054151590565b156112d757828452600760205261124a6005604086200161123d368486612b82565b6020815191012090613e5d565b1561128f57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769161128960405192839260208452602084019161302e565b0390a280f35b826112d3836040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485015260406024850152604484019161302e565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051600254808252602082018091600285526020852090855b8181106113b95750505082611362910383612aa8565b604051928392602084019060208552518091526040840192915b81811061138a575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161137c565b825484526020909301926001928301920161134c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575767ffffffffffffffff611410612b6b565b168152600760205261142760056040832001613b39565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061146c61145683612e36565b926114646040519485612aa8565b808452612e36565b01835b818110611543575050825b82518110156114c0578061149060019285612f05565b51855260086020526114a460408620612f6c565b6114ae8285612f05565b526114b98184612f05565b500161147a565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106114f857505050500390f35b91936020611533827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612ae9565b96019201920185949391926114e9565b80606060208093860101520161146f565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610dc057606060206040516115d281612a54565b8281520152608481016115e481612dc3565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611b295750602481019077ffffffffffffffff0000000000000000000000000000000061164b83612de4565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a4a578491611afa575b50611ad2576116d960448201612dc3565b7f0000000000000000000000000000000000000000000000000000000000000000611a80575b5067ffffffffffffffff61171283612de4565b1661172a816000526006602052604060002054151590565b15611a5557602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611a4a5784906119e7575b73ffffffffffffffffffffffffffffffffffffffff91501633036119bb57819260646117bf67ffffffffffffffff94612de4565b9201359283921680825260076020526118146040832073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169485916140ad565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018690527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a2813b15610257576040517f42966c68000000000000000000000000000000000000000000000000000000008152836004820152818160248183875af180156119b05761199b575b61196a6118fd61110d87877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1060608967ffffffffffffffff6118e486612de4565b16936040519182523360208301526040820152a2612de4565b610e8a6040517ffa7c07de00000000000000000000000000000000000000000000000000000000602082015260208152611938604082612aa8565b6040519261194584612a54565b8352602083019081526040519384936020855251604060208601526060850190612ae9565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612ae9565b6119a6828092612aa8565b61025757806118a3565b6040513d84823e3d90fd5b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611a42575b81611a0160209383612aa8565b81010312610992575173ffffffffffffffffffffffffffffffffffffffff811681036109925773ffffffffffffffffffffffffffffffffffffffff9061178b565b3d91506119f4565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b73ffffffffffffffffffffffffffffffffffffffff16808452600360205260408420546116ff577fd0d25976000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611b1c915060203d602011611b22575b611b148183612aa8565b8101906132df565b386116c8565b503d611b0a565b8273ffffffffffffffffffffffffffffffffffffffff611b4a602493612dc3565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346102575760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057611bc3903690600401612c05565b60243567ffffffffffffffff811161099257611be3903690600401612d29565b60449291923567ffffffffffffffff811161098957611c06903690600401612d29565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611cf5575b611cc957818114801590611cbf575b611c9757865b818110611c4b578780f35b80611c91611c5f6109b5600194868c612eb6565b611c6a83878b612ef5565b611c8b611c83611c7b868b8d612ef5565b923690612d77565b913690612d77565b916135fd565b01611c40565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611c3a565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611c2b565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576020611dc367ffffffffffffffff611daf612b6b565b166000526006602052604060002054151590565b6040519015158152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611e3d612b48565b611e45613348565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757805473ffffffffffffffffffffffffffffffffffffffff81163303611f37577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461025757611fc036612ca6565b611fcc93929193613348565b67ffffffffffffffff8216611fee816000526006602052604060002054151590565b1561200a5750610d6f9293612004913691612b82565b90613393565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346102575761205f9061206761204b36612c36565b9591612058939193613348565b3691612e4e565b933691612e4e565b7f00000000000000000000000000000000000000000000000000000000000000001561218a57815b8351811015612102578073ffffffffffffffffffffffffffffffffffffffff6120ba60019387612f05565b51166120c581613b9c565b6120d1575b500161208f565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1386120ca565b5090805b8251811015612186578073ffffffffffffffffffffffffffffffffffffffff61213160019386612f05565b511680156121805761214281613f9e565b61214f575b505b01612106565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a184612147565b50612149565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b50346102575760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576121ea612b6b565b906024359067ffffffffffffffff8211610257576020611dc3846122113660048701612be7565b90612df9565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8336030112610dc4578260405161229781612a09565b526122a560648301356131d7565b91608481016122b381612dc3565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361272d5750602481019177ffffffffffffffff0000000000000000000000000000000061231a84612de4565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561261e57869161270e575b506126e65767ffffffffffffffff6123ae84612de4565b166123c6816000526006602052604060002054151590565b156126bb57602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa90811561261e57869161269c575b50156126705761243d83612de4565b9061245a60a484019261221161245385856132f7565b3691612b82565b15612629575050906044839267ffffffffffffffff61247884612de4565b1680875260076020526124ca6002604089200173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169687916140ad565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a2019061251d82612dc3565b85843b15610257576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff929092166004830152602482018690528160448183885af1801561261e579273ffffffffffffffffffffffffffffffffffffffff6125de6125d860809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09961260e575b5050612de4565b92612dc3565b60405196875233898801521660408601528560608601521692a28060405161260581612a09565b52604051908152f35b8161261891612aa8565b386125d1565b6040513d88823e3d90fd5b61263392506132f7565b6112d36040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161302e565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6126b5915060203d602011611b2257611b148183612aa8565b3861242e565b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612727915060203d602011611b2257611b148183612aa8565b38612397565b8473ffffffffffffffffffffffffffffffffffffffff611b4a602493612dc3565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576020906127e5612b48565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575750610e8a6040516128dc604082612aa8565b601781527f4275726e4d696e74546f6b656e506f6f6c20312e362e310000000000000000006020820152604051918291602083526020830190612ae9565b905034610dc05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dc0576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610dc457602092507faff2afbf0000000000000000000000000000000000000000000000000000000081149081156129df575b81156129b5575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386129ae565b7f0e64dd2900000000000000000000000000000000000000000000000000000000811491506129a7565b6020810190811067ffffffffffffffff821117612a2557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612a2557604052565b60a0810190811067ffffffffffffffff821117612a2557604052565b6060810190811067ffffffffffffffff821117612a2557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612a2557604052565b919082519283825260005b848110612b335750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612af4565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098d57565b6004359067ffffffffffffffff8216820361098d57565b92919267ffffffffffffffff8211612a255760405191612bca601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184612aa8565b82948184528183011161098d578281602093846000960137010152565b9080601f8301121561098d57816020612c0293359101612b82565b90565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501948460051b01011161098d57565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff811161098d5781612c7f91600401612c05565b929092916024359067ffffffffffffffff821161098d57612ca291600401612c05565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff8116810361098d579160243567ffffffffffffffff811161098d578260238201121561098d5780600401359267ffffffffffffffff841161098d576024848301011161098d576024019190565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501946060850201011161098d57565b35906fffffffffffffffffffffffffffffffff8216820361098d57565b919082606091031261098d57604051612d8f81612a8c565b8092803590811515820361098d576040612dbe9181938552612db360208201612d5a565b602086015201612d5a565b910152565b3573ffffffffffffffffffffffffffffffffffffffff8116810361098d5790565b3567ffffffffffffffff8116810361098d5790565b9067ffffffffffffffff612c0292166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612a255760051b60200190565b9291612e5982612e36565b93612e676040519586612aa8565b602085848152019260051b810191821161098d57915b818310612e8957505050565b823573ffffffffffffffffffffffffffffffffffffffff8116810361098d57815260209283019201612e7d565b9190811015612ec65760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612ec6576060020190565b8051821015612ec65760209160051b010190565b90600182811c92168015612f62575b6020831014612f3357565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612f28565b9060405191826000825492612f8084612f19565b8084529360018116908115612fee5750600114612fa7575b50612fa592500383612aa8565b565b90506000929192526020600020906000915b818310612fd2575050906020612fa59282010138612f98565b6020919350806001915483858901015201910190918492612fb9565b60209350612fa59592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138612f98565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b6040519061307a82612a70565b60006080838281528260208201528260408201528260608201520152565b906040516130a581612a70565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff166000526007602052612c026004604060002001612f6c565b81811061312b575050565b60008155600101613120565b8181029291811591840414171561314a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9060ff8091169116039060ff821161314a57565b60ff16604d811161314a57600a0a90565b81156131a8570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f000000000000000000000000000000000000000000000000000000000000000060ff811690816006146132da57816006116132af57600661321891613179565b90604d60ff8316118015613276575b61323f575090613239612c029261318d565b90613137565b90507fa9cb113d00000000000000000000000000000000000000000000000000000000600052600660045260245260445260646000fd5b506132808261318d565b80156131a8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311613227565b6132ba906006613179565b90604d60ff83161161323f5750906132d4612c029261318d565b9061319e565b505090565b9081602091031261098d5751801515810361098d5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561098d570180359067ffffffffffffffff821161098d5760200191813603831361098d57565b73ffffffffffffffffffffffffffffffffffffffff60015416330361336957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b908051156135d35767ffffffffffffffff815160208301209216918260005260076020526133c8816005604060002001614058565b1561358f5760005260086020526040600020815167ffffffffffffffff8111612a25576133f58254612f19565b601f811161355d575b506020601f82116001146134975791613471827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea95936134879560009161348c575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612ae9565b0390a2565b905084015138613440565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106135455750926134879492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea98961061350e575b5050811b019055611112565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880613502565b9192602060018192868a0151815501940192016134c7565b61358990836000526020600020601f840160051c810191602085106108b857601f0160051c0190613120565b386133fe565b50906112d36040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612ae9565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff1660008181526006602052604090205490929190156136ff57916136fc60e0926136c8856136547f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b976137bf565b84600052600760205261366b816040600020613906565b613674836137bf565b84600052600760205261368e836002604060002001613906565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9190820391821161314a57565b61374261306d565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff808351169161379f602085019361379961378c63ffffffff8751164261372d565b8560808901511690613137565b90613f91565b808210156137b857505b16825263ffffffff4216905290565b90506137a9565b80511561385f576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff602083015116106137fc5750565b60649061385d604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604082015116158015906138e7575b6138865750565b60649061385d604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff602082015116151561387f565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991613a3f606092805461394363ffffffff8260801c164261372d565b9081613a7e575b50506fffffffffffffffffffffffffffffffff6001816020860151169282815416808510600014613a7657508280855b16167fffffffffffffffffffffffffffffffff000000000000000000000000000000008254161781556139f38651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b6136fc60405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b83809161397a565b6fffffffffffffffffffffffffffffffff91613ab3839283613aac6001880154948286169560801c90613137565b9116613f91565b80821015613b3257505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff0000000000000000000000000000000016178155388061394a565b9050613abd565b906040519182815491828252602082019060005260206000209260005b818110613b6b575050612fa592500383612aa8565b8454835260019485019487945060209093019201613b56565b8054821015612ec65760005260206000200190600090565b6000818152600360205260409020548015613d2b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161314a57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161314a57818103613cbc575b5050506002548015613c8d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613c4a816002613b84565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613d13613ccd613cde936002613b84565b90549060031b1c9283926002613b84565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080613c11565b5050600090565b6000818152600660205260409020548015613d2b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161314a57600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161314a57818103613e23575b5050506005548015613c8d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613de0816005613b84565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b613e45613e34613cde936005613b84565b90549060031b1c9283926005613b84565b90556000526006602052604060002055388080613da7565b9060018201918160005282602052604060002054801515600014613f88577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161314a578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161314a57818103613f51575b50505080548015613c8d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190613f128282613b84565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b613f71613f61613cde9386613b84565b90549060031b1c92839286613b84565b905560005283602052604060002055388080613eda565b50505050600090565b9190820180921161314a57565b80600052600360205260406000205415600014613ff85760025468010000000000000000811015612a2557613fdf613cde8260018594016002556002613b84565b9055600254906000526003602052604060002055600190565b50600090565b80600052600660205260406000205415600014613ff85760055468010000000000000000811015612a255761403f613cde8260018594016005556005613b84565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054613d2b5780549068010000000000000000821015612a255782614096613cde846001809601855584613b84565b905580549260005201602052604060002055600190565b9182549060ff8260a01c161580156142ec575b6142e6576fffffffffffffffffffffffffffffffff8216916001850190815461410563ffffffff6fffffffffffffffffffffffffffffffff83169360801c164261372d565b9081614248575b50508481106141fc575083831061416657505061413b6fffffffffffffffffffffffffffffffff92839261372d565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c91614175818561372d565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019080821161314a576141c36141c89273ffffffffffffffffffffffffffffffffffffffff96613f91565b61319e565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b8286929396116142bc57614263926137999160801c90613137565b808410156142b75750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff000000000000000000000000000000001617865592388061410c565b61426e565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b5082156140c056fea164736f6c634300081a000a" - -type BurnMintWithLockReleaseFlagTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnMintWithLockReleaseFlagTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnMintWithLockReleaseFlagTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnMintWithLockReleaseFlagTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnMintWithLockReleaseFlagTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnMintWithLockReleaseFlagTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnMintWithLockReleaseFlagTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-mint-with-lock-release-flag-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnMintWithLockReleaseFlagTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnMintWithLockReleaseFlagTokenPoolABI, - Bin: BurnMintWithLockReleaseFlagTokenPoolBin, - }, + Name: "burn-mint-with-lock-release-flag-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnMintWithLockReleaseFlagTokenPool contract", + ContractMetadata: gobindings.BurnMintWithLockReleaseFlagTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnMintWithLockReleaseFlagTokenPoolBin), + EVM: common.FromHex(gobindings.BurnMintWithLockReleaseFlagTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v1_6_1/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go b/chains/evm/deployment/v1_6_1/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go index 632dadd789..a166f6a6ca 100644 --- a/chains/evm/deployment/v1_6_1/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go @@ -3,81 +3,34 @@ package burn_to_address_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/burn_to_address_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnToAddressMintTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnToAddressMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"burnAddress","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getBurnAddress","inputs":[],"outputs":[{"name":"burnAddress","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"i_burnAddress","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnToAddressMintTokenPoolBin = "0x610120806040523461038257614c38803803809161001d8285610401565b8339810160c0828203126103825781516001600160a01b03811692908390036103825761004c60208201610424565b60408201516001600160401b0381116103825782019280601f85011215610382578351936001600160401b0385116103eb578460051b9060208201956100956040519788610401565b865260208087019282010192831161038257602001905b8282106103d3575050506100c260608301610432565b936100db60a06100d460808601610432565b9401610432565b9433156103c257600180546001600160a01b03191633179055811580156103b1575b80156103a0575b61038f578160209160049360805260c0526040519283809263313ce56760e01b82525afa6000918161034e575b50610323575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e0819052610206575b506101005260405161465190816105e782396080518181816116180152818161180701528181612441015281816126110152818161296e01526129e6015260a0518181816119d5015281816128f50152818161342701526134aa015260c051818181610beb015281816116b401526124dd015260e051818181610b7b015281816116f701526121c00152610100518181816118a40152612d5f0152f35b60206040516102158282610401565b60008152600036813760e051156103125760005b8151811015610290576001906001600160a01b036102478285610446565b51168461025382610488565b610260575b505001610229565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a13884610258565b505060005b8251811015610309576001906001600160a01b036102b38286610446565b5116801561030357836102c582610586565b6102d3575b50505b01610295565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a138836102ca565b506102cd565b50505038610169565b6335f4a7b360e01b60005260046000fd5b60ff1660ff82168181036103375750610137565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d602011610387575b8161036a60209383610401565b810103126103825761037b90610424565b9038610131565b600080fd5b3d915061035d565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b03811615610104565b506001600160a01b038416156100fd565b639b15e16f60e01b60005260046000fd5b602080916103e084610432565b8152019101906100ac565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176103eb57604052565b519060ff8216820361038257565b51906001600160a01b038216820361038257565b805182101561045a5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561045a5760005260206000200190600090565b600081815260036020526040902054801561057f5760001981018181116105695760025460001981019190821161056957818103610518575b505050600254801561050257600019016104dc816002610470565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61055161052961053a936002610470565b90549060031b1c9283926002610470565b819391549060031b91821b91600019901b19161790565b905560005260036020526040600020553880806104c1565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146105e057600254680100000000000000008110156103eb576105c761053a8260018594016002556002610470565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612a8957508063181f5a7714612a0a57806321df0da71461299b578063240028e81461291957806324f65ee7146128bd57806338b39d2914610dde578063390775371461236e5780634c5ef0ed1461230957806354c8a4f31461218c57806362ddd3c4146121085780636d3d1a58146120b657806379ba509714611fd15780637d54534e14611f245780638926f54f14611ec05780638da5cb5b14611e6e578063962d402014611cca5780639a4575b91461156f578063a42a7b8b146113ea578063a7cd63b71461131e578063acfecf91146111fa578063af58d59f14611193578063b0f479a114611141578063b7946580146110ea578063c0d7865514610ff2578063c4bffe2b14610ea9578063c75eea9c14610de3578063c8de9fe014610dde578063cf7401f314610c0f578063dc0bd97114610ba0578063e0351e1314610b45578063e8a1da17146102705763f2fde38b1461018157600080fd5b3461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5773ffffffffffffffffffffffffffffffffffffffff6101cd612cf1565b6101d56135cc565b1633811461024557807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b503461026d5761027f36612e20565b9391909261028b6135cc565b82915b8083106109b0575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b858210156109ac578160051b850135818112156109a857850190610120823603126109a857604051956102f987612bdf565b823567ffffffffffffffff811681036109a3578752602083013567ffffffffffffffff811161099f5783019536601f8801121561099f5786359661033c88613071565b9761034a604051998a612c17565b8089526020808a019160051b8301019036821161099b5760208301905b828210610968575050505060208801968752604084013567ffffffffffffffff81116109645761039a9036908601612dd1565b9860408901998a526103c46103b23660608801612f61565b9560608b0196875260c0369101612f61565b9660808a019788526103d68651613a43565b6103e08851613a43565b8a51511561093c576103fc67ffffffffffffffff8b5116614282565b156109055767ffffffffffffffff8a5116815260076020526040812061053c87516fffffffffffffffffffffffffffffffff604082015116906104f76fffffffffffffffffffffffffffffffff6020830151169151151583608060405161046281612bdf565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61066289516fffffffffffffffffffffffffffffffff6040820151169061061d6fffffffffffffffffffffffffffffffff6020830151169151151583608060405161058681612bdf565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff82116108d8576106858354613154565b601f811161089d575b50602090601f83116001146107fe576106dc92918591836107f3575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b89518051821015610717579061071160019261070a838f67ffffffffffffffff90511692613140565b5190613617565b016106e1565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2929593966107e567ffffffffffffffff600197949c51169251935191516107b161077c60405196879687526101006020880152610100870190612c92565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10190939492916102c7565b0151905038806106aa565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b818110610885575090846001959493921061084e575b505050811b0190556106df565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610841565b9293602060018192878601518155019501930161082b565b6108c89084865260208620601f850160051c810191602086106108ce575b601f0160051c019061335b565b3861068e565b90915081906108bb565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff81116109975760209161098c8392833691890101612dd1565b815201910190610367565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff6109d06109cb8785886130f1565b61301f565b16956109db87613fb6565b15610b195786845260076020526109f760056040862001613dbd565b94845b8651811015610a30576001908987526007602052610a2960056040892001610a22838b613140565b51906140e1565b50016109fa565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610a698154613154565b80610ad8575b5050500180549086815581610aba575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a101919094939461028e565b865260208620908101905b81811015610a7f57868155600101610ac5565b601f8111600114610aee5750555b863880610a6f565b81835260208320610b0991601f01861c81019060010161335b565b8082528160208120915555610ae6565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461026d5760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57610c47612d83565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261026d57604051610c7e81612bfb565b6024358015158103610dda5781526044356fffffffffffffffffffffffffffffffff81168103610dda5760208201526064356fffffffffffffffffffffffffffffffff81168103610dda57604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610dd65760405190610d0582612bfb565b60843580151581036109a857825260a4356fffffffffffffffffffffffffffffffff811681036109a857602083015260c4356fffffffffffffffffffffffffffffffff811681036109a857604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610db4575b610d8857610d859293613881565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610d77565b5080fd5b8280fd5b612d14565b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57610e4c610e476040610ea59367ffffffffffffffff610e30612d83565b610e386132a8565b501681526007602052206132d3565b6139be565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57604051906005548083528260208101600584526020842092845b818110610fd9575050610f0792500383612c17565b8151610f2b610f1582613071565b91610f236040519384612c17565b808352613071565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015610f8a578067ffffffffffffffff610f7760019388613140565b5116610f838286613140565b5201610f58565b50925090604051928392602084019060208552518091526040840192915b818110610fb6575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101610fa8565b8454835260019485019487945060209093019201610ef2565b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5773ffffffffffffffffffffffffffffffffffffffff61103f612cf1565b6110476135cc565b1680156110c25760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a180f35b6004827f8579befe000000000000000000000000000000000000000000000000000000008152fd5b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57610ea561112d611128612d83565b613339565b604051918291602083526020830190612c92565b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57610e4c610e4760026040610ea59467ffffffffffffffff6111e2612d83565b6111ea6132a8565b50168152600760205220016132d3565b503461026d5767ffffffffffffffff61121236612e90565b92909161121d6135cc565b1691611236836000526006602052604060002054151590565b156112f257828452600760205261126560056040862001611258368486612d9a565b60208151910120906140e1565b156112aa57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76916112a4604051928392602084526020840191613269565b0390a280f35b826112ee836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613269565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57604051600254808252602082018091600285526020852090855b8181106113d4575050508261137d910383612c17565b604051928392602084019060208552518091526040840192915b8181106113a5575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611397565b8254845260209093019260019283019201611367565b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5767ffffffffffffffff61142b612d83565b168152600760205261144260056040832001613dbd565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061148761147183613071565b9261147f6040519485612c17565b808452613071565b01835b81811061155e575050825b82518110156114db57806114ab60019285613140565b51855260086020526114bf604086206131a7565b6114c98285613140565b526114d48184613140565b5001611495565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061151357505050500390f35b9193602061154e827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612c92565b9601920192018594939192611504565b80606060208093860101520161148a565b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d576004359067ffffffffffffffff821161026d5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261026d57606060206040516115ee81612bc3565b82815201526084820161160081612ffe565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611c805750602482019177ffffffffffffffff000000000000000000000000000000006116678461301f565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611ba1578391611c51575b50611c29576116f560448201612ffe565b7f0000000000000000000000000000000000000000000000000000000000000000611bd7575b5067ffffffffffffffff61172e8461301f565b16611746816000526006602052604060002054151590565b15611bac57602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611ba1578390611b3e575b73ffffffffffffffffffffffffffffffffffffffff9150163303611b125767ffffffffffffffff9060646117da8561301f565b91013591829116808452600760205261182f6040852073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016938491614331565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018590527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a26040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082019081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166024830152604480830185905282529361196991906118f9606483612c17565b808060409788519461190b8a87612c17565b602086527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020870152519082885af13d15611b09573d61194b81612c58565b9061195889519283612c17565b8152809260203d92013e5b84614578565b805180611a68575b611a3785610ea56119cd6111288a897ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1060608b67ffffffffffffffff6119b68661301f565b1693895191825233602083015289820152a261301f565b9180519060ff7f000000000000000000000000000000000000000000000000000000000000000016602083015260208252611a088183612c17565b805193611a1485612bc3565b845260208401918252805194859460208652518260208701526060860190612c92565b9151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08584030190850152612c92565b90602080611a7a9383010191016135b4565b15611a86573880611971565b608483517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b60609150611963565b6024827f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611b99575b81611b5860209383612c17565b81010312610dda575173ffffffffffffffffffffffffffffffffffffffff81168103610dda5773ffffffffffffffffffffffffffffffffffffffff906117a7565b3d9150611b4b565b6040513d85823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008352600452602482fd5b73ffffffffffffffffffffffffffffffffffffffff168083526003602052604083205461171b577fd0d25976000000000000000000000000000000000000000000000000000000008352600452602482fd5b6004827f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611c73915060203d602011611c79575b611c6b8183612c17565b8101906135b4565b386116e4565b503d611c61565b9073ffffffffffffffffffffffffffffffffffffffff611ca1602493612ffe565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b503461026d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5760043567ffffffffffffffff8111610dd657611d1a903690600401612def565b60243567ffffffffffffffff81116109a857611d3a903690600401612f13565b60449291923567ffffffffffffffff811161099f57611d5d903690600401612f13565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611e4c575b611e2057818114801590611e16575b611dee57865b818110611da2578780f35b80611de8611db66109cb600194868c6130f1565b611dc183878b613130565b611de2611dda611dd2868b8d613130565b923690612f61565b913690612f61565b91613881565b01611d97565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611d91565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611d82565b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d576020611f1a67ffffffffffffffff611f06612d83565b166000526006602052604060002054151590565b6040519015158152f35b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611f94612cf1565b611f9c6135cc565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57805473ffffffffffffffffffffffffffffffffffffffff8116330361208e577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461026d5761211736612e90565b612123939291936135cc565b67ffffffffffffffff8216612145816000526006602052604060002054151590565b156121615750610d85929361215b913691612d9a565b90613617565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b503461026d576121b6906121be6121a236612e20565b95916121af9391936135cc565b3691613089565b933691613089565b7f0000000000000000000000000000000000000000000000000000000000000000156122e157815b8351811015612259578073ffffffffffffffffffffffffffffffffffffffff61221160019387613140565b511661221c81613e20565b612228575b50016121e6565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a138612221565b5090805b82518110156122dd578073ffffffffffffffffffffffffffffffffffffffff61228860019386613140565b511680156122d75761229981614222565b6122a6575b505b0161225d565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a18461229e565b506122a0565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b503461026d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57612341612d83565b906024359067ffffffffffffffff821161026d576020611f1a846123683660048701612dd1565b90613034565b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5760043567ffffffffffffffff8111610dd657806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8336030112610dda57826040516123ee81612b78565b5261241b61241161240c61240560c4860185612fad565b3691612d9a565b6133b4565b60648401356134a7565b916084810161242981612ffe565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361289c5750602481019177ffffffffffffffff000000000000000000000000000000006124908461301f565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561278d57869161287d575b506128555767ffffffffffffffff6125248461301f565b1661253c816000526006602052604060002054151590565b1561282a57602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa90811561278d57869161280b575b50156127df576125b38361301f565b906125c960a48401926123686124058585612fad565b15612798575050906044839267ffffffffffffffff6125e78461301f565b1680875260076020526126396002604089200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016968791614331565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a2019061268c82612ffe565b85843b1561026d576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff929092166004830152602482018690528160448183885af1801561278d579273ffffffffffffffffffffffffffffffffffffffff61274d61274760809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09961277d575b505061301f565b92612ffe565b60405196875233898801521660408601528560608601521692a28060405161277481612b78565b52604051908152f35b8161278791612c17565b38612740565b6040513d88823e3d90fd5b6127a29250612fad565b6112ee6040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613269565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b612824915060203d602011611c7957611c6b8183612c17565b386125a4565b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612896915060203d602011611c7957611c6b8183612c17565b3861250d565b8473ffffffffffffffffffffffffffffffffffffffff611ca1602493612ffe565b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461026d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602090612954612cf1565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461026d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261026d5750610ea5604051612a4b604082612c17565b601c81527f4275726e546f41646472657373546f6b656e506f6f6c20312e362e31000000006020820152604051918291602083526020830190612c92565b905034610dd65760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dd6576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610dda57602092507faff2afbf000000000000000000000000000000000000000000000000000000008114908115612b4e575b8115612b24575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438612b1d565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150612b16565b6020810190811067ffffffffffffffff821117612b9457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612b9457604052565b60a0810190811067ffffffffffffffff821117612b9457604052565b6060810190811067ffffffffffffffff821117612b9457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612b9457604052565b67ffffffffffffffff8111612b9457601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919082519283825260005b848110612cdc5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612c9d565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036109a357565b346109a35760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126109a357602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359067ffffffffffffffff821682036109a357565b929192612da682612c58565b91612db46040519384612c17565b8294818452818301116109a3578281602093846000960137010152565b9080601f830112156109a357816020612dec93359101612d9a565b90565b9181601f840112156109a35782359167ffffffffffffffff83116109a3576020808501948460051b0101116109a357565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126109a35760043567ffffffffffffffff81116109a35781612e6991600401612def565b929092916024359067ffffffffffffffff82116109a357612e8c91600401612def565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126109a35760043567ffffffffffffffff811681036109a3579160243567ffffffffffffffff81116109a357826023820112156109a35780600401359267ffffffffffffffff84116109a357602484830101116109a3576024019190565b9181601f840112156109a35782359167ffffffffffffffff83116109a357602080850194606085020101116109a357565b35906fffffffffffffffffffffffffffffffff821682036109a357565b91908260609103126109a357604051612f7981612bfb565b809280359081151582036109a3576040612fa89181938552612f9d60208201612f44565b602086015201612f44565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156109a3570180359067ffffffffffffffff82116109a3576020019181360383136109a357565b3573ffffffffffffffffffffffffffffffffffffffff811681036109a35790565b3567ffffffffffffffff811681036109a35790565b9067ffffffffffffffff612dec92166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612b945760051b60200190565b929161309482613071565b936130a26040519586612c17565b602085848152019260051b81019182116109a357915b8183106130c457505050565b823573ffffffffffffffffffffffffffffffffffffffff811681036109a3578152602092830192016130b8565b91908110156131015760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015613101576060020190565b80518210156131015760209160051b010190565b90600182811c9216801561319d575b602083101461316e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613163565b90604051918260008254926131bb84613154565b808452936001811690811561322957506001146131e2575b506131e092500383612c17565b565b90506000929192526020600020906000915b81831061320d5750509060206131e092820101386131d3565b60209193508060019154838589010152019101909184926131f4565b602093506131e09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386131d3565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b604051906132b582612bdf565b60006080838281528260208201528260408201528260608201520152565b906040516132e081612bdf565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff166000526007602052612dec60046040600020016131a7565b818110613366575050565b6000815560010161335b565b8181029291811591840414171561338557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518015613423576020036133e5576020818051810103126109a35760208101519060ff82116133e5575060ff1690565b6112ee906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190612c92565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff821161338557565b60ff16604d811161338557600a0a90565b8115613478570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146135ad5782841161358357906134ec91613449565b91604d60ff841611801561354a575b6135145750509061350e612dec9261345d565b90613372565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b506135548361345d565b8015613478577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0484116134fb565b61358c91613449565b91604d60ff841611613514575050906135a7612dec9261345d565b9061346e565b5050505090565b908160209103126109a3575180151581036109a35790565b73ffffffffffffffffffffffffffffffffffffffff6001541633036135ed57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b908051156138575767ffffffffffffffff8151602083012092169182600052600760205261364c8160056040600020016142dc565b156138135760005260086020526040600020815167ffffffffffffffff8111612b94576136798254613154565b601f81116137e1575b506020601f821160011461371b57916136f5827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea959361370b95600091613710575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612c92565b0390a2565b9050840151386136c4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106137c957509261370b9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610613792575b5050811b01905561112d565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880613786565b9192602060018192868a01518155019401920161374b565b61380d90836000526020600020601f840160051c810191602085106108ce57601f0160051c019061335b565b38613682565b50906112ee6040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612c92565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff166000818152600660205260409020549092919015613983579161398060e09261394c856138d87f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b97613a43565b8460005260076020526138ef816040600020613b8a565b6138f883613a43565b846000526007602052613912836002604060002001613b8a565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9190820391821161338557565b6139c66132a8565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691613a236020850193613a1d613a1063ffffffff875116426139b1565b8560808901511690613372565b90614215565b80821015613a3c57505b16825263ffffffff4216905290565b9050613a2d565b805115613ae3576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff60208301511610613a805750565b606490613ae1604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408201511615801590613b6b575b613b0a5750565b606490613ae1604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020820151161515613b03565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991613cc36060928054613bc763ffffffff8260801c16426139b1565b9081613d02575b50506fffffffffffffffffffffffffffffffff6001816020860151169282815416808510600014613cfa57508280855b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155613c778651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b61398060405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091613bfe565b6fffffffffffffffffffffffffffffffff91613d37839283613d306001880154948286169560801c90613372565b9116614215565b80821015613db657505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff00000000000000000000000000000000161781553880613bce565b9050613d41565b906040519182815491828252602082019060005260206000209260005b818110613def5750506131e092500383612c17565b8454835260019485019487945060209093019201613dda565b80548210156131015760005260206000200190600090565b6000818152600360205260409020548015613faf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161338557600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161338557818103613f40575b5050506002548015613f11577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613ece816002613e08565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613f97613f51613f62936002613e08565b90549060031b1c9283926002613e08565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080613e95565b5050600090565b6000818152600660205260409020548015613faf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161338557600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613385578181036140a7575b5050506005548015613f11577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01614064816005613e08565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b6140c96140b8613f62936005613e08565b90549060031b1c9283926005613e08565b9055600052600660205260406000205538808061402b565b906001820191816000528260205260406000205480151560001461420c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613385578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613385578181036141d5575b50505080548015613f11577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906141968282613e08565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b6141f56141e5613f629386613e08565b90549060031b1c92839286613e08565b90556000528360205260406000205538808061415e565b50505050600090565b9190820180921161338557565b8060005260036020526040600020541560001461427c5760025468010000000000000000811015612b9457614263613f628260018594016002556002613e08565b9055600254906000526003602052604060002055600190565b50600090565b8060005260066020526040600020541560001461427c5760055468010000000000000000811015612b94576142c3613f628260018594016005556005613e08565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054613faf5780549068010000000000000000821015612b94578261431a613f62846001809601855584613e08565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015614570575b61456a576fffffffffffffffffffffffffffffffff8216916001850190815461438963ffffffff6fffffffffffffffffffffffffffffffff83169360801c16426139b1565b90816144cc575b505084811061448057508383106143ea5750506143bf6fffffffffffffffffffffffffffffffff9283926139b1565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c916143f981856139b1565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116133855761444761444c9273ffffffffffffffffffffffffffffffffffffffff96614215565b61346e565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611614540576144e792613a1d9160801c90613372565b8084101561453b5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880614390565b6144f2565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b508215614344565b919290156145f3575081511561458c575090565b3b156145955790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156146065750805190602001fd5b6112ee906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190612c9256fea164736f6c634300081a000a" - -type BurnToAddressMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnToAddressMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnToAddressMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnToAddressMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnToAddressMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnToAddressMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnToAddressMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address - BurnAddress common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + BurnAddress common.Address `json:"burnAddress"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-to-address-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnToAddressMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnToAddressMintTokenPoolABI, - Bin: BurnToAddressMintTokenPoolBin, - }, + Name: "burn-to-address-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnToAddressMintTokenPool contract", + ContractMetadata: gobindings.BurnToAddressMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnToAddressMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnToAddressMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v1_6_1/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go b/chains/evm/deployment/v1_6_1/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go index d18a073c0a..32132fc4ab 100644 --- a/chains/evm/deployment/v1_6_1/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_with_from_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/burn_with_from_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnWithFromMintTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnWithFromMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnWithFromMintTokenPoolBin = "0x610100806040523461035457614c0f803803809161001d82856105b2565b8339810160a0828203126103545781516001600160a01b03811692908390036103545761004c602082016105d5565b60408201516001600160401b0381116103545782019280601f85011215610354578351936001600160401b038511610359578460051b90602082019561009560405197886105b2565b865260208087019282010192831161035457602001905b82821061059a575050506100ce60806100c7606085016105e3565b93016105e3565b91331561058957600180546001600160a01b0319163317905584158015610578575b8015610567575b61055657608085905260c05260405163313ce56760e01b8152602081600481885afa6000918161051a575b506104ef575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526103d2575b50604051636eb1769f60e11b81523060048201819052602482015290602082604481845afa9182156103c657600092610392575b50600019820180921161037c57604051602081019263095ea7b360e01b84523060248301526044820152604481526101c76064826105b2565b6000806040948551936101da87866105b2565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646020860152519082865af13d1561036f573d906001600160401b03821161035957845161024b94909261023c601f8201601f1916602001856105b2565b83523d6000602085013e610781565b8051806102d9575b82516143bd908161085282396080518181816115fc015281816117ec015281816122f4015281816124c4015281816128210152612899015260a05181818161190e015281816127a80152818161325f01526132e2015260c051818181610bd5015281816116980152612390015260e051818181610b65015281816116db01526120730152f35b81602091810103126103545760200151801590811503610354576102fe573880610253565b5162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b9161024b92606091610781565b634e487b7160e01b600052601160045260246000fd5b9091506020813d6020116103be575b816103ae602093836105b2565b810103126103545751903861018e565b3d91506103a1565b6040513d6000823e3d90fd5b60206040516103e182826105b2565b60008152600036813760e051156104de5760005b815181101561045c576001906001600160a01b0361041382856105f7565b51168461041f82610639565b61042c575b5050016103f5565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a13884610424565b505060005b82518110156104d5576001906001600160a01b0361047f82866105f7565b511680156104cf578361049182610721565b61049f575b50505b01610461565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a13883610496565b50610499565b5050503861015a565b6335f4a7b360e01b60005260046000fd5b60ff1660ff82168181036105035750610128565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161054e575b81610536602093836105b2565b8101031261035457610547906105d5565b9038610122565b3d9150610529565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038116156100f7565b506001600160a01b038316156100f0565b639b15e16f60e01b60005260046000fd5b602080916105a7846105e3565b8152019101906100ac565b601f909101601f19168101906001600160401b0382119082101761035957604052565b519060ff8216820361035457565b51906001600160a01b038216820361035457565b805182101561060b5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561060b5760005260206000200190600090565b600081815260036020526040902054801561071a57600019810181811161037c5760025460001981019190821161037c578181036106c9575b50505060025480156106b3576000190161068d816002610621565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b6107026106da6106eb936002610621565b90549060031b1c9283926002610621565b819391549060031b91821b91600019901b19161790565b90556000526003602052604060002055388080610672565b5050600090565b8060005260036020526040600020541560001461077b5760025468010000000000000000811015610359576107626106eb8260018594016002556002610621565b9055600254906000526003602052604060002055600190565b50600090565b919290156107e35750815115610795575090565b3b1561079e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156107f65750805190602001fd5b6040519062461bcd60e51b8252602060048301528181519182602483015260005b8381106108395750508160006044809484010152601f80199101168101030190fd5b6020828201810151604487840101528593500161081756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461293c57508063181f5a77146128bd57806321df0da71461284e578063240028e8146127cc57806324f65ee71461277057806339077537146122215780634c5ef0ed146121bc57806354c8a4f31461203f57806362ddd3c414611fbb5780636d3d1a5814611f6957806379ba509714611e845780637d54534e14611dd75780638926f54f14611d735780638da5cb5b14611d21578063962d402014611b7d5780639a4575b914611554578063a42a7b8b146113cf578063a7cd63b714611303578063acfecf91146111df578063af58d59f14611178578063b0f479a114611126578063b7946580146110cf578063c0d7865514610fd7578063c4bffe2b14610e8e578063c75eea9c14610dc8578063cf7401f314610bf9578063dc0bd97114610b8a578063e0351e1314610b2f578063e8a1da171461025a5763f2fde38b1461016b57600080fd5b346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff6101b7612b6a565b6101bf613404565b1633811461022f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b50346102575761026936612c58565b93919092610275613404565b82915b80831061099a575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b85821015610996578160051b85013581811215610992578501906101208236031261099257604051956102e387612a92565b823567ffffffffffffffff8116810361098d578752602083013567ffffffffffffffff81116109895783019536601f880112156109895786359661032688612ea9565b97610334604051998a612aca565b8089526020808a019160051b830101903682116109855760208301905b828210610952575050505060208801968752604084013567ffffffffffffffff811161094e576103849036908601612c09565b9860408901998a526103ae61039c3660608801612d99565b9560608b0196875260c0369101612d99565b9660808a019788526103c0865161387b565b6103ca885161387b565b8a515115610926576103e667ffffffffffffffff8b51166140ba565b156108ef5767ffffffffffffffff8a5116815260076020526040812061052687516fffffffffffffffffffffffffffffffff604082015116906104e16fffffffffffffffffffffffffffffffff6020830151169151151583608060405161044c81612a92565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61064c89516fffffffffffffffffffffffffffffffff604082015116906106076fffffffffffffffffffffffffffffffff6020830151169151151583608060405161057081612a92565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff82116108c25761066f8354612f8c565b601f8111610887575b50602090601f83116001146107e8576106c692918591836107dd575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b8951805182101561070157906106fb6001926106f4838f67ffffffffffffffff90511692612f78565b519061344f565b016106cb565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2929593966107cf67ffffffffffffffff600197949c511692519351915161079b61076660405196879687526101006020880152610100870190612b0b565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10190939492916102b1565b015190503880610694565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b81811061086f5750908460019594939210610838575b505050811b0190556106c9565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061082b565b92936020600181928786015181550195019301610815565b6108b29084865260208620601f850160051c810191602086106108b8575b601f0160051c0190613193565b38610678565b90915081906108a5565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610981576020916109768392833691890101612c09565b815201910190610351565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff6109ba6109b5878588612f29565b612e57565b16956109c587613dee565b15610b035786845260076020526109e160056040862001613bf5565b94845b8651811015610a1a576001908987526007602052610a1360056040892001610a0c838b612f78565b5190613f19565b50016109e4565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610a538154612f8c565b80610ac2575b5050500180549086815581610aa4575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a1019190949394610278565b865260208620908101905b81811015610a6957868155600101610aaf565b601f8111600114610ad85750555b863880610a59565b81835260208320610af391601f01861c810190600101613193565b8082528160208120915555610ad0565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610c31612b8d565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261025757604051610c6881612aae565b6024358015158103610dc45781526044356fffffffffffffffffffffffffffffffff81168103610dc45760208201526064356fffffffffffffffffffffffffffffffff81168103610dc457604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610dc05760405190610cef82612aae565b608435801515810361099257825260a4356fffffffffffffffffffffffffffffffff8116810361099257602083015260c4356fffffffffffffffffffffffffffffffff8116810361099257604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610d9e575b610d7257610d6f92936136b9565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610d61565b5080fd5b8280fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c6040610e8a9367ffffffffffffffff610e15612b8d565b610e1d6130e0565b5016815260076020522061310b565b6137f6565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051906005548083528260208101600584526020842092845b818110610fbe575050610eec92500383612aca565b8151610f10610efa82612ea9565b91610f086040519384612aca565b808352612ea9565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015610f6f578067ffffffffffffffff610f5c60019388612f78565b5116610f688286612f78565b5201610f3d565b50925090604051928392602084019060208552518091526040840192915b818110610f9b575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101610f8d565b8454835260019485019487945060209093019201610ed7565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575773ffffffffffffffffffffffffffffffffffffffff611024612b6a565b61102c613404565b1680156110a75760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a180f35b6004827f8579befe000000000000000000000000000000000000000000000000000000008152fd5b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e8a61111261110d612b8d565b613171565b604051918291602083526020830190612b0b565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757610e31610e2c60026040610e8a9467ffffffffffffffff6111c7612b8d565b6111cf6130e0565b501681526007602052200161310b565b50346102575767ffffffffffffffff6111f736612cc8565b929091611202613404565b169161121b836000526006602052604060002054151590565b156112d757828452600760205261124a6005604086200161123d368486612ba4565b6020815191012090613f19565b1561128f57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76916112896040519283926020845260208401916130a1565b0390a280f35b826112d3836040519384937f74f23c7c00000000000000000000000000000000000000000000000000000000855260048501526040602485015260448401916130a1565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757604051600254808252602082018091600285526020852090855b8181106113b95750505082611362910383612aca565b604051928392602084019060208552518091526040840192915b81811061138a575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161137c565b825484526020909301926001928301920161134c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575767ffffffffffffffff611410612b8d565b168152600760205261142760056040832001613bf5565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061146c61145683612ea9565b926114646040519485612aca565b808452612ea9565b01835b818110611543575050825b82518110156114c0578061149060019285612f78565b51855260086020526114a460408620612fdf565b6114ae8285612f78565b526114b98184612f78565b500161147a565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106114f857505050500390f35b91936020611533827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612b0b565b96019201920185949391926114e9565b80606060208093860101520161146f565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc05760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610dc057606060206040516115d281612a76565b8281520152608481016115e481612e36565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611b335750602481019077ffffffffffffffff0000000000000000000000000000000061164b83612e57565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a54578491611b04575b50611adc576116d960448201612e36565b7f0000000000000000000000000000000000000000000000000000000000000000611a8a575b5067ffffffffffffffff61171283612e57565b1661172a816000526006602052604060002054151590565b15611a5f57602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611a545784906119f1575b73ffffffffffffffffffffffffffffffffffffffff91501633036119c557819260646117bf67ffffffffffffffff94612e57565b9201359283921680825260076020526118146040832073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016948591614169565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018690527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a2813b15610257576040517f9dc29fac00000000000000000000000000000000000000000000000000000000815230600482015260248101849052818160448183875af180156119ba576119a5575b61197461190461110d87877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1060608967ffffffffffffffff6118eb86612e57565b16936040519182523360208301526040820152a2612e57565b610e8a60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152611942604082612aca565b6040519261194f84612a76565b8352602083019081526040519384936020855251604060208601526060850190612b0b565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b0b565b6119b0828092612aca565b61025757806118aa565b6040513d84823e3d90fd5b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611a4c575b81611a0b60209383612aca565b81010312610992575173ffffffffffffffffffffffffffffffffffffffff811681036109925773ffffffffffffffffffffffffffffffffffffffff9061178b565b3d91506119fe565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b73ffffffffffffffffffffffffffffffffffffffff16808452600360205260408420546116ff577fd0d25976000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611b26915060203d602011611b2c575b611b1e8183612aca565b8101906133ec565b386116c8565b503d611b14565b8273ffffffffffffffffffffffffffffffffffffffff611b54602493612e36565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346102575760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057611bcd903690600401612c27565b60243567ffffffffffffffff811161099257611bed903690600401612d4b565b60449291923567ffffffffffffffff811161098957611c10903690600401612d4b565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611cff575b611cd357818114801590611cc9575b611ca157865b818110611c55578780f35b80611c9b611c696109b5600194868c612f29565b611c7483878b612f68565b611c95611c8d611c85868b8d612f68565b923690612d99565b913690612d99565b916136b9565b01611c4a565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611c44565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611c35565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576020611dcd67ffffffffffffffff611db9612b8d565b166000526006602052604060002054151590565b6040519015158152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611e47612b6a565b611e4f613404565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757805473ffffffffffffffffffffffffffffffffffffffff81163303611f41577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461025757611fca36612cc8565b611fd693929193613404565b67ffffffffffffffff8216611ff8816000526006602052604060002054151590565b156120145750610d6f929361200e913691612ba4565b9061344f565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b5034610257576120699061207161205536612c58565b9591612062939193613404565b3691612ec1565b933691612ec1565b7f00000000000000000000000000000000000000000000000000000000000000001561219457815b835181101561210c578073ffffffffffffffffffffffffffffffffffffffff6120c460019387612f78565b51166120cf81613c58565b6120db575b5001612099565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1386120d4565b5090805b8251811015612190578073ffffffffffffffffffffffffffffffffffffffff61213b60019386612f78565b5116801561218a5761214c8161405a565b612159575b505b01612110565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a184612151565b50612153565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b50346102575760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610257576121f4612b8d565b906024359067ffffffffffffffff8211610257576020611dcd8461221b3660048701612c09565b90612e6c565b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575760043567ffffffffffffffff8111610dc057806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8336030112610dc457826040516122a181612a2b565b526122ce6122c46122bf6122b860c4860185612de5565b3691612ba4565b6131ec565b60648401356132df565b91608481016122dc81612e36565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361274f5750602481019177ffffffffffffffff0000000000000000000000000000000061234384612e57565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612640578691612730575b506127085767ffffffffffffffff6123d784612e57565b166123ef816000526006602052604060002054151590565b156126dd57602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156126405786916126be575b50156126925761246683612e57565b9061247c60a484019261221b6122b88585612de5565b1561264b575050906044839267ffffffffffffffff61249a84612e57565b1680875260076020526124ec6002604089200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016968791614169565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a2019061253f82612e36565b85843b15610257576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff929092166004830152602482018690528160448183885af18015612640579273ffffffffffffffffffffffffffffffffffffffff6126006125fa60809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc099612630575b5050612e57565b92612e36565b60405196875233898801521660408601528560608601521692a28060405161262781612a2b565b52604051908152f35b8161263a91612aca565b386125f3565b6040513d88823e3d90fd5b6126559250612de5565b6112d36040519283927f24eb47e50000000000000000000000000000000000000000000000000000000084526020600485015260248401916130a1565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6126d7915060203d602011611b2c57611b1e8183612aca565b38612457565b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612749915060203d602011611b2c57611b1e8183612aca565b386123c0565b8473ffffffffffffffffffffffffffffffffffffffff611b54602493612e36565b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346102575760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602090612807612b6a565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461025757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102575750610e8a6040516128fe604082612aca565b601f81527f4275726e5769746846726f6d4d696e74546f6b656e506f6f6c20312e362e31006020820152604051918291602083526020830190612b0b565b905034610dc05760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610dc0576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610dc457602092507faff2afbf000000000000000000000000000000000000000000000000000000008114908115612a01575b81156129d7575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386129d0565b7f0e64dd2900000000000000000000000000000000000000000000000000000000811491506129c9565b6020810190811067ffffffffffffffff821117612a4757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612a4757604052565b60a0810190811067ffffffffffffffff821117612a4757604052565b6060810190811067ffffffffffffffff821117612a4757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612a4757604052565b919082519283825260005b848110612b555750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612b16565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361098d57565b6004359067ffffffffffffffff8216820361098d57565b92919267ffffffffffffffff8211612a475760405191612bec601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184612aca565b82948184528183011161098d578281602093846000960137010152565b9080601f8301121561098d57816020612c2493359101612ba4565b90565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501948460051b01011161098d57565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff811161098d5781612ca191600401612c27565b929092916024359067ffffffffffffffff821161098d57612cc491600401612c27565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261098d5760043567ffffffffffffffff8116810361098d579160243567ffffffffffffffff811161098d578260238201121561098d5780600401359267ffffffffffffffff841161098d576024848301011161098d576024019190565b9181601f8401121561098d5782359167ffffffffffffffff831161098d576020808501946060850201011161098d57565b35906fffffffffffffffffffffffffffffffff8216820361098d57565b919082606091031261098d57604051612db181612aae565b8092803590811515820361098d576040612de09181938552612dd560208201612d7c565b602086015201612d7c565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561098d570180359067ffffffffffffffff821161098d5760200191813603831361098d57565b3573ffffffffffffffffffffffffffffffffffffffff8116810361098d5790565b3567ffffffffffffffff8116810361098d5790565b9067ffffffffffffffff612c2492166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612a475760051b60200190565b9291612ecc82612ea9565b93612eda6040519586612aca565b602085848152019260051b810191821161098d57915b818310612efc57505050565b823573ffffffffffffffffffffffffffffffffffffffff8116810361098d57815260209283019201612ef0565b9190811015612f395760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612f39576060020190565b8051821015612f395760209160051b010190565b90600182811c92168015612fd5575b6020831014612fa657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612f9b565b9060405191826000825492612ff384612f8c565b8084529360018116908115613061575060011461301a575b5061301892500383612aca565b565b90506000929192526020600020906000915b818310613045575050906020613018928201013861300b565b602091935080600191548385890101520191019091849261302c565b602093506130189592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013861300b565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b604051906130ed82612a92565b60006080838281528260208201528260408201528260608201520152565b9060405161311881612a92565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff166000526007602052612c246004604060002001612fdf565b81811061319e575050565b60008155600101613193565b818102929181159184041417156131bd57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8051801561325b5760200361321d5760208180518101031261098d5760208101519060ff821161321d575060ff1690565b6112d3906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190612b0b565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff82116131bd57565b60ff16604d81116131bd57600a0a90565b81156132b0570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146133e5578284116133bb579061332491613281565b91604d60ff8416118015613382575b61334c57505090613346612c2492613295565b906131aa565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b5061338c83613295565b80156132b0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411613333565b6133c491613281565b91604d60ff84161161334c575050906133df612c2492613295565b906132a6565b5050505090565b9081602091031261098d5751801515810361098d5790565b73ffffffffffffffffffffffffffffffffffffffff60015416330361342557565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b9080511561368f5767ffffffffffffffff81516020830120921691826000526007602052613484816005604060002001614114565b1561364b5760005260086020526040600020815167ffffffffffffffff8111612a47576134b18254612f8c565b601f8111613619575b506020601f8211600114613553579161352d827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea959361354395600091613548575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612b0b565b0390a2565b9050840151386134fc565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106136015750926135439492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9896106135ca575b5050811b019055611112565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538806135be565b9192602060018192868a015181550194019201613583565b61364590836000526020600020601f840160051c810191602085106108b857601f0160051c0190613193565b386134ba565b50906112d36040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612b0b565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff1660008181526006602052604090205490929190156137bb57916137b860e092613784856137107f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b9761387b565b8460005260076020526137278160406000206139c2565b6137308361387b565b84600052600760205261374a8360026040600020016139c2565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b919082039182116131bd57565b6137fe6130e0565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff808351169161385b602085019361385561384863ffffffff875116426137e9565b85608089015116906131aa565b9061404d565b8082101561387457505b16825263ffffffff4216905290565b9050613865565b80511561391b576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff602083015116106138b85750565b606490613919604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604082015116158015906139a3575b6139425750565b606490613919604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff602082015116151561393b565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991613afb60609280546139ff63ffffffff8260801c16426137e9565b9081613b3a575b50506fffffffffffffffffffffffffffffffff6001816020860151169282815416808510600014613b3257508280855b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416178155613aaf8651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b6137b860405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091613a36565b6fffffffffffffffffffffffffffffffff91613b6f839283613b686001880154948286169560801c906131aa565b911661404d565b80821015613bee57505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff00000000000000000000000000000000161781553880613a06565b9050613b79565b906040519182815491828252602082019060005260206000209260005b818110613c2757505061301892500383612aca565b8454835260019485019487945060209093019201613c12565b8054821015612f395760005260206000200190600090565b6000818152600360205260409020548015613de7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd57818103613d78575b5050506002548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613d06816002613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613dcf613d89613d9a936002613c40565b90549060031b1c9283926002613c40565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080613ccd565b5050600090565b6000818152600660205260409020548015613de7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd57600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd57818103613edf575b5050506005548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613e9c816005613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b613f01613ef0613d9a936005613c40565b90549060031b1c9283926005613c40565b90556000526006602052604060002055388080613e63565b9060018201918160005282602052604060002054801515600014614044577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116131bd578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116131bd5781810361400d575b50505080548015613d49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190613fce8282613c40565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61402d61401d613d9a9386613c40565b90549060031b1c92839286613c40565b905560005283602052604060002055388080613f96565b50505050600090565b919082018092116131bd57565b806000526003602052604060002054156000146140b45760025468010000000000000000811015612a475761409b613d9a8260018594016002556002613c40565b9055600254906000526003602052604060002055600190565b50600090565b806000526006602052604060002054156000146140b45760055468010000000000000000811015612a47576140fb613d9a8260018594016005556005613c40565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054613de75780549068010000000000000000821015612a475782614152613d9a846001809601855584613c40565b905580549260005201602052604060002055600190565b9182549060ff8260a01c161580156143a8575b6143a2576fffffffffffffffffffffffffffffffff821691600185019081546141c163ffffffff6fffffffffffffffffffffffffffffffff83169360801c16426137e9565b9081614304575b50508481106142b857508383106142225750506141f76fffffffffffffffffffffffffffffffff9283926137e9565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c9161423181856137e9565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116131bd5761427f6142849273ffffffffffffffffffffffffffffffffffffffff9661404d565b6132a6565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b8286929396116143785761431f926138559160801c906131aa565b808410156143735750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806141c8565b61432a565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561417c56fea164736f6c634300081a000a" - -type BurnWithFromMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnWithFromMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnWithFromMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnWithFromMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnWithFromMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnWithFromMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnWithFromMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-with-from-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnWithFromMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnWithFromMintTokenPoolABI, - Bin: BurnWithFromMintTokenPoolBin, - }, + Name: "burn-with-from-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnWithFromMintTokenPool contract", + ContractMetadata: gobindings.BurnWithFromMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnWithFromMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnWithFromMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool/lock_release_token_pool.go b/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool/lock_release_token_pool.go index 7cff7e9987..99cf2aa3fc 100644 --- a/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool/lock_release_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool/lock_release_token_pool.go @@ -5,168 +5,106 @@ package lock_release_token_pool import ( "math/big" - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/lock_release_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "LockReleaseTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const LockReleaseTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRebalancer","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"provideLiquidity","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRebalancer","inputs":[{"name":"rebalancer","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferLiquidity","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"withdrawLiquidity","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LiquidityAdded","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LiquidityRemoved","inputs":[{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LiquidityTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RebalancerSet","inputs":[{"name":"oldRebalancer","type":"address","indexed":false,"internalType":"address"},{"name":"newRebalancer","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InsufficientLiquidity","inputs":[]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const LockReleaseTokenPoolBin = "0x6101008060405234610377576150b5803803809161001d82856103f6565b833981019060a0818303126103775780516001600160a01b038116918282036103775761004c60208201610419565b60408201519092906001600160401b0381116103775782019480601f87011215610377578551956001600160401b0387116103e0578660051b906020820197610098604051998a6103f6565b885260208089019282010192831161037757602001905b8282106103c8575050506100d160806100ca60608501610427565b9301610427565b9333156103b757600180546001600160a01b03191633179055801580156103a6575b8015610395575b6103845760049260209260805260c0526040519283809263313ce56760e01b82525afa60009181610343575b50610318575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526101fa575b604051614ad990816105dc82396080518181816103330152818161175b015281816119760152818161232f01528181612743015281816128f901528181612b5901528181612bd10152612cc8015260a051818181611a3801528181612ae00152818161376f01526137f2015260c051818181610d26015281816117f701526127df015260e051818181610cb60152818161183a015261246f0152f35b604051602061020981836103f6565b60008252600036813760e051156103075760005b8251811015610284576001906001600160a01b0361023b828661043b565b5116836102478261047d565b610254575b50500161021d565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1388361024c565b50905060005b82518110156102fe576001906001600160a01b036102a8828661043b565b511680156102f857836102ba8261057b565b6102c8575b50505b0161028a565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a138836102bf565b506102c2565b5050503861015e565b6335f4a7b360e01b60005260046000fd5b60ff1660ff821681810361032c575061012c565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161037c575b8161035f602093836103f6565b810103126103775761037090610419565b9038610126565b600080fd5b3d9150610352565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038316156100fa565b506001600160a01b038516156100f3565b639b15e16f60e01b60005260046000fd5b602080916103d584610427565b8152019101906100af565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176103e057604052565b519060ff8216820361037757565b51906001600160a01b038216820361037757565b805182101561044f5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561044f5760005260206000200190600090565b600081815260036020526040902054801561057457600019810181811161055e5760025460001981019190821161055e5781810361050d575b50505060025480156104f757600019016104d1816002610465565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61054661051e61052f936002610465565b90549060031b1c9283926002610465565b819391549060031b91821b91600019901b19161790565b905560005260036020526040600020553880806104b6565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146105d557600254680100000000000000008110156103e0576105bc61052f8260018594016002556002610465565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612dd8575080630a861f2a14612c74578063181f5a7714612bf557806321df0da714612b86578063240028e814612b0457806324f65ee714612aa8578063390775371461266f578063432a6ba31461261d5780634c5ef0ed146125b857806354c8a4f31461243b57806362ddd3c4146123b7578063663200871461219e5780636cfd1553146120c55780636d3d1a581461207357806379ba509714611f8e5780637d54534e14611ee15780638926f54f14611e7d5780638da5cb5b14611e2b578063962d402014611c875780639a4575b9146116b3578063a42a7b8b1461152e578063a7cd63b714611462578063acfecf911461133e578063af58d59f146112d7578063b0f479a114611285578063b79465801461122e578063c0d7865514611128578063c4bffe2b14610fdf578063c75eea9c14610f19578063cf7401f314610d4a578063dc0bd97114610cdb578063e0351e1314610c80578063e8a1da17146103ab578063eb521a4c146102915763f2fde38b146101a257600080fd5b3461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5773ffffffffffffffffffffffffffffffffffffffff6101ee613040565b6101f6613914565b1633811461026657807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b80fd5b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760043573ffffffffffffffffffffffffffffffffffffffff600a5416330361037f576040517f23b872dd0000000000000000000000000000000000000000000000000000000060208201523360248201523060448201526064808201839052815261035790610331608482612f66565b7f0000000000000000000000000000000000000000000000000000000000000000613ed2565b337fc17cea59c2955cb181b03393209566960365771dbba9dc3d510180e7cb3120888380a380f35b6024827f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b503461028e576103ba36613100565b939190926103c6613914565b82915b808310610aeb575050508063ffffffff4216917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1843603015b85821015610ae7578160051b85013581811215610ae35785019061012082360312610ae3576040519561043487612f2e565b823567ffffffffffffffff81168103610ade578752602083013567ffffffffffffffff8111610ada5783019536601f88011215610ada5786359661047788613351565b97610485604051998a612f66565b8089526020808a019160051b83010190368211610ad65760208301905b828210610aa3575050505060208801968752604084013567ffffffffffffffff8111610a9f576104d590369086016130b1565b9860408901998a526104ff6104ed3660608801613241565b9560608b0196875260c0369101613241565b9660808a019788526105118651613d8b565b61051b8851613d8b565b8a515115610a775761053767ffffffffffffffff8b511661470a565b15610a405767ffffffffffffffff8a5116815260076020526040812061067787516fffffffffffffffffffffffffffffffff604082015116906106326fffffffffffffffffffffffffffffffff6020830151169151151583608060405161059d81612f2e565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b61079d89516fffffffffffffffffffffffffffffffff604082015116906107586fffffffffffffffffffffffffffffffff602083015116915115158360806040516106c181612f2e565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b60048c5191019080519067ffffffffffffffff8211610a13576107c08354613434565b601f81116109d8575b50602090601f831160011461093957610817929185918361092e575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b805b89518051821015610852579061084c600192610845838f67ffffffffffffffff90511692613420565b519061395f565b0161081c565b5050975097987f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c29295939661092067ffffffffffffffff600197949c51169251935191516108ec6108b760405196879687526101006020880152610100870190612fe1565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019093949291610402565b0151905038806107e5565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b8181106109c05750908460019594939210610989575b505050811b01905561081a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538808061097c565b92936020600181928786015181550195019301610966565b610a039084865260208620601f850160051c81019160208610610a09575b601f0160051c019061363b565b386107c9565b90915081906109f6565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610ad257602091610ac783928336918901016130b1565b8152019101906104a2565b8a80fd5b8880fd5b8580fd5b600080fd5b8380fd5b8280f35b9092919367ffffffffffffffff610b0b610b068785886133d1565b6132ff565b1695610b168761443e565b15610c54578684526007602052610b3260056040862001614245565b94845b8651811015610b6b576001908987526007602052610b6460056040892001610b5d838b613420565b5190614569565b5001610b35565b5093945094909580855260076020526005604086208681558660018201558660028201558660038201558660048201610ba48154613434565b80610c13575b5050500180549086815581610bf5575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a10191909493946103c9565b865260208620908101905b81811015610bba57868155600101610c00565b601f8111600114610c295750555b863880610baa565b81835260208320610c4491601f01861c81019060010161363b565b8082528160208120915555610c21565b602484887f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461028e5760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57610d82613063565b9060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36011261028e57604051610db981612f4a565b6024358015158103610f155781526044356fffffffffffffffffffffffffffffffff81168103610f155760208201526064356fffffffffffffffffffffffffffffffff81168103610f1557604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c360112610f115760405190610e4082612f4a565b6084358015158103610ae357825260a4356fffffffffffffffffffffffffffffffff81168103610ae357602083015260c4356fffffffffffffffffffffffffffffffff81168103610ae357604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610eef575b610ec357610ec09293613bc9565b80f35b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610eb2565b5080fd5b8280fd5b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57610f82610f7d6040610fdb9367ffffffffffffffff610f66613063565b610f6e613588565b501681526007602052206135b3565b613d06565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57604051906005548083528260208101600584526020842092845b81811061110f57505061103d92500383612f66565b815161106161104b82613351565b916110596040519384612f66565b808352613351565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b84518110156110c0578067ffffffffffffffff6110ad60019388613420565b51166110b98286613420565b520161108e565b50925090604051928392602084019060208552518091526040840192915b8181106110ec575050500390f35b825167ffffffffffffffff168452859450602093840193909201916001016110de565b8454835260019485019487945060209093019201611028565b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57611160613040565b611168613914565b73ffffffffffffffffffffffffffffffffffffffff811690811561120657600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000811690931790556040805173ffffffffffffffffffffffffffffffffffffffff93841681529190921660208201527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f168491819081015b0390a180f35b6004837f8579befe000000000000000000000000000000000000000000000000000000008152fd5b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57610fdb61127161126c613063565b613619565b604051918291602083526020830190612fe1565b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57610f82610f7d60026040610fdb9467ffffffffffffffff611326613063565b61132e613588565b50168152600760205220016135b3565b503461028e5767ffffffffffffffff61135636613170565b929091611361613914565b169161137a836000526006602052604060002054151590565b156114365782845260076020526113a96005604086200161139c36848661307a565b6020815191012090614569565b156113ee57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76916113e8604051928392602084526020840191613549565b0390a280f35b82611432836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613549565b0390fd5b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57604051600254808252602082018091600285526020852090855b81811061151857505050826114c1910383612f66565b604051928392602084019060208552518091526040840192915b8181106114e9575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016114db565b82548452602090930192600192830192016114ab565b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5767ffffffffffffffff61156f613063565b168152600760205261158660056040832001614245565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06115cb6115b583613351565b926115c36040519485612f66565b808452613351565b01835b8181106116a2575050825b825181101561161f57806115ef60019285613420565b518552600860205261160360408620613487565b61160d8285613420565b526116188184613420565b50016115d9565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061165757505050500390f35b91936020611692827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851612fe1565b9601920192018594939192611648565b8060606020809386010152016115ce565b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760043567ffffffffffffffff8111610f115760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610f11576060602060405161173181612f12565b828152015260848101611743816132de565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611c3d5750602481019077ffffffffffffffff000000000000000000000000000000006117aa836132ff565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611b5e578491611c0e575b50611be657611838604482016132de565b7f0000000000000000000000000000000000000000000000000000000000000000611b94575b5067ffffffffffffffff611871836132ff565b16611889816000526006602052604060002054151590565b15611b6957602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015611b5e578490611afb575b73ffffffffffffffffffffffffffffffffffffffff9150163303611acf578167ffffffffffffffff7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1061126c93611a9e9661199e6040606461194e611a2e9a6132ff565b940135958694169283815260076020522073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169586916147b9565b6040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018490527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a267ffffffffffffffff6119f8856132ff565b6040805173ffffffffffffffffffffffffffffffffffffffff9690961686523360208701528501929092521691606090a26132ff565b610fdb60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152611a6c604082612f66565b60405192611a7984612f12565b8352602083019081526040519384936020855251604060208601526060850190612fe1565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612fe1565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011611b56575b81611b1560209383612f66565b81010312610ae3575173ffffffffffffffffffffffffffffffffffffffff81168103610ae35773ffffffffffffffffffffffffffffffffffffffff906118ea565b3d9150611b08565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b73ffffffffffffffffffffffffffffffffffffffff168084526003602052604084205461185e577fd0d25976000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b611c30915060203d602011611c36575b611c288183612f66565b8101906138fc565b38611827565b503d611c1e565b8273ffffffffffffffffffffffffffffffffffffffff611c5e6024936132de565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b503461028e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760043567ffffffffffffffff8111610f1157611cd79036906004016130cf565b60243567ffffffffffffffff8111610ae357611cf79036906004016131f3565b60449291923567ffffffffffffffff8111610ada57611d1a9036906004016131f3565b91909273ffffffffffffffffffffffffffffffffffffffff6009541633141580611e09575b611ddd57818114801590611dd3575b611dab57865b818110611d5f578780f35b80611da5611d73610b06600194868c6133d1565b611d7e83878b613410565b611d9f611d97611d8f868b8d613410565b923690613241565b913690613241565b91613bc9565b01611d54565b6004877f568efce2000000000000000000000000000000000000000000000000000000008152fd5b5082811415611d4e565b6024877f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611d3f565b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e576020611ed767ffffffffffffffff611ec3613063565b166000526006602052604060002054151590565b6040519015158152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff611f51613040565b611f59613914565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a180f35b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57805473ffffffffffffffffffffffffffffffffffffffff8116330361204b577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e577f64187bd7b97e66658c91904f3021d7c28de967281d18b1a20742348afdd6a6b373ffffffffffffffffffffffffffffffffffffffff612133613040565b61213b613914565b611200600a54918381167fffffffffffffffffffffffff0000000000000000000000000000000000000000841617600a55604051938493168390929173ffffffffffffffffffffffffffffffffffffffff60209181604085019616845216910152565b503461028e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e576121d6613040565b602435906121e2613914565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82146122ce575b73ffffffffffffffffffffffffffffffffffffffff1690813b15610f15576040517f0a861f2a000000000000000000000000000000000000000000000000000000008152816004820152838160248183875af18015611b5e57612297575b5060207f6fa7abcf1345d1d478e5ea0da6b5f26a90eadb0546ef15ed3833944fbfd1db6291604051908152a280f35b836122c67f6fa7abcf1345d1d478e5ea0da6b5f26a90eadb0546ef15ed3833944fbfd1db629395602093612f66565b939150612268565b90506040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa80156123ac578390612366575b91905061220a565b506020813d6020116123a4575b8161238060209383612f66565b81010312610f155773ffffffffffffffffffffffffffffffffffffffff905161235e565b3d9150612373565b6040513d85823e3d90fd5b503461028e576123c636613170565b6123d293929193613914565b67ffffffffffffffff82166123f4816000526006602052604060002054151590565b156124105750610ec0929361240a91369161307a565b9061395f565b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b503461028e576124659061246d61245136613100565b959161245e939193613914565b3691613369565b933691613369565b7f00000000000000000000000000000000000000000000000000000000000000001561259057815b8351811015612508578073ffffffffffffffffffffffffffffffffffffffff6124c060019387613420565b51166124cb816142a8565b6124d7575b5001612495565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1386124d0565b5090805b825181101561258c578073ffffffffffffffffffffffffffffffffffffffff61253760019386613420565b5116801561258657612548816146aa565b612555575b505b0161250c565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a18461254d565b5061254f565b5080f35b6004827f35f4a7b3000000000000000000000000000000000000000000000000000000008152fd5b503461028e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e576125f0613063565b906024359067ffffffffffffffff821161028e576020611ed78461261736600487016130b1565b90613314565b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760043567ffffffffffffffff8111610f115780600401916101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261028e57806040516126f081612ec7565b5261271d61271361270e61270760c486018761328d565b369161307a565b6136fb565b60648401356137ef565b916084810161272b816132de565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611c3d5750602481019077ffffffffffffffff00000000000000000000000000000000612792836132ff565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611b5e578491612a89575b50611be65767ffffffffffffffff612826836132ff565b1661283e816000526006602052604060002054151590565b15611b6957602073ffffffffffffffffffffffffffffffffffffffff60045416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611b5e578491612a6a575b5015611acf576128b5826132ff565b6128ca60a4830191612617612707848a61328d565b15612a2357508394506128dc826132ff565b67ffffffffffffffff1692838152600760205260409020600201927f00000000000000000000000000000000000000000000000000000000000000009373ffffffffffffffffffffffffffffffffffffffff8516809661293b926147b9565b6040805173ffffffffffffffffffffffffffffffffffffffff87168152602081018890527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a26044019184612991846132de565b61299a92613694565b6129a3906132ff565b906129ad906132de565b60405192835233602084015273ffffffffffffffffffffffffffffffffffffffff16604083015282606083015267ffffffffffffffff169060807ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc091a280604051612a1781612ec7565b52604051908152602090f35b612a2d908661328d565b6114326040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613549565b612a83915060203d602011611c3657611c288183612f66565b386128a6565b612aa2915060203d602011611c3657611c288183612f66565b3861280f565b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602090612b3f613040565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461028e57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5750610fdb604051612c36604082612f66565b601a81527f4c6f636b52656c65617365546f6b656e506f6f6c20312e362e310000000000006020820152604051918291602083526020830190612fe1565b503461028e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261028e5760043573ffffffffffffffffffffffffffffffffffffffff600a5416330361037f577f00000000000000000000000000000000000000000000000000000000000000006040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff86165afa8015611b5e5783918591612da3575b5010612d7b5781612d53913390613694565b337fc2c3f06e49b9f15e7b4af9055e183b0d73362e033ad82a07dec9bf98401717198380a380f35b6004837fbb55fd27000000000000000000000000000000000000000000000000000000008152fd5b9150506020813d602011612dd0575b81612dbf60209383612f66565b81010312610ae35782905138612d41565b3d9150612db2565b905034610f115760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610f11576004357fffffffff000000000000000000000000000000000000000000000000000000008116809103610f1557602092507faff2afbf000000000000000000000000000000000000000000000000000000008114908115612e9d575b8115612e73575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438612e6c565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150612e65565b6020810190811067ffffffffffffffff821117612ee357604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117612ee357604052565b60a0810190811067ffffffffffffffff821117612ee357604052565b6060810190811067ffffffffffffffff821117612ee357604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117612ee357604052565b67ffffffffffffffff8111612ee357601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919082519283825260005b84811061302b5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612fec565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610ade57565b6004359067ffffffffffffffff82168203610ade57565b92919261308682612fa7565b916130946040519384612f66565b829481845281830111610ade578281602093846000960137010152565b9080601f83011215610ade578160206130cc9335910161307a565b90565b9181601f84011215610ade5782359167ffffffffffffffff8311610ade576020808501948460051b010111610ade57565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610ade5760043567ffffffffffffffff8111610ade5781613149916004016130cf565b929092916024359067ffffffffffffffff8211610ade5761316c916004016130cf565b9091565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610ade5760043567ffffffffffffffff81168103610ade579160243567ffffffffffffffff8111610ade5782602382011215610ade5780600401359267ffffffffffffffff8411610ade5760248483010111610ade576024019190565b9181601f84011215610ade5782359167ffffffffffffffff8311610ade5760208085019460608502010111610ade57565b35906fffffffffffffffffffffffffffffffff82168203610ade57565b9190826060910312610ade5760405161325981612f4a565b80928035908115158203610ade576040613288918193855261327d60208201613224565b602086015201613224565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610ade570180359067ffffffffffffffff8211610ade57602001918136038313610ade57565b3573ffffffffffffffffffffffffffffffffffffffff81168103610ade5790565b3567ffffffffffffffff81168103610ade5790565b9067ffffffffffffffff6130cc92166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff8111612ee35760051b60200190565b929161337482613351565b936133826040519586612f66565b602085848152019260051b8101918211610ade57915b8183106133a457505050565b823573ffffffffffffffffffffffffffffffffffffffff81168103610ade57815260209283019201613398565b91908110156133e15760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156133e1576060020190565b80518210156133e15760209160051b010190565b90600182811c9216801561347d575b602083101461344e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613443565b906040519182600082549261349b84613434565b808452936001811690811561350957506001146134c2575b506134c092500383612f66565b565b90506000929192526020600020906000915b8183106134ed5750509060206134c092820101386134b3565b60209193508060019154838589010152019101909184926134d4565b602093506134c09592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386134b3565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b6040519061359582612f2e565b60006080838281528260208201528260408201528260608201520152565b906040516135c081612f2e565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff1660005260076020526130cc6004604060002001613487565b818110613646575050565b6000815560010161363b565b8181029291811591840414171561366557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9290921660248301526044808301939093529181526134c0916136f6606483612f66565b613ed2565b8051801561376b5760200361372d578051602082810191830183900312610ade57519060ff821161372d575060ff1690565b611432906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190612fe1565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff821161366557565b60ff16604d811161366557600a0a90565b81156137c0570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146138f5578284116138cb579061383491613791565b91604d60ff8416118015613892575b61385c575050906138566130cc926137a5565b90613652565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b5061389c836137a5565b80156137c0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411613843565b6138d491613791565b91604d60ff84161161385c575050906138ef6130cc926137a5565b906137b6565b5050505090565b90816020910312610ade57518015158103610ade5790565b73ffffffffffffffffffffffffffffffffffffffff60015416330361393557565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115613b9f5767ffffffffffffffff81516020830120921691826000526007602052613994816005604060002001614764565b15613b5b5760005260086020526040600020815167ffffffffffffffff8111612ee3576139c18254613434565b601f8111613b29575b506020601f8211600114613a635791613a3d827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593613a5395600091613a58575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190612fe1565b0390a2565b905084015138613a0c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110613b11575092613a539492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610613ada575b5050811b019055611271565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880613ace565b9192602060018192868a015181550194019201613a93565b613b5590836000526020600020601f840160051c81019160208510610a0957601f0160051c019061363b565b386139ca565b50906114326040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190612fe1565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff166000818152600660205260409020549092919015613ccb5791613cc860e092613c9485613c207f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b97613d8b565b846000526007602052613c37816040600020614012565b613c4083613d8b565b846000526007602052613c5a836002604060002001614012565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9190820391821161366557565b613d0e613588565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691613d6b6020850193613d65613d5863ffffffff87511642613cf9565b8560808901511690613652565b9061469d565b80821015613d8457505b16825263ffffffff4216905290565b9050613d75565b805115613e2b576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff60208301511610613dc85750565b606490613e29604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408201511615801590613eb3575b613e525750565b606490613e29604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020820151161515613e4b565b73ffffffffffffffffffffffffffffffffffffffff613f61911691604092600080855193613f008786612f66565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602086015260208151910182855af13d1561400a573d91613f4583612fa7565b92613f5287519485612f66565b83523d6000602085013e614a00565b80519081613f6e57505050565b602080613f7f9383010191016138fc565b15613f875750565b608490517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b606091614a00565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c199161414b606092805461404f63ffffffff8260801c1642613cf9565b908161418a575b50506fffffffffffffffffffffffffffffffff600181602086015116928281541680851060001461418257508280855b16167fffffffffffffffffffffffffffffffff000000000000000000000000000000008254161781556140ff8651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b613cc860405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091614086565b6fffffffffffffffffffffffffffffffff916141bf8392836141b86001880154948286169560801c90613652565b911661469d565b8082101561423e57505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff00000000000000000000000000000000161781553880614056565b90506141c9565b906040519182815491828252602082019060005260206000209260005b8181106142775750506134c092500383612f66565b8454835260019485019487945060209093019201614262565b80548210156133e15760005260206000200190600090565b6000818152600360205260409020548015614437577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161366557600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613665578181036143c8575b5050506002548015614399577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01614356816002614290565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61441f6143d96143ea936002614290565b90549060031b1c9283926002614290565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055600052600360205260406000205538808061431d565b5050600090565b6000818152600660205260409020548015614437577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161366557600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116136655781810361452f575b5050506005548015614399577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016144ec816005614290565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b6145516145406143ea936005614290565b90549060031b1c9283926005614290565b905560005260066020526040600020553880806144b3565b9060018201918160005282602052604060002054801515600014614694577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613665578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116136655781810361465d575b50505080548015614399577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061461e8282614290565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61467d61466d6143ea9386614290565b90549060031b1c92839286614290565b9055600052836020526040600020553880806145e6565b50505050600090565b9190820180921161366557565b806000526003602052604060002054156000146147045760025468010000000000000000811015612ee3576146eb6143ea8260018594016002556002614290565b9055600254906000526003602052604060002055600190565b50600090565b806000526006602052604060002054156000146147045760055468010000000000000000811015612ee35761474b6143ea8260018594016005556005614290565b9055600554906000526006602052604060002055600190565b60008281526001820160205260409020546144375780549068010000000000000000821015612ee357826147a26143ea846001809601855584614290565b905580549260005201602052604060002055600190565b9182549060ff8260a01c161580156149f8575b6149f2576fffffffffffffffffffffffffffffffff8216916001850190815461481163ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613cf9565b9081614954575b505084811061490857508383106148725750506148476fffffffffffffffffffffffffffffffff928392613cf9565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c916148818185613cf9565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613665576148cf6148d49273ffffffffffffffffffffffffffffffffffffffff9661469d565b6137b6565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b8286929396116149c85761496f92613d659160801c90613652565b808410156149c35750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880614818565b61497a565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b5082156147cc565b91929015614a7b5750815115614a14575090565b3b15614a1d5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015614a8e5750805190602001fd5b611432906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190612fe156fea164736f6c634300081a000a" - -type LockReleaseTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewLockReleaseTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*LockReleaseTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(LockReleaseTokenPoolABI)) - if err != nil { - return nil, err - } - return &LockReleaseTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *LockReleaseTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *LockReleaseTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *LockReleaseTokenPoolContract) GetRebalancer(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRebalancer") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *LockReleaseTokenPoolContract) SetRebalancer(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRebalancer", args) -} - -func (c *LockReleaseTokenPoolContract) WithdrawLiquidity(opts *bind.TransactOpts, args *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawLiquidity", args) -} - -func (c *LockReleaseTokenPoolContract) GetToken(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getToken") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "lock-release-token-pool:deploy", - Version: Version, - Description: "Deploys the LockReleaseTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: LockReleaseTokenPoolABI, - Bin: LockReleaseTokenPoolBin, - }, + Name: "lock-release-token-pool:deploy", + Version: Version, + Description: "Deploys the LockReleaseTokenPool contract", + ContractMetadata: gobindings.LockReleaseTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(LockReleaseTokenPoolBin), + EVM: common.FromHex(gobindings.LockReleaseTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetRebalancer = contract.NewRead(contract.ReadParams[struct{}, common.Address, *LockReleaseTokenPoolContract]{ - Name: "lock-release-token-pool:get-rebalancer", - Version: Version, - Description: "Calls getRebalancer on the contract", - ContractType: ContractType, - NewContract: NewLockReleaseTokenPoolContract, - CallContract: func(c *LockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetRebalancer(opts) - }, -}) +func NewReadGetRebalancer(c gobindings.LockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.LockReleaseTokenPoolInterface]{ + Name: "lock-release-token-pool:get-rebalancer", + Version: Version, + Description: "Calls getRebalancer on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetRebalancer(opts) + }, + }) +} -var SetRebalancer = contract.NewWrite(contract.WriteParams[common.Address, *LockReleaseTokenPoolContract]{ - Name: "lock-release-token-pool:set-rebalancer", - Version: Version, - Description: "Calls setRebalancer on the contract", - ContractType: ContractType, - ContractABI: LockReleaseTokenPoolABI, - NewContract: NewLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*LockReleaseTokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *LockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetRebalancer(opts, args) - }, -}) +func NewWriteSetRebalancer(c gobindings.LockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.LockReleaseTokenPoolInterface]{ + Name: "lock-release-token-pool:set-rebalancer", + Version: Version, + Description: "Calls setRebalancer on the contract", + ContractType: ContractType, + ContractABI: gobindings.LockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetRebalancer(opts, args) + }, + }) +} -var WithdrawLiquidity = contract.NewWrite(contract.WriteParams[*big.Int, *LockReleaseTokenPoolContract]{ - Name: "lock-release-token-pool:withdraw-liquidity", - Version: Version, - Description: "Calls withdrawLiquidity on the contract", - ContractType: ContractType, - ContractABI: LockReleaseTokenPoolABI, - NewContract: NewLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*LockReleaseTokenPoolContract, *big.Int], - Validate: func(*big.Int) error { return nil }, - CallContract: func( - c *LockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args *big.Int, - ) (*types.Transaction, error) { - return c.WithdrawLiquidity(opts, args) - }, -}) +func NewWriteWithdrawLiquidity(c gobindings.LockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[*big.Int], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[*big.Int, gobindings.LockReleaseTokenPoolInterface]{ + Name: "lock-release-token-pool:withdraw-liquidity", + Version: Version, + Description: "Calls withdrawLiquidity on the contract", + ContractType: ContractType, + ContractABI: gobindings.LockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args *big.Int) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args *big.Int, + ) (*types.Transaction, error) { + return c.WithdrawLiquidity(opts, args) + }, + }) +} -var GetToken = contract.NewRead(contract.ReadParams[struct{}, common.Address, *LockReleaseTokenPoolContract]{ - Name: "lock-release-token-pool:get-token", - Version: Version, - Description: "Calls getToken on the contract", - ContractType: ContractType, - NewContract: NewLockReleaseTokenPoolContract, - CallContract: func(c *LockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetToken(opts) - }, -}) +func NewReadGetToken(c gobindings.LockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.LockReleaseTokenPoolInterface]{ + Name: "lock-release-token-pool:get-token", + Version: Version, + Description: "Calls getToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetToken(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go b/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go index 62af448966..df8e0b385f 100644 --- a/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go @@ -5,327 +5,223 @@ package siloed_lock_release_token_pool import ( "math/big" - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/siloed_lock_release_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "SiloedLockReleaseTokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const SiloedLockReleaseTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getAvailableTokens","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"lockedTokens","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getChainRebalancer","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRebalancer","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getUnsiloedLiquidity","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSiloed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"out","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"provideLiquidity","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"provideSiloedLiquidity","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRebalancer","inputs":[{"name":"newRebalancer","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setSiloRebalancer","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"newRebalancer","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateSiloDesignations","inputs":[{"name":"removes","type":"uint64[]","internalType":"uint64[]"},{"name":"adds","type":"tuple[]","internalType":"struct SiloedLockReleaseTokenPool.SiloConfigUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"rebalancer","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawLiquidity","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawSiloedLiquidity","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ChainSiloed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"rebalancer","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainUnsiloed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"amountUnsiloed","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LiquidityAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"provider","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LiquidityRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remover","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"SiloRebalancerSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"oldRebalancer","type":"address","indexed":false,"internalType":"address"},{"name":"newRebalancer","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"UnsiloedRebalancerSet","inputs":[{"name":"oldRebalancer","type":"address","indexed":false,"internalType":"address"},{"name":"newRebalancer","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotSiloed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InsufficientLiquidity","inputs":[{"name":"availableLiquidity","type":"uint256","internalType":"uint256"},{"name":"requestedAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidChainSelector","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"LiquidityAmountCannotBeZero","inputs":[]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const SiloedLockReleaseTokenPoolBin = "0x610100806040523461037757615684803803809161001d82856103f6565b833981019060a0818303126103775780516001600160a01b038116918282036103775761004c60208201610419565b60408201519092906001600160401b0381116103775782019480601f87011215610377578551956001600160401b0387116103e0578660051b906020820197610098604051998a6103f6565b885260208089019282010192831161037757602001905b8282106103c8575050506100d160806100ca60608501610427565b9301610427565b9333156103b757600180546001600160a01b03191633179055801580156103a6575b8015610395575b6103845760049260209260805260c0526040519283809263313ce56760e01b82525afa60009181610343575b50610318575b5060a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526101fa575b6040516150a890816105dc823960805181818161040c015281816110a0015281816118b101528181611aaa01528181612b0d01528181612cde015281816131110152818161316b01526132ac015260a051818181611b94015281816130ba01528181613d1b0152613d9e015260c051818181610e210152818161194c0152612ba9015260e051818181610dcf0152818161199001526128b50152f35b604051602061020981836103f6565b60008252600036813760e051156103075760005b8251811015610284576001906001600160a01b0361023b828661043b565b5116836102478261047d565b610254575b50500161021d565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1388361024c565b50905060005b82518110156102fe576001906001600160a01b036102a8828661043b565b511680156102f857836102ba8261057b565b6102c8575b50505b0161028a565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a138836102bf565b506102c2565b5050503861015e565b6335f4a7b360e01b60005260046000fd5b60ff1660ff821681810361032c575061012c565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161037c575b8161035f602093836103f6565b810103126103775761037090610419565b9038610126565b600080fd5b3d9150610352565b6342bcdf7f60e11b60005260046000fd5b506001600160a01b038316156100fa565b506001600160a01b038516156100f3565b639b15e16f60e01b60005260046000fd5b602080916103d584610427565b8152019101906100af565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176103e057604052565b519060ff8216820361037757565b51906001600160a01b038216820361037757565b805182101561044f5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561044f5760005260206000200190600090565b600081815260036020526040902054801561057457600019810181811161055e5760025460001981019190821161055e5781810361050d575b50505060025480156104f757600019016104d1816002610465565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61054661051e61052f936002610465565b90549060031b1c9283926002610465565b819391549060031b91821b91600019901b19161790565b905560005260036020526040600020553880806104b6565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146105d557600254680100000000000000008110156103e0576105bc61052f8260018594016002556002610465565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714613322575080630a861f2a146131ee578063181f5a771461318f57806321df0da71461313e578063240028e8146130de57806324f65ee7146130a05780632d4a148f14612f6d57806331238ffc14612f275780633907753714612a76578063432a6ba314612a425780634c5ef0ed146129fd57806354c8a4f31461288357806362ddd3c4146128005780636600f92c146126e45780636cfd15531461262a5780636d3d1a58146125f65780636d9d216c146121d357806379ba5097146121085780637d54534e1461207b5780638632d5cc1461203a5780638926f54f14611ff55780638da5cb5b14611fc1578063962d402014611e6b5780639a4575b914611849578063a42a7b8b146116db578063a7cd63b714611627578063acfecf9114611507578063af0e58b9146114e9578063af58d59f1461149f578063b0f479a11461146b578063b794658014611433578063c0d786551461134b578063c4bffe2b1461121b578063c75eea9c14611172578063ce3c752814610fbc578063cf7401f314610e45578063dc0bd97114610df4578063e0351e1314610db7578063e8a1da17146104d2578063eb521a4c146102ef578063f1e73399146102c45763f2fde38b146101ed57600080fd5b346102bf5760206003193601126102bf5773ffffffffffffffffffffffffffffffffffffffff61021b61356a565b610223613f27565b1633811461029557807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b600080fd5b346102bf5760206003193601126102bf5760206102e76102e261358d565b613c21565b604051908152f35b346102bf5760206003193601126102bf5760043580156104a85773ffffffffffffffffffffffffffffffffffffffff6103286000613957565b16330361047a5760008052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e9547f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e89060a01c60ff16156104655761039282825461393a565b90555b6040517f23b872dd000000000000000000000000000000000000000000000000000000006020820152336024820152306044820152606481018290526104309061040a81608481015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282613490565b7f00000000000000000000000000000000000000000000000000000000000000006144ae565b604051906000825260208201527f569a440e6842b5e5a7ac02286311855f5a0b81b9390909e552e82aaf02c9e9bf60403392a2005b5061047281600a5461393a565b600a55610395565b7f8e4a23d6000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fa90c0d190000000000000000000000000000000000000000000000000000000060005260046000fd5b346102bf576104e03661362a565b9190926104eb613f27565b6000905b828210610c0e5750505060009063ffffffff4216907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee184360301925b81811015610c0c576000918160051b86013585811215610c085786019061012082360312610c08576040519561056087613474565b823567ffffffffffffffff81168103610c04578752602083013567ffffffffffffffff8111610c045783019536601f88011215610c04578635966105a38861387b565b976105b1604051998a613490565b8089526020808a019160051b83010190368211610c005760208301905b828210610bcd575050505060208801968752604084013567ffffffffffffffff8111610bc95761060190369086016135db565b926040890193845261062b610619366060880161372f565b9560608b0196875260c036910161372f565b9660808a0197885261063d8651614367565b6106478851614367565b84515115610ba15761066367ffffffffffffffff8b5116614cd9565b15610b6a5767ffffffffffffffff8a511681526007602052604081206107a387516fffffffffffffffffffffffffffffffff6040820151169061075e6fffffffffffffffffffffffffffffffff602083015116915115158360806040516106c981613474565b858152602081018c905260408101849052606081018690520152855474ff000000000000000000000000000000000000000091151560a01b919091167fffffffffffffffffffffff0000000000000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff84161773ffffffff0000000000000000000000000000000060808b901b1617178555565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176001830155565b6108c989516fffffffffffffffffffffffffffffffff604082015116906108846fffffffffffffffffffffffffffffffff602083015116915115158360806040516107ed81613474565b858152602081018c9052604081018490526060810186905201526002860180547fffffffffffffffffffffff000000000000000000000000000000000000000000166fffffffffffffffffffffffffffffffff85161773ffffffff0000000000000000000000000000000060808c901b161791151560a01b74ff000000000000000000000000000000000000000016919091179055565b60809190911b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff91909116176003830155565b6004865191019080519067ffffffffffffffff8211610b3d576108ec83546139f0565b601f8111610b02575b50602090601f8311600114610a63576109439291859183610a58575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b8851805182101561097b579061097560019261096e8367ffffffffffffffff8f5116926139dc565b5190613f72565b01610946565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610a4967ffffffffffffffff6001979694985116925193519151610a156109e06040519687968752610100602088015261010087019061350b565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a10193919392909261052b565b015190508f80610911565b83855281852091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416865b818110610aea5750908460019594939210610ab3575b505050811b019055610946565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558e8080610aa6565b92936020600181928786015181550195019301610a90565b610b2d9084865260208620601f850160051c81019160208610610b33575b601f0160051c0190613bf7565b8e6108f5565b9091508190610b20565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60249067ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b807f8579befe0000000000000000000000000000000000000000000000000000000060049252fd5b8680fd5b813567ffffffffffffffff8111610bfc57602091610bf183928336918901016135db565b8152019101906105ce565b8a80fd5b8880fd5b8580fd5b8380fd5b005b909267ffffffffffffffff610c2f610c2a8686869997996138fb565b6137cc565b1692610c3a84614a1a565b15610d8957836000526007602052610c586005604060002001614821565b9260005b8451811015610c9457600190866000526007602052610c8d6005604060002001610c8683896139dc565b5190614b45565b5001610c5c565b5093909491959250806000526007602052600560406000206000815560006001820155600060028201556000600382015560048101610cd381546139f0565b9081610d46575b5050018054906000815581610d25575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020600193604051908152a10190919392936104ef565b6000526020600020908101905b81811015610cea5760008155600101610d32565b81601f60009311600114610d5e5750555b8880610cda565b81835260208320610d7991601f01861c810190600101613bf7565b8082528160208120915555610d57565b837f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346102bf5760006003193601126102bf5760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b346102bf5760006003193601126102bf57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102bf5760e06003193601126102bf57610e5e61358d565b60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc3601126102bf57604051610e948161343c565b60243580151581036102bf5781526044356fffffffffffffffffffffffffffffffff811681036102bf5760208201526064356fffffffffffffffffffffffffffffffff811681036102bf57604082015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c3601126102bf5760405190610f1b8261343c565b60843580151581036102bf57825260a4356fffffffffffffffffffffffffffffffff811681036102bf57602083015260c4356fffffffffffffffffffffffffffffffff811681036102bf57604083015273ffffffffffffffffffffffffffffffffffffffff6009541633141580610f9a575b61047a57610c0c926141b2565b5073ffffffffffffffffffffffffffffffffffffffff60015416331415610f8d565b346102bf5760406003193601126102bf57610fd561358d565b60243567ffffffffffffffff821680600052600c60205260ff60016040600020015460a01c1615801561116a575b61113d5781156104a85773ffffffffffffffffffffffffffffffffffffffff61102b84613957565b16330361047a57600052600c602052604060002060ff600182015460a01c16806000146111355781545b8084116111035750916110e9917f58fca2457646a9f47422ab9eb9bff90cef88cd8b8725ab52b1d17baa392d784e936000146110ee576110968282546137e1565b90555b6110c481337f0000000000000000000000000000000000000000000000000000000000000000613ec0565b6040519182913395836020909392919367ffffffffffffffff60408201951681520152565b0390a2005b506110fb81600a546137e1565b600a55611099565b83907fa17e11d50000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b600a54611055565b7f46f5f12b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b508015611003565b346102bf5760206003193601126102bf5767ffffffffffffffff61119461358d565b61119c613b44565b501660005260076020526112176111be6111b96040600020613b6f565b6142e2565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b0390f35b346102bf5760006003193601126102bf576040516005548082528160208101600560005260206000209260005b81811061133257505061125d92500382613490565b80519061128261126c8361387b565b9261127a6040519485613490565b80845261387b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe060208401920136833760005b81518110156112e2578067ffffffffffffffff6112cf600193856139dc565b51166112db82876139dc565b52016112b0565b5050906040519182916020830190602084525180915260408301919060005b81811061130f575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611301565b8454835260019485019486945060209093019201611248565b346102bf5760206003193601126102bf5761136461356a565b61136c613f27565b73ffffffffffffffffffffffffffffffffffffffff811690811561140957600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000811690931790556040805173ffffffffffffffffffffffffffffffffffffffff93841681529190921660208201527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f168491819081015b0390a1005b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b346102bf5760206003193601126102bf5761121761145761145261358d565b613bd5565b60405191829160208352602083019061350b565b346102bf5760006003193601126102bf57602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b346102bf5760206003193601126102bf5767ffffffffffffffff6114c161358d565b6114c9613b44565b501660005260076020526112176111be6111b96002604060002001613b6f565b346102bf5760006003193601126102bf576020600a54604051908152f35b346102bf5767ffffffffffffffff61151e3661367c565b929091611529613f27565b1690611542826000526006602052604060002054151590565b156115f95781600052600760205261157360056040600020016115663686856135a4565b6020815191012090614b45565b156115b2577f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691926110e9604051928392602084526020840191613b05565b6115f5906040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613b05565b0390fd5b507f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346102bf5760006003193601126102bf5760405160025490818152602081018092600260005260206000209060005b8181106116c5575050508161166c910382613490565b6040519182916020830190602084525180915260408301919060005b818110611696575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611688565b8254845260209093019260019283019201611656565b346102bf5760206003193601126102bf5767ffffffffffffffff6116fd61358d565b1660005260076020526117166005604060002001614821565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061175c6117468461387b565b936117546040519586613490565b80855261387b565b0160005b81811061183857505060005b81518110156117b45780611782600192846139dc565b5160005260086020526117986040600020613a43565b6117a282866139dc565b526117ad81856139dc565b500161176c565b826040518091602082016020835281518091526040830190602060408260051b8601019301916000905b8282106117ed57505050500390f35b91936020611828827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc06001959799849503018652885161350b565b96019201920185949391926117de565b806060602080938701015201611760565b346102bf5760206003193601126102bf5760043567ffffffffffffffff81116102bf5760a060031982360301126102bf576118826139c3565b5061188b6139c3565b50608481016118998161381d565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611e1f57506024810177ffffffffffffffff000000000000000000000000000000006118ff826137cc565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611d3757600091611df0575b50611dc65761198e6044830161381d565b7f0000000000000000000000000000000000000000000000000000000000000000611d70575b5067ffffffffffffffff6119c7826137cc565b166119df816000526006602052604060002054151590565b15611d4357602073ffffffffffffffffffffffffffffffffffffffff60045416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa908115611d3757600091611ccd575b5073ffffffffffffffffffffffffffffffffffffffff163303611c9f5761121781611c59936064611a7b67ffffffffffffffff956137cc565b91013593849116806000526007602052611ad2604060002073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016938491614d88565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018790527fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449190a27ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae108467ffffffffffffffff611b4e856137cc565b6040805173ffffffffffffffffffffffffffffffffffffffff9690961686523360208701528501929092521691606090a2611b8b611452826137cc565b926040519160ff7f000000000000000000000000000000000000000000000000000000000000000016602084015260208352611bc8604084613490565b60405194611bd586613458565b85526020850192835267ffffffffffffffff611bf0826137cc565b16600052600c60205260ff60016040600020015460a01c16600014611c8a57611c2167ffffffffffffffff916137cc565b16600052600c602052611c3a604060002091825461393a565b90555b604051938493602085525160406020860152606085019061350b565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301604085015261350b565b50611c9790600a5461393a565b600a55611c3d565b7f728fe07b000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6020813d602011611d2f575b81611ce660209383613490565b81010312611d2b57519073ffffffffffffffffffffffffffffffffffffffff82168203611d28575073ffffffffffffffffffffffffffffffffffffffff611a42565b80fd5b5080fd5b3d9150611cd9565b6040513d6000823e3d90fd5b7fa9902c7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff168060005260036020526040600020546119b4577fd0d259760000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7f53ad11d80000000000000000000000000000000000000000000000000000000060005260046000fd5b611e12915060203d602011611e18575b611e0a8183613490565b810190613ea8565b8361197d565b503d611e00565b611e3d73ffffffffffffffffffffffffffffffffffffffff9161381d565b7f961c9a4f000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b346102bf5760606003193601126102bf5760043567ffffffffffffffff81116102bf57611e9c9036906004016135f9565b9060243567ffffffffffffffff81116102bf57611ebd9036906004016136e1565b9060443567ffffffffffffffff81116102bf57611ede9036906004016136e1565b73ffffffffffffffffffffffffffffffffffffffff6009541633141580611f9f575b61047a57838614801590611f95575b611f6b5760005b868110611f1f57005b80611f65611f33610c2a6001948b8b6138fb565b611f3e8389896139b3565b611f5f611f57611f4f86898b6139b3565b92369061372f565b91369061372f565b916141b2565b01611f16565b7f568efce20000000000000000000000000000000000000000000000000000000060005260046000fd5b5080861415611f0f565b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611f00565b346102bf5760006003193601126102bf57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102bf5760206003193601126102bf57602061203067ffffffffffffffff61201c61358d565b166000526006602052604060002054151590565b6040519015158152f35b346102bf5760206003193601126102bf57602061205d61205861358d565b613957565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b346102bf5760206003193601126102bf577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff6120cc61356a565b6120d4613f27565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a1005b346102bf5760006003193601126102bf5760005473ffffffffffffffffffffffffffffffffffffffff811633036121a9577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346102bf5760406003193601126102bf5760043567ffffffffffffffff81116102bf576122049036906004016135f9565b6024359167ffffffffffffffff83116102bf57366023840112156102bf5782600401359167ffffffffffffffff83116102bf576024840193602436918560061b0101116102bf57612253613f27565b60005b8181106124c85750505060005b81811061226c57005b67ffffffffffffffff612283610c2a838587613947565b16158015612493575b8015612472575b61242d5773ffffffffffffffffffffffffffffffffffffffff6122c260206122bc848688613947565b0161381d565b161561140957806123b56122de60206122bc6001958789613947565b8573ffffffffffffffffffffffffffffffffffffffff80866040516123028161343c565b6000815282602082019616865267ffffffffffffffff61232d610c2a8a8d6040860199878b52613947565b16600052600c60205260406000209051815501935116167fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782555115157fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b7f180c6940bd64ba8f75679203ca32f8be2f629477a3307b190656e4b14dd5ddeb6123e4610c2a838688613947565b6123f460206122bc85888a613947565b6040805167ffffffffffffffff93909316835273ffffffffffffffffffffffffffffffffffffffff91909116602083015290a101612263565b610c2a906124449267ffffffffffffffff94613947565b7fd9a9cd68000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b5061248d67ffffffffffffffff61201c610c2a848688613947565b15612293565b5067ffffffffffffffff6124ab610c2a838587613947565b16600052600c60205260ff60016040600020015460a01c1661228c565b67ffffffffffffffff6124df610c2a8385876138fb565b16600052600c60205260ff60016040600020015460a01c16156125b1578067ffffffffffffffff612516610c2a60019486886138fb565b16600052600c6020527f7b5efb3f8090c5cfd24e170b667d0e2b6fdc3db6540d75b86d5b6655ba00eb9360406000205461255281600a5461393a565b600a5567ffffffffffffffff61256c610c2a85888a6138fb565b16600052600c60205260008460408220828155015561258f610c2a8487896138fb565b6040805167ffffffffffffffff9290921682526020820192909252a101612256565b610c2a906125c89267ffffffffffffffff946138fb565b7f46f5f12b000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b346102bf5760006003193601126102bf57602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b346102bf5760206003193601126102bf577f66b1c1bdec8b60a3442bb25b5b6cd6fff3d0eceb6f5390be8e2f82a8ad39b23473ffffffffffffffffffffffffffffffffffffffff61267961356a565b612681613f27565b611404600b54918381167fffffffffffffffffffffffff0000000000000000000000000000000000000000841617600b55604051938493168390929173ffffffffffffffffffffffffffffffffffffffff60209181604085019616845216910152565b346102bf5760406003193601126102bf576126fd61358d565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036102bf5767ffffffffffffffff90612730613f27565b169081600052600c602052600160406000200190815460ff8160a01c16156127d25782547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9283169081179093556040805191909216815260208101929092527f01efd4cd7dd64263689551000d4359d6559c839f39b773b1df3fd19ff060cf5f9190819081016110e9565b837f46f5f12b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346102bf5761280e3661367c565b612819929192613f27565b67ffffffffffffffff821661283b816000526006602052604060002054151590565b156128565750610c0c926128509136916135a4565b90613f72565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346102bf576128ab6128b36128973661362a565b94916128a4939193613f27565b3691613893565b923691613893565b7f0000000000000000000000000000000000000000000000000000000000000000156129d35760005b825181101561294f578073ffffffffffffffffffffffffffffffffffffffff612907600193866139dc565b511661291281614884565b61291e575b50016128dc565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a184612917565b5060005b8151811015610c0c578073ffffffffffffffffffffffffffffffffffffffff61297e600193856139dc565b511680156129cd5761298f81614c79565b61299c575b505b01612953565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a183612994565b50612996565b7f35f4a7b30000000000000000000000000000000000000000000000000000000060005260046000fd5b346102bf5760406003193601126102bf57612a1661358d565b60243567ffffffffffffffff81116102bf57602091612a3c6120309236906004016135db565b9061383e565b346102bf5760006003193601126102bf57602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b346102bf5760206003193601126102bf5760043567ffffffffffffffff81116102bf578060040161010060031983360301126102bf576000604051612aba816133f1565b52612ae7612add612ad8612ad160c486018561377b565b36916135a4565b613ca8565b6064840135613d9b565b9060848301612af58161381d565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603611e1f5750602483019077ffffffffffffffff00000000000000000000000000000000612b5c836137cc565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611d3757600091612f08575b50611dc657612be8826137cc565b67ffffffffffffffff8116612c0a816000526006602052604060002054151590565b15611d435750600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff93909316918301919091523360248301526020908290604490829073ffffffffffffffffffffffffffffffffffffffff165afa908115611d3757600091612ee9575b5015611c9f57612c94826137cc565b90612caa60a4860192612a3c612ad1858561377b565b15612ea25750508067ffffffffffffffff612cc584936137cc565b1693846000526007602052600260406000200194612d1d7f00000000000000000000000000000000000000000000000000000000000000009673ffffffffffffffffffffffffffffffffffffffff8816958691614d88565b6040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018790527f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9190a267ffffffffffffffff612d77836137cc565b16600052600c602052604060002060ff600182015460a01c1680600014612e9a5781545b808711612e6857509573ffffffffffffffffffffffffffffffffffffffff612e23612e1d7ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc096610c2a8a604460809967ffffffffffffffff9960209f600014612e5357612e098482546137e1565b90555b0196612e178861381d565b90613ec0565b9261381d565b60405196875233898801521660408601528560608601521692a280604051612e4a816133f1565b52604051908152f35b50612e6083600a546137e1565b600a55612e0c565b86907fa17e11d50000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b600a54612d9b565b612eac925061377b565b6115f56040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613b05565b612f02915060203d602011611e1857611e0a8183613490565b85612c85565b612f21915060203d602011611e1857611e0a8183613490565b85612bda565b346102bf5760206003193601126102bf5767ffffffffffffffff612f4961358d565b16600052600c602052602060ff60016040600020015460a01c166040519015158152f35b346102bf5760406003193601126102bf57612f8661358d565b60243567ffffffffffffffff821680600052600c60205260ff60016040600020015460a01c16158015613098575b61113d5781156104a85773ffffffffffffffffffffffffffffffffffffffff612fdc84613957565b16330361047a577f569a440e6842b5e5a7ac02286311855f5a0b81b9390909e552e82aaf02c9e9bf916110e991600052600c602052604060002060ff600182015460a01c166000146130835761303382825461393a565b90555b6040517f23b872dd000000000000000000000000000000000000000000000000000000006020820152336024820152306044820152606481018290526110c49061040a81608481016103de565b5061309081600a5461393a565b600a55613036565b508015612fb4565b346102bf5760006003193601126102bf57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102bf5760206003193601126102bf5760206130f961356a565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b346102bf5760006003193601126102bf57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102bf5760006003193601126102bf5761121760408051906131b28183613490565b602082527f53696c6f65644c6f636b52656c65617365546f6b656e506f6f6c20312e362e3160208301525191829160208352602083019061350b565b346102bf5760206003193601126102bf5760043580156104a85773ffffffffffffffffffffffffffffffffffffffff6132276000613957565b16330361047a5760008052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e9547f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e89060a01c60ff16801561331a5781545b808411611103575015613305576132a28282546137e1565b90555b6132d081337f0000000000000000000000000000000000000000000000000000000000000000613ec0565b604051906000825260208201527f58fca2457646a9f47422ab9eb9bff90cef88cd8b8725ab52b1d17baa392d784e60403392a2005b5061331281600a546137e1565b600a556132a5565b600a5461328a565b346102bf5760206003193601126102bf57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036102bf57817faff2afbf00000000000000000000000000000000000000000000000000000000602093149081156133c7575b811561339d575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613396565b7f0e64dd29000000000000000000000000000000000000000000000000000000008114915061338f565b6020810190811067ffffffffffffffff82111761340d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff82111761340d57604052565b6040810190811067ffffffffffffffff82111761340d57604052565b60a0810190811067ffffffffffffffff82111761340d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761340d57604052565b67ffffffffffffffff811161340d57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919082519283825260005b8481106135555750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613516565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102bf57565b6004359067ffffffffffffffff821682036102bf57565b9291926135b0826134d1565b916135be6040519384613490565b8294818452818301116102bf578281602093846000960137010152565b9080601f830112156102bf578160206135f6933591016135a4565b90565b9181601f840112156102bf5782359167ffffffffffffffff83116102bf576020808501948460051b0101116102bf57565b60406003198201126102bf5760043567ffffffffffffffff81116102bf5781613655916004016135f9565b929092916024359067ffffffffffffffff82116102bf57613678916004016135f9565b9091565b60406003198201126102bf5760043567ffffffffffffffff811681036102bf579160243567ffffffffffffffff81116102bf57826023820112156102bf5780600401359267ffffffffffffffff84116102bf57602484830101116102bf576024019190565b9181601f840112156102bf5782359167ffffffffffffffff83116102bf57602080850194606085020101116102bf57565b35906fffffffffffffffffffffffffffffffff821682036102bf57565b91908260609103126102bf576040516137478161343c565b809280359081151582036102bf576040613776918193855261376b60208201613712565b602086015201613712565b910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102bf570180359067ffffffffffffffff82116102bf576020019181360383136102bf57565b3567ffffffffffffffff811681036102bf5790565b919082039182116137ee57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036102bf5790565b9067ffffffffffffffff6135f692166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b67ffffffffffffffff811161340d5760051b60200190565b929161389e8261387b565b936138ac6040519586613490565b602085848152019260051b81019182116102bf57915b8183106138ce57505050565b823573ffffffffffffffffffffffffffffffffffffffff811681036102bf578152602092830192016138c2565b919081101561390b5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919082018092116137ee57565b919081101561390b5760061b0190565b67ffffffffffffffff16600052600c60205260016040600020015460ff8160a01c1661399a575073ffffffffffffffffffffffffffffffffffffffff600b541690565b73ffffffffffffffffffffffffffffffffffffffff1690565b919081101561390b576060020190565b604051906139d082613458565b60606020838281520152565b805182101561390b5760209160051b010190565b90600182811c92168015613a39575b6020831014613a0a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f16916139ff565b9060405191826000825492613a57846139f0565b8084529360018116908115613ac55750600114613a7e575b50613a7c92500383613490565b565b90506000929192526020600020906000915b818310613aa9575050906020613a7c9282010138613a6f565b6020919350806001915483858901015201910190918492613a90565b60209350613a7c9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138613a6f565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b60405190613b5182613474565b60006080838281528260208201528260408201528260608201520152565b90604051613b7c81613474565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff1660005260076020526135f66004604060002001613a43565b818110613c02575050565b60008155600101613bf7565b818102929181159184041417156137ee57565b67ffffffffffffffff16613c42816000526006602052604060002054151590565b15613c7b5780600052600c60205260ff60016040600020015460a01c16613c6a5750600a5490565b600052600c60205260406000205490565b7fd9a9cd680000000000000000000000000000000000000000000000000000000060005260045260246000fd5b80518015613d1757602003613cd9576020818051810103126102bf5760208101519060ff8211613cd9575060ff1690565b6115f5906040519182917f953576f700000000000000000000000000000000000000000000000000000000835260206004840152602483019061350b565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff82116137ee57565b60ff16604d81116137ee57600a0a90565b8115613d6c570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414613ea157828411613e775790613de091613d3d565b91604d60ff8416118015613e3e575b613e0857505090613e026135f692613d51565b90613c0e565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50613e4883613d51565b8015613d6c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411613def565b613e8091613d3d565b91604d60ff841611613e0857505090613e9b6135f692613d51565b90613d62565b5050505090565b908160209103126102bf575180151581036102bf5790565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff929092166024830152604480830193909352918152613a7c91613f22606483613490565b6144ae565b73ffffffffffffffffffffffffffffffffffffffff600154163303613f4857565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b908051156114095767ffffffffffffffff81516020830120921691826000526007602052613fa7816005604060002001614d33565b1561416e5760005260086020526040600020815167ffffffffffffffff811161340d57613fd482546139f0565b601f811161413c575b506020601f82116001146140765791614050827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea95936140669560009161406b575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b905560405191829160208352602083019061350b565b0390a2565b90508401513861401f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106141245750926140669492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9896106140ed575b5050811b019055611457565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c1916905538806140e1565b9192602060018192868a0151815501940192016140a6565b61416890836000526020600020601f840160051c81019160208510610b3357601f0160051c0190613bf7565b38613fdd565b50906115f56040519283927f393b8ad2000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061350b565b67ffffffffffffffff1660008181526006602052604090205490929190156142b457916142b160e09261427d856142097f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b97614367565b8460005260076020526142208160406000206145ee565b61422983614367565b8460005260076020526142438360026040600020016145ee565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6142ea613b44565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614347602085019361434161433463ffffffff875116426137e1565b8560808901511690613c0e565b9061393a565b8082101561436057505b16825263ffffffff4216905290565b9050614351565b805115614407576fffffffffffffffffffffffffffffffff6040820151166fffffffffffffffffffffffffffffffff602083015116106143a45750565b606490614405604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff6040820151161580159061448f575b61442e5750565b606490614405604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020820151161515614427565b73ffffffffffffffffffffffffffffffffffffffff61453d9116916040926000808551936144dc8786613490565b602085527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564602086015260208151910182855af13d156145e6573d91614521836134d1565b9261452e87519485613490565b83523d6000602085013e614fcf565b8051908161454a57505050565b60208061455b938301019101613ea8565b156145635750565b608490517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b606091614fcf565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991614727606092805461462b63ffffffff8260801c16426137e1565b9081614766575b50506fffffffffffffffffffffffffffffffff600181602086015116928281541680851060001461475e57508280855b16167fffffffffffffffffffffffffffffffff000000000000000000000000000000008254161781556146db8651151582907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b60408601517fffffffffffffffffffffffffffffffff0000000000000000000000000000000060809190911b16939092166fffffffffffffffffffffffffffffffff1692909217910155565b6142b160405180926fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b838091614662565b6fffffffffffffffffffffffffffffffff9161479b8392836147946001880154948286169560801c90613c0e565b911661393a565b8082101561481a57505b83547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff9290911692909216167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116174260801b73ffffffff00000000000000000000000000000000161781553880614632565b90506147a5565b906040519182815491828252602082019060005260206000209260005b818110614853575050613a7c92500383613490565b845483526001948501948794506020909301920161483e565b805482101561390b5760005260206000200190600090565b6000818152600360205260409020548015614a13577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116137ee57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116137ee578181036149a4575b5050506002548015614975577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161493281600261486c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6149fb6149b56149c693600261486c565b90549060031b1c928392600261486c565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005260036020526040600020553880806148f9565b5050600090565b6000818152600660205260409020548015614a13577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116137ee57600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116137ee57818103614b0b575b5050506005548015614975577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01614ac881600561486c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b614b2d614b1c6149c693600561486c565b90549060031b1c928392600561486c565b90556000526006602052604060002055388080614a8f565b9060018201918160005282602052604060002054801515600014614c70577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116137ee578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116137ee57818103614c39575b50505080548015614975577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190614bfa828261486c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b614c59614c496149c6938661486c565b90549060031b1c9283928661486c565b905560005283602052604060002055388080614bc2565b50505050600090565b80600052600360205260406000205415600014614cd3576002546801000000000000000081101561340d57614cba6149c6826001859401600255600261486c565b9055600254906000526003602052604060002055600190565b50600090565b80600052600660205260406000205415600014614cd3576005546801000000000000000081101561340d57614d1a6149c6826001859401600555600561486c565b9055600554906000526006602052604060002055600190565b6000828152600182016020526040902054614a13578054906801000000000000000082101561340d5782614d716149c684600180960185558461486c565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015614fc7575b614fc1576fffffffffffffffffffffffffffffffff82169160018501908154614de063ffffffff6fffffffffffffffffffffffffffffffff83169360801c16426137e1565b9081614f23575b5050848110614ed75750838310614e41575050614e166fffffffffffffffffffffffffffffffff9283926137e1565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b5460801c91614e5081856137e1565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116137ee57614e9e614ea39273ffffffffffffffffffffffffffffffffffffffff9661393a565b613d62565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611614f9757614f3e926143419160801c90613c0e565b80841015614f925750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880614de7565b614f49565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b508215614d9b565b9192901561504a5750815115614fe3575090565b3b15614fec5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561505d5750805190602001fd5b6115f5906040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260206004840152602483019061350b56fea164736f6c634300081a000a" - -type SiloedLockReleaseTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewSiloedLockReleaseTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*SiloedLockReleaseTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(SiloedLockReleaseTokenPoolABI)) - if err != nil { - return nil, err - } - return &SiloedLockReleaseTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *SiloedLockReleaseTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *SiloedLockReleaseTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetRebalancer(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRebalancer") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetChainRebalancer(opts *bind.CallOpts, args uint64) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getChainRebalancer", args) - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedChains") - if err != nil { - var zero []uint64 - return zero, err - } - return *abi.ConvertType(out[0], new([]uint64)).(*[]uint64), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) IsSiloed(opts *bind.CallOpts, args uint64) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isSiloed", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetAvailableTokens(opts *bind.CallOpts, args uint64) (*big.Int, error) { - var out []any - err := c.contract.Call(opts, &out, "getAvailableTokens", args) - if err != nil { - var zero *big.Int - return zero, err - } - return *abi.ConvertType(out[0], new(*big.Int)).(**big.Int), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetUnsiloedLiquidity(opts *bind.CallOpts) (*big.Int, error) { - var out []any - err := c.contract.Call(opts, &out, "getUnsiloedLiquidity") - if err != nil { - var zero *big.Int - return zero, err - } - return *abi.ConvertType(out[0], new(*big.Int)).(**big.Int), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) SetRebalancer(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRebalancer", args) -} - -func (c *SiloedLockReleaseTokenPoolContract) SetSiloRebalancer(opts *bind.TransactOpts, remoteChainSelector uint64, newRebalancer common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setSiloRebalancer", remoteChainSelector, newRebalancer) -} - -func (c *SiloedLockReleaseTokenPoolContract) WithdrawLiquidity(opts *bind.TransactOpts, args *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawLiquidity", args) -} - -func (c *SiloedLockReleaseTokenPoolContract) WithdrawSiloedLiquidity(opts *bind.TransactOpts, remoteChainSelector uint64, amount *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawSiloedLiquidity", remoteChainSelector, amount) -} - -func (c *SiloedLockReleaseTokenPoolContract) GetToken(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getToken") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type SetSiloRebalancerArgs struct { - RemoteChainSelector uint64 - NewRebalancer common.Address + RemoteChainSelector uint64 `json:"remoteChainSelector"` + NewRebalancer common.Address `json:"newRebalancer"` } type WithdrawSiloedLiquidityArgs struct { - RemoteChainSelector uint64 - Amount *big.Int + RemoteChainSelector uint64 `json:"remoteChainSelector"` + Amount *big.Int `json:"amount"` } type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "siloed-lock-release-token-pool:deploy", - Version: Version, - Description: "Deploys the SiloedLockReleaseTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: SiloedLockReleaseTokenPoolABI, - Bin: SiloedLockReleaseTokenPoolBin, - }, + Name: "siloed-lock-release-token-pool:deploy", + Version: Version, + Description: "Deploys the SiloedLockReleaseTokenPool contract", + ContractMetadata: gobindings.SiloedLockReleaseTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(SiloedLockReleaseTokenPoolBin), + EVM: common.FromHex(gobindings.SiloedLockReleaseTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var GetRebalancer = contract.NewRead(contract.ReadParams[struct{}, common.Address, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-rebalancer", - Version: Version, - Description: "Calls getRebalancer on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetRebalancer(opts) - }, -}) - -var GetChainRebalancer = contract.NewRead(contract.ReadParams[uint64, common.Address, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-chain-rebalancer", - Version: Version, - Description: "Calls getChainRebalancer on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args uint64) (common.Address, error) { - return c.GetChainRebalancer(opts, args) - }, -}) - -var GetSupportedChains = contract.NewRead(contract.ReadParams[struct{}, []uint64, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-supported-chains", - Version: Version, - Description: "Calls getSupportedChains on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) ([]uint64, error) { - return c.GetSupportedChains(opts) - }, -}) - -var IsSiloed = contract.NewRead(contract.ReadParams[uint64, bool, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:is-siloed", - Version: Version, - Description: "Calls isSiloed on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args uint64) (bool, error) { - return c.IsSiloed(opts, args) - }, -}) - -var GetAvailableTokens = contract.NewRead(contract.ReadParams[uint64, *big.Int, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-available-tokens", - Version: Version, - Description: "Calls getAvailableTokens on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args uint64) (*big.Int, error) { - return c.GetAvailableTokens(opts, args) - }, -}) - -var GetUnsiloedLiquidity = contract.NewRead(contract.ReadParams[struct{}, *big.Int, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-unsiloed-liquidity", - Version: Version, - Description: "Calls getUnsiloedLiquidity on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (*big.Int, error) { - return c.GetUnsiloedLiquidity(opts) - }, }) -var SetRebalancer = contract.NewWrite(contract.WriteParams[common.Address, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:set-rebalancer", - Version: Version, - Description: "Calls setRebalancer on the contract", - ContractType: ContractType, - ContractABI: SiloedLockReleaseTokenPoolABI, - NewContract: NewSiloedLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedLockReleaseTokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *SiloedLockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetRebalancer(opts, args) - }, -}) - -var SetSiloRebalancer = contract.NewWrite(contract.WriteParams[SetSiloRebalancerArgs, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:set-silo-rebalancer", - Version: Version, - Description: "Calls setSiloRebalancer on the contract", - ContractType: ContractType, - ContractABI: SiloedLockReleaseTokenPoolABI, - NewContract: NewSiloedLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedLockReleaseTokenPoolContract, SetSiloRebalancerArgs], - Validate: func(SetSiloRebalancerArgs) error { return nil }, - CallContract: func( - c *SiloedLockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args SetSiloRebalancerArgs, - ) (*types.Transaction, error) { - return c.SetSiloRebalancer(opts, args.RemoteChainSelector, args.NewRebalancer) - }, -}) - -var WithdrawLiquidity = contract.NewWrite(contract.WriteParams[*big.Int, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:withdraw-liquidity", - Version: Version, - Description: "Calls withdrawLiquidity on the contract", - ContractType: ContractType, - ContractABI: SiloedLockReleaseTokenPoolABI, - NewContract: NewSiloedLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedLockReleaseTokenPoolContract, *big.Int], - Validate: func(*big.Int) error { return nil }, - CallContract: func( - c *SiloedLockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args *big.Int, - ) (*types.Transaction, error) { - return c.WithdrawLiquidity(opts, args) - }, -}) - -var WithdrawSiloedLiquidity = contract.NewWrite(contract.WriteParams[WithdrawSiloedLiquidityArgs, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:withdraw-siloed-liquidity", - Version: Version, - Description: "Calls withdrawSiloedLiquidity on the contract", - ContractType: ContractType, - ContractABI: SiloedLockReleaseTokenPoolABI, - NewContract: NewSiloedLockReleaseTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedLockReleaseTokenPoolContract, WithdrawSiloedLiquidityArgs], - Validate: func(WithdrawSiloedLiquidityArgs) error { return nil }, - CallContract: func( - c *SiloedLockReleaseTokenPoolContract, - opts *bind.TransactOpts, - args WithdrawSiloedLiquidityArgs, - ) (*types.Transaction, error) { - return c.WithdrawSiloedLiquidity(opts, args.RemoteChainSelector, args.Amount) - }, -}) - -var GetToken = contract.NewRead(contract.ReadParams[struct{}, common.Address, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-token", - Version: Version, - Description: "Calls getToken on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetToken(opts) - }, -}) +func NewReadGetRebalancer(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-rebalancer", + Version: Version, + Description: "Calls getRebalancer on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetRebalancer(opts) + }, + }) +} + +func NewReadGetChainRebalancer(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, common.Address, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-chain-rebalancer", + Version: Version, + Description: "Calls getChainRebalancer on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args uint64) (common.Address, error) { + return c.GetChainRebalancer(opts, args) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} + +func NewReadIsSiloed(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, bool, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:is-siloed", + Version: Version, + Description: "Calls isSiloed on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args uint64) (bool, error) { + return c.IsSiloed(opts, args) + }, + }) +} + +func NewReadGetAvailableTokens(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], *big.Int, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, *big.Int, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-available-tokens", + Version: Version, + Description: "Calls getAvailableTokens on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args uint64) (*big.Int, error) { + return c.GetAvailableTokens(opts, args) + }, + }) +} + +func NewReadGetUnsiloedLiquidity(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], *big.Int, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, *big.Int, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-unsiloed-liquidity", + Version: Version, + Description: "Calls getUnsiloedLiquidity on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (*big.Int, error) { + return c.GetUnsiloedLiquidity(opts) + }, + }) +} + +func NewWriteSetRebalancer(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:set-rebalancer", + Version: Version, + Description: "Calls setRebalancer on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedLockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedLockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetRebalancer(opts, args) + }, + }) +} + +func NewWriteSetSiloRebalancer(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[SetSiloRebalancerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetSiloRebalancerArgs, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:set-silo-rebalancer", + Version: Version, + Description: "Calls setSiloRebalancer on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedLockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args SetSiloRebalancerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedLockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args SetSiloRebalancerArgs, + ) (*types.Transaction, error) { + return c.SetSiloRebalancer(opts, args.RemoteChainSelector, args.NewRebalancer) + }, + }) +} + +func NewWriteWithdrawLiquidity(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[*big.Int], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[*big.Int, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:withdraw-liquidity", + Version: Version, + Description: "Calls withdrawLiquidity on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedLockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args *big.Int) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedLockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args *big.Int, + ) (*types.Transaction, error) { + return c.WithdrawLiquidity(opts, args) + }, + }) +} + +func NewWriteWithdrawSiloedLiquidity(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[WithdrawSiloedLiquidityArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[WithdrawSiloedLiquidityArgs, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:withdraw-siloed-liquidity", + Version: Version, + Description: "Calls withdrawSiloedLiquidity on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedLockReleaseTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args WithdrawSiloedLiquidityArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedLockReleaseTokenPoolInterface, + opts *bind.TransactOpts, + args WithdrawSiloedLiquidityArgs, + ) (*types.Transaction, error) { + return c.WithdrawSiloedLiquidity(opts, args.RemoteChainSelector, args.Amount) + }, + }) +} + +func NewReadGetToken(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-token", + Version: Version, + Description: "Calls getToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetToken(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_1/operations/token_pool/token_pool.go b/chains/evm/deployment/v1_6_1/operations/token_pool/token_pool.go index 4abf0c45a9..a27496ab5b 100644 --- a/chains/evm/deployment/v1_6_1/operations/token_pool/token_pool.go +++ b/chains/evm/deployment/v1_6_1/operations/token_pool/token_pool.go @@ -3,563 +3,395 @@ package token_pool import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "TokenPool" var Version = semver.MustParse("1.6.1") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const TokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` - -type TokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*TokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(TokenPoolABI)) - if err != nil { - return nil, err - } - return &TokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *TokenPoolContract) Address() common.Address { - return c.address -} - -func (c *TokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []ChainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) -} - -func (c *TokenPoolContract) SetRateLimitAdmin(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRateLimitAdmin", args) -} - -func (c *TokenPoolContract) GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRateLimitAdmin") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) TransferOwnership(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "transferOwnership", args) -} - -func (c *TokenPoolContract) SetChainRateLimiterConfigs(opts *bind.TransactOpts, remoteChainSelectors []uint64, outboundConfigs []Config, inboundConfigs []Config) (*types.Transaction, error) { - return c.contract.Transact(opts, "setChainRateLimiterConfigs", remoteChainSelectors, outboundConfigs, inboundConfigs) -} - -func (c *TokenPoolContract) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig Config, inboundConfig Config) (*types.Transaction, error) { - return c.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) -} - -func (c *TokenPoolContract) GetToken(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getToken") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenDecimals") - if err != nil { - var zero uint8 - return zero, err - } - return *abi.ConvertType(out[0], new(uint8)).(*uint8), nil -} - -func (c *TokenPoolContract) IsSupportedToken(opts *bind.CallOpts, args common.Address) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isSupportedToken", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *TokenPoolContract) GetAllowListEnabled(opts *bind.CallOpts) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowListEnabled") - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *TokenPoolContract) GetAllowList(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowList") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *TokenPoolContract) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowListUpdates", removes, adds) -} - -func (c *TokenPoolContract) GetRouter(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRouter") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) SetRouter(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRouter", args) -} - -func (c *TokenPoolContract) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedChains") - if err != nil { - var zero []uint64 - return zero, err - } - return *abi.ConvertType(out[0], new([]uint64)).(*[]uint64), nil -} - -func (c *TokenPoolContract) GetRemoteToken(opts *bind.CallOpts, args uint64) ([]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteToken", args) - if err != nil { - var zero []byte - return zero, err - } - return *abi.ConvertType(out[0], new([]byte)).(*[]byte), nil -} - -func (c *TokenPoolContract) GetRemotePools(opts *bind.CallOpts, args uint64) ([][]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemotePools", args) - if err != nil { - var zero [][]byte - return zero, err - } - return *abi.ConvertType(out[0], new([][]byte)).(*[][]byte), nil -} - -func (c *TokenPoolContract) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *TokenPoolContract) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *TokenPoolContract) GetCurrentInboundRateLimiterState(opts *bind.CallOpts, args uint64) (TokenBucket, error) { - var out []any - err := c.contract.Call(opts, &out, "getCurrentInboundRateLimiterState", args) - if err != nil { - var zero TokenBucket - return zero, err - } - return *abi.ConvertType(out[0], new(TokenBucket)).(*TokenBucket), nil -} - -func (c *TokenPoolContract) GetCurrentOutboundRateLimiterState(opts *bind.CallOpts, args uint64) (TokenBucket, error) { - var out []any - err := c.contract.Call(opts, &out, "getCurrentOutboundRateLimiterState", args) - if err != nil { - var zero TokenBucket - return zero, err - } - return *abi.ConvertType(out[0], new(TokenBucket)).(*TokenBucket), nil -} - -type ChainUpdate struct { - RemoteChainSelector uint64 - RemotePoolAddresses [][]byte - RemoteTokenAddress []byte - OutboundRateLimiterConfig Config - InboundRateLimiterConfig Config -} - -type Config struct { - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - -type TokenBucket struct { - Tokens *big.Int - LastUpdated uint32 - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - type ApplyChainUpdatesArgs struct { - RemoteChainSelectorsToRemove []uint64 - ChainsToAdd []ChainUpdate + RemoteChainSelectorsToRemove []uint64 `json:"remoteChainSelectorsToRemove"` + ChainsToAdd []gobindings.TokenPoolChainUpdate `json:"chainsToAdd"` } type SetChainRateLimiterConfigsArgs struct { - RemoteChainSelectors []uint64 - OutboundConfigs []Config - InboundConfigs []Config + RemoteChainSelectors []uint64 `json:"remoteChainSelectors"` + OutboundConfigs []gobindings.RateLimiterConfig `json:"outboundConfigs"` + InboundConfigs []gobindings.RateLimiterConfig `json:"inboundConfigs"` } type SetChainRateLimiterConfigArgs struct { - RemoteChainSelector uint64 - OutboundConfig Config - InboundConfig Config + RemoteChainSelector uint64 `json:"remoteChainSelector"` + OutboundConfig gobindings.RateLimiterConfig `json:"outboundConfig"` + InboundConfig gobindings.RateLimiterConfig `json:"inboundConfig"` } type ApplyAllowListUpdatesArgs struct { - Removes []common.Address - Adds []common.Address + Removes []common.Address `json:"removes"` + Adds []common.Address `json:"adds"` } type AddRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type RemoveRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` +} + +func NewWriteApplyChainUpdates(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[ApplyChainUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:apply-chain-updates", + Version: Version, + Description: "Calls applyChainUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args ApplyChainUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args ApplyChainUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) + }, + }) +} + +func NewWriteSetRateLimitAdmin(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-rate-limit-admin", + Version: Version, + Description: "Calls setRateLimitAdmin on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetRateLimitAdmin(opts, args) + }, + }) +} + +func NewReadGetRateLimitAdmin(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-rate-limit-admin", + Version: Version, + Description: "Calls getRateLimitAdmin on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetRateLimitAdmin(opts) + }, + }) +} + +func NewWriteTransferOwnership(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:transfer-ownership", + Version: Version, + Description: "Calls transferOwnership on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.TransferOwnership(opts, args) + }, + }) +} + +func NewWriteSetChainRateLimiterConfigs(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[SetChainRateLimiterConfigsArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetChainRateLimiterConfigsArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-chain-rate-limiter-configs", + Version: Version, + Description: "Calls setChainRateLimiterConfigs on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args SetChainRateLimiterConfigsArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args SetChainRateLimiterConfigsArgs, + ) (*types.Transaction, error) { + return c.SetChainRateLimiterConfigs(opts, args.RemoteChainSelectors, args.OutboundConfigs, args.InboundConfigs) + }, + }) +} + +func NewWriteSetChainRateLimiterConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[SetChainRateLimiterConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetChainRateLimiterConfigArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-chain-rate-limiter-config", + Version: Version, + Description: "Calls setChainRateLimiterConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args SetChainRateLimiterConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args SetChainRateLimiterConfigArgs, + ) (*types.Transaction, error) { + return c.SetChainRateLimiterConfig(opts, args.RemoteChainSelector, args.OutboundConfig, args.InboundConfig) + }, + }) +} + +func NewReadGetToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-token", + Version: Version, + Description: "Calls getToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetToken(opts) + }, + }) +} + +func NewReadGetTokenDecimals(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], uint8, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, uint8, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-token-decimals", + Version: Version, + Description: "Calls getTokenDecimals on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (uint8, error) { + return c.GetTokenDecimals(opts) + }, + }) +} + +func NewReadIsSupportedToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[common.Address, bool, gobindings.TokenPoolInterface]{ + Name: "token-pool:is-supported-token", + Version: Version, + Description: "Calls isSupportedToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args common.Address) (bool, error) { + return c.IsSupportedToken(opts, args) + }, + }) +} + +func NewReadGetAllowListEnabled(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, bool, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-allow-list-enabled", + Version: Version, + Description: "Calls getAllowListEnabled on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (bool, error) { + return c.GetAllowListEnabled(opts) + }, + }) +} + +func NewReadGetAllowList(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-allow-list", + Version: Version, + Description: "Calls getAllowList on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllowList(opts) + }, + }) +} + +func NewWriteApplyAllowListUpdates(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[ApplyAllowListUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyAllowListUpdatesArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:apply-allow-list-updates", + Version: Version, + Description: "Calls applyAllowListUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args ApplyAllowListUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args ApplyAllowListUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowListUpdates(opts, args.Removes, args.Adds) + }, + }) +} + +func NewReadGetRouter(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-router", + Version: Version, + Description: "Calls getRouter on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetRouter(opts) + }, + }) +} + +func NewWriteSetRouter(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-router", + Version: Version, + Description: "Calls setRouter on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetRouter(opts, args) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} + +func NewReadGetRemoteToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], []byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, []byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-remote-token", + Version: Version, + Description: "Calls getRemoteToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) ([]byte, error) { + return c.GetRemoteToken(opts, args) + }, + }) +} + +func NewReadGetRemotePools(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], [][]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, [][]byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-remote-pools", + Version: Version, + Description: "Calls getRemotePools on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) ([][]byte, error) { + return c.GetRemotePools(opts, args) + }, + }) +} + +func NewWriteAddRemotePool(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[AddRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:add-remote-pool", + Version: Version, + Description: "Calls addRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args AddRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args AddRemotePoolArgs, + ) (*types.Transaction, error) { + return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewWriteRemoveRemotePool(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[RemoveRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:remove-remote-pool", + Version: Version, + Description: "Calls removeRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args RemoveRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args RemoveRemotePoolArgs, + ) (*types.Transaction, error) { + return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewReadGetCurrentInboundRateLimiterState(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.RateLimiterTokenBucket, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.RateLimiterTokenBucket, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-current-inbound-rate-limiter-state", + Version: Version, + Description: "Calls getCurrentInboundRateLimiterState on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) (gobindings.RateLimiterTokenBucket, error) { + return c.GetCurrentInboundRateLimiterState(opts, args) + }, + }) +} + +func NewReadGetCurrentOutboundRateLimiterState(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.RateLimiterTokenBucket, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.RateLimiterTokenBucket, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-current-outbound-rate-limiter-state", + Version: Version, + Description: "Calls getCurrentOutboundRateLimiterState on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) (gobindings.RateLimiterTokenBucket, error) { + return c.GetCurrentOutboundRateLimiterState(opts, args) + }, + }) } - -var ApplyChainUpdates = contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, *TokenPoolContract]{ - Name: "token-pool:apply-chain-updates", - Version: Version, - Description: "Calls applyChainUpdates on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, ApplyChainUpdatesArgs], - Validate: func(ApplyChainUpdatesArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args ApplyChainUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) - }, -}) - -var SetRateLimitAdmin = contract.NewWrite(contract.WriteParams[common.Address, *TokenPoolContract]{ - Name: "token-pool:set-rate-limit-admin", - Version: Version, - Description: "Calls setRateLimitAdmin on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetRateLimitAdmin(opts, args) - }, -}) - -var GetRateLimitAdmin = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-rate-limit-admin", - Version: Version, - Description: "Calls getRateLimitAdmin on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetRateLimitAdmin(opts) - }, -}) - -var TransferOwnership = contract.NewWrite(contract.WriteParams[common.Address, *TokenPoolContract]{ - Name: "token-pool:transfer-ownership", - Version: Version, - Description: "Calls transferOwnership on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.TransferOwnership(opts, args) - }, -}) - -var SetChainRateLimiterConfigs = contract.NewWrite(contract.WriteParams[SetChainRateLimiterConfigsArgs, *TokenPoolContract]{ - Name: "token-pool:set-chain-rate-limiter-configs", - Version: Version, - Description: "Calls setChainRateLimiterConfigs on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, SetChainRateLimiterConfigsArgs], - Validate: func(SetChainRateLimiterConfigsArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args SetChainRateLimiterConfigsArgs, - ) (*types.Transaction, error) { - return c.SetChainRateLimiterConfigs(opts, args.RemoteChainSelectors, args.OutboundConfigs, args.InboundConfigs) - }, -}) - -var SetChainRateLimiterConfig = contract.NewWrite(contract.WriteParams[SetChainRateLimiterConfigArgs, *TokenPoolContract]{ - Name: "token-pool:set-chain-rate-limiter-config", - Version: Version, - Description: "Calls setChainRateLimiterConfig on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, SetChainRateLimiterConfigArgs], - Validate: func(SetChainRateLimiterConfigArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args SetChainRateLimiterConfigArgs, - ) (*types.Transaction, error) { - return c.SetChainRateLimiterConfig(opts, args.RemoteChainSelector, args.OutboundConfig, args.InboundConfig) - }, -}) - -var GetToken = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-token", - Version: Version, - Description: "Calls getToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetToken(opts) - }, -}) - -var GetTokenDecimals = contract.NewRead(contract.ReadParams[struct{}, uint8, *TokenPoolContract]{ - Name: "token-pool:get-token-decimals", - Version: Version, - Description: "Calls getTokenDecimals on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (uint8, error) { - return c.GetTokenDecimals(opts) - }, -}) - -var IsSupportedToken = contract.NewRead(contract.ReadParams[common.Address, bool, *TokenPoolContract]{ - Name: "token-pool:is-supported-token", - Version: Version, - Description: "Calls isSupportedToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args common.Address) (bool, error) { - return c.IsSupportedToken(opts, args) - }, -}) - -var GetAllowListEnabled = contract.NewRead(contract.ReadParams[struct{}, bool, *TokenPoolContract]{ - Name: "token-pool:get-allow-list-enabled", - Version: Version, - Description: "Calls getAllowListEnabled on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (bool, error) { - return c.GetAllowListEnabled(opts) - }, -}) - -var GetAllowList = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *TokenPoolContract]{ - Name: "token-pool:get-allow-list", - Version: Version, - Description: "Calls getAllowList on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllowList(opts) - }, -}) - -var ApplyAllowListUpdates = contract.NewWrite(contract.WriteParams[ApplyAllowListUpdatesArgs, *TokenPoolContract]{ - Name: "token-pool:apply-allow-list-updates", - Version: Version, - Description: "Calls applyAllowListUpdates on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, ApplyAllowListUpdatesArgs], - Validate: func(ApplyAllowListUpdatesArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args ApplyAllowListUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowListUpdates(opts, args.Removes, args.Adds) - }, -}) - -var GetRouter = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-router", - Version: Version, - Description: "Calls getRouter on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetRouter(opts) - }, -}) - -var SetRouter = contract.NewWrite(contract.WriteParams[common.Address, *TokenPoolContract]{ - Name: "token-pool:set-router", - Version: Version, - Description: "Calls setRouter on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetRouter(opts, args) - }, -}) - -var GetSupportedChains = contract.NewRead(contract.ReadParams[struct{}, []uint64, *TokenPoolContract]{ - Name: "token-pool:get-supported-chains", - Version: Version, - Description: "Calls getSupportedChains on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) ([]uint64, error) { - return c.GetSupportedChains(opts) - }, -}) - -var GetRemoteToken = contract.NewRead(contract.ReadParams[uint64, []byte, *TokenPoolContract]{ - Name: "token-pool:get-remote-token", - Version: Version, - Description: "Calls getRemoteToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) ([]byte, error) { - return c.GetRemoteToken(opts, args) - }, -}) - -var GetRemotePools = contract.NewRead(contract.ReadParams[uint64, [][]byte, *TokenPoolContract]{ - Name: "token-pool:get-remote-pools", - Version: Version, - Description: "Calls getRemotePools on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) ([][]byte, error) { - return c.GetRemotePools(opts, args) - }, -}) - -var AddRemotePool = contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, *TokenPoolContract]{ - Name: "token-pool:add-remote-pool", - Version: Version, - Description: "Calls addRemotePool on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, AddRemotePoolArgs], - Validate: func(AddRemotePoolArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args AddRemotePoolArgs, - ) (*types.Transaction, error) { - return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var RemoveRemotePool = contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, *TokenPoolContract]{ - Name: "token-pool:remove-remote-pool", - Version: Version, - Description: "Calls removeRemotePool on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, RemoveRemotePoolArgs], - Validate: func(RemoveRemotePoolArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args RemoveRemotePoolArgs, - ) (*types.Transaction, error) { - return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var GetCurrentInboundRateLimiterState = contract.NewRead(contract.ReadParams[uint64, TokenBucket, *TokenPoolContract]{ - Name: "token-pool:get-current-inbound-rate-limiter-state", - Version: Version, - Description: "Calls getCurrentInboundRateLimiterState on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) (TokenBucket, error) { - return c.GetCurrentInboundRateLimiterState(opts, args) - }, -}) - -var GetCurrentOutboundRateLimiterState = contract.NewRead(contract.ReadParams[uint64, TokenBucket, *TokenPoolContract]{ - Name: "token-pool:get-current-outbound-rate-limiter-state", - Version: Version, - Description: "Calls getCurrentOutboundRateLimiterState on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) (TokenBucket, error) { - return c.GetCurrentOutboundRateLimiterState(opts, args) - }, -}) diff --git a/chains/evm/deployment/v1_6_1/sequences/configure_token_for_transfers.go b/chains/evm/deployment/v1_6_1/sequences/configure_token_for_transfers.go index 2803edf69e..72d5938d8f 100644 --- a/chains/evm/deployment/v1_6_1/sequences/configure_token_for_transfers.go +++ b/chains/evm/deployment/v1_6_1/sequences/configure_token_for_transfers.go @@ -5,12 +5,13 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" v1_5_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/sequences" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + tpops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + tpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" ) @@ -26,30 +27,32 @@ var ConfigureTokenForTransfers = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not found", input.ChainSelector) } + tokenPoolAddress := common.HexToAddress(input.TokenPoolAddress) + tp, err := tpbind.NewTokenPool(tokenPoolAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to instantiate token pool contract: %w", err) + } + var tokenAddress common.Address if input.TokenAddress != "" { tokenAddress = common.HexToAddress(input.TokenAddress) } else { - tokenAddrReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetToken, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.TokenPoolAddress), + tokenAddrReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetToken(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token address from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } tokenAddress = tokenAddrReport.Output } - tokenPoolAddress := common.HexToAddress(input.TokenPoolAddress) registryTokenPoolAddress := tokenPoolAddress if input.RegistryTokenPoolAddress != "" { registryTokenPoolAddress = common.HexToAddress(input.RegistryTokenPoolAddress) } // Validate the pool supports the token - isSupported, err := cldf_ops.ExecuteOperation(b, token_pool.IsSupportedToken, chain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddress, - Args: tokenAddress, + isSupported, err := cldf_ops.ExecuteOperation(b, tpops.NewReadIsSupportedToken(tp), chain, ops2contract.FunctionInput[common.Address]{ + Args: tokenAddress, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to check if token %s is supported by token pool %s on %s: %w", tokenAddress, tokenPoolAddress, chain, err) diff --git a/chains/evm/deployment/v1_6_1/sequences/configure_token_pool.go b/chains/evm/deployment/v1_6_1/sequences/configure_token_pool.go index afa45c27f8..60ed88a1fd 100644 --- a/chains/evm/deployment/v1_6_1/sequences/configure_token_pool.go +++ b/chains/evm/deployment/v1_6_1/sequences/configure_token_pool.go @@ -5,10 +5,12 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + + tpops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + tpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" ) @@ -36,22 +38,25 @@ var ConfigureTokenPool = cldf_ops.NewSequence( semver.MustParse("2.0.0"), "Configures a token pool on an EVM chain", func(b cldf_ops.Bundle, chain evm.Chain, input ConfigureTokenPoolInput) (output sequences.OnChainOutput, err error) { - writes := make([]evm_contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) + + tp, err := tpbind.NewTokenPool(input.TokenPoolAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to instantiate token pool contract: %w", err) + } // First, check if the allow-list is enabled if len(input.AllowList) != 0 { - allowListEnabledReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetAllowListEnabled, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + allowListEnabledReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetAllowListEnabled(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get allow-list status from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } if allowListEnabledReport.Output { // Allow-list is enabled, so we first check the current allow-list - currentAllowListReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetAllowList, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + currentAllowListReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetAllowList(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get current allow-list from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) @@ -60,10 +65,8 @@ var ConfigureTokenPool = cldf_ops.NewSequence( // Apply any updates to the allow-list if they exist if len(adds) != 0 || len(removes) != 0 { - applyAllowListUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.ApplyAllowListUpdates, chain, evm_contract.FunctionInput[token_pool.ApplyAllowListUpdatesArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: token_pool.ApplyAllowListUpdatesArgs{ + applyAllowListUpdatesReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteApplyAllowListUpdates(tp), chain, ops2contract.FunctionInput[tpops.ApplyAllowListUpdatesArgs]{ + Args: tpops.ApplyAllowListUpdatesArgs{ Adds: adds, Removes: removes, }, @@ -78,18 +81,15 @@ var ConfigureTokenPool = cldf_ops.NewSequence( // Set router if necessary if input.RouterAddress != (common.Address{}) { - currentRouterReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRouter, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + currentRouterReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetRouter(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get current router from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } if currentRouterReport.Output != input.RouterAddress { - setRouterReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetRouter, chain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RouterAddress, + setRouterReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteSetRouter(tp), chain, ops2contract.FunctionInput[common.Address]{ + Args: input.RouterAddress, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set router on token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) @@ -100,18 +100,15 @@ var ConfigureTokenPool = cldf_ops.NewSequence( // Set rate limit admin if necessary if input.RateLimitAdmin != (common.Address{}) { - currentRateLimitAdminReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRateLimitAdmin, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + currentRateLimitAdminReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetRateLimitAdmin(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get current rate limit admin from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } if currentRateLimitAdminReport.Output != input.RateLimitAdmin { - setRateLimitAdminReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetRateLimitAdmin, chain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RateLimitAdmin, + setRateLimitAdminReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteSetRateLimitAdmin(tp), chain, ops2contract.FunctionInput[common.Address]{ + Args: input.RateLimitAdmin, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set rate limit admin on token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) @@ -120,7 +117,7 @@ var ConfigureTokenPool = cldf_ops.NewSequence( } } - batchOp, err := evm_contract.NewBatchOperationFromWrites(writes) + batchOp, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } diff --git a/chains/evm/deployment/v1_6_1/sequences/configure_token_pool_for_remote_chain.go b/chains/evm/deployment/v1_6_1/sequences/configure_token_pool_for_remote_chain.go index fbef2bc4a8..4be514875f 100644 --- a/chains/evm/deployment/v1_6_1/sequences/configure_token_pool_for_remote_chain.go +++ b/chains/evm/deployment/v1_6_1/sequences/configure_token_pool_for_remote_chain.go @@ -14,10 +14,12 @@ import ( cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/type_and_version" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + tpops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" + tpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) // ConfigureTokenPoolForRemoteChainInput is the input for the ConfigureTokenPoolForRemoteChain sequence. @@ -47,20 +49,22 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if err := input.Validate(chain); err != nil { return sequences.OnChainOutput{}, fmt.Errorf("invalid input: %w", err) } - writes := make([]evm_contract.WriteOutput, 0) + tp, err := tpbind.NewTokenPool(input.TokenPoolAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to instantiate token pool contract: %w", err) + } + writes := make([]ops2contract.WriteOutput, 0) // Get remote chains that are currently supported by the token pools - supportedChainsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetSupportedChains, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + supportedChainsReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetSupportedChains(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get supported chains: %w", err) } - localDecimalsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetTokenDecimals, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + localDecimalsReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetTokenDecimals(tp), chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token decimals: %w", err) @@ -92,10 +96,8 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( removes := make([]uint64, 0, 1) // Cap == 1 because we may need to remove the chain if the remote token is different if slices.Contains(supportedChainsReport.Output, input.RemoteChainSelector) { // Check existing remote token - getRemoteTokenReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRemoteToken, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RemoteChainSelector, + getRemoteTokenReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetRemoteToken(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: input.RemoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote token: %w", err) @@ -107,7 +109,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( // Only proceed further if we do NOT need to remove and re-add the chain if len(removes) == 0 { // Check and update rate limiters - rateLimitersReport, err := maybeUpdateRateLimiters(b, chain, input.ChainSelector, input.TokenPoolAddress, input.RemoteChainSelector, inboundConfig, outboundConfig) + rateLimitersReport, err := maybeUpdateRateLimiters(b, chain, tp, input.RemoteChainSelector, inboundConfig, outboundConfig) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to maybe update rate limiters: %w", err) } @@ -117,10 +119,8 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // Check existing remote pools - getRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRemotePools, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RemoteChainSelector, + getRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetRemotePools(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: input.RemoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote pools: %w", err) @@ -129,10 +129,8 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( return bytes.Equal(addr, input.RemoteChainConfig.RemotePool) }) { // Add the requested remote pool - addRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.AddRemotePool, chain, evm_contract.FunctionInput[token_pool.AddRemotePoolArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: token_pool.AddRemotePoolArgs{ + addRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteAddRemotePool(tp), chain, ops2contract.FunctionInput[tpops.AddRemotePoolArgs]{ + Args: tpops.AddRemotePoolArgs{ RemoteChainSelector: input.RemoteChainSelector, RemotePoolAddress: common.LeftPadBytes(input.RemoteChainConfig.RemotePool, 32), }, @@ -144,7 +142,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // Return early as no further action is required - batchOp, err := evm_contract.NewBatchOperationFromWrites(writes) + batchOp, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -154,24 +152,22 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // If the chain is not supported, apply the config for the remote chain - applyChainUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.ApplyChainUpdates, chain, evm_contract.FunctionInput[token_pool.ApplyChainUpdatesArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: token_pool.ApplyChainUpdatesArgs{ + applyChainUpdatesReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteApplyChainUpdates(tp), chain, ops2contract.FunctionInput[tpops.ApplyChainUpdatesArgs]{ + Args: tpops.ApplyChainUpdatesArgs{ RemoteChainSelectorsToRemove: removes, - ChainsToAdd: []token_pool.ChainUpdate{ + ChainsToAdd: []tpbind.TokenPoolChainUpdate{ { RemoteChainSelector: input.RemoteChainSelector, RemotePoolAddresses: [][]byte{ common.LeftPadBytes(input.RemoteChainConfig.RemotePool, 32), }, RemoteTokenAddress: common.LeftPadBytes(input.RemoteChainConfig.RemoteToken, 32), - OutboundRateLimiterConfig: token_pool.Config{ + OutboundRateLimiterConfig: tpbind.RateLimiterConfig{ IsEnabled: outboundConfig.IsEnabled, Capacity: outboundConfig.Capacity, Rate: outboundConfig.Rate, }, - InboundRateLimiterConfig: token_pool.Config{ + InboundRateLimiterConfig: tpbind.RateLimiterConfig{ IsEnabled: inboundConfig.IsEnabled, Capacity: inboundConfig.Capacity, Rate: inboundConfig.Rate, @@ -185,7 +181,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } writes = append(writes, applyChainUpdatesReport.Output) - batchOp, err := evm_contract.NewBatchOperationFromWrites(writes) + batchOp, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -198,46 +194,39 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( func maybeUpdateRateLimiters( b cldf_ops.Bundle, chain evm.Chain, - chainSelector uint64, - tokenPoolAddress common.Address, + tp tpbind.TokenPoolInterface, remoteChainSelector uint64, inboundConfig tokens.RateLimiterConfig, outboundConfig tokens.RateLimiterConfig, -) (output evm_contract.WriteOutput, err error) { - inboundRateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetCurrentInboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: tokenPoolAddress, - Args: remoteChainSelector, +) (output ops2contract.WriteOutput, err error) { + inboundRateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetCurrentInboundRateLimiterState(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { - return evm_contract.WriteOutput{}, fmt.Errorf("failed to get inbound rate limiter state: %w", err) + return ops2contract.WriteOutput{}, fmt.Errorf("failed to get inbound rate limiter state: %w", err) } currentInboundRateLimiterState := inboundRateLimiterStateReport.Output - outboundRateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetCurrentOutboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: tokenPoolAddress, - Args: remoteChainSelector, + outboundRateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, tpops.NewReadGetCurrentOutboundRateLimiterState(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { - return evm_contract.WriteOutput{}, fmt.Errorf("failed to get outbound rate limiter state: %w", err) + return ops2contract.WriteOutput{}, fmt.Errorf("failed to get outbound rate limiter state: %w", err) } currentOutboundRateLimiterState := outboundRateLimiterStateReport.Output // Update the rate limiters if they do not match the desired config if !rateLimiterConfigsEqual(currentInboundRateLimiterState, inboundConfig) || !rateLimiterConfigsEqual(currentOutboundRateLimiterState, outboundConfig) { - setInboundRateLimiterReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetChainRateLimiterConfig, chain, evm_contract.FunctionInput[token_pool.SetChainRateLimiterConfigArgs]{ - ChainSelector: chainSelector, - Address: tokenPoolAddress, - Args: token_pool.SetChainRateLimiterConfigArgs{ + setInboundRateLimiterReport, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteSetChainRateLimiterConfig(tp), chain, ops2contract.FunctionInput[tpops.SetChainRateLimiterConfigArgs]{ + Args: tpops.SetChainRateLimiterConfigArgs{ RemoteChainSelector: remoteChainSelector, - InboundConfig: token_pool.Config{ + InboundConfig: tpbind.RateLimiterConfig{ IsEnabled: inboundConfig.IsEnabled, Capacity: inboundConfig.Capacity, Rate: inboundConfig.Rate, }, - OutboundConfig: token_pool.Config{ + OutboundConfig: tpbind.RateLimiterConfig{ IsEnabled: outboundConfig.IsEnabled, Capacity: outboundConfig.Capacity, Rate: outboundConfig.Rate, @@ -245,16 +234,16 @@ func maybeUpdateRateLimiters( }, }) if err != nil { - return evm_contract.WriteOutput{}, fmt.Errorf("failed to set rate limiters config: %w", err) + return ops2contract.WriteOutput{}, fmt.Errorf("failed to set rate limiters config: %w", err) } return setInboundRateLimiterReport.Output, nil } - return evm_contract.WriteOutput{}, nil + return ops2contract.WriteOutput{}, nil } // rateLimiterConfigsEqual returns true if the current rate limiter config on-chain matches the desired config. -func rateLimiterConfigsEqual(current token_pool.TokenBucket, desired tokens.RateLimiterConfig) bool { +func rateLimiterConfigsEqual(current tpbind.RateLimiterTokenBucket, desired tokens.RateLimiterConfig) bool { return current.IsEnabled == desired.IsEnabled && current.Capacity.Cmp(desired.Capacity) == 0 && current.Rate.Cmp(desired.Rate) == 0 diff --git a/chains/evm/deployment/v1_6_1/sequences/deploy_burn_mint_token_pool.go b/chains/evm/deployment/v1_6_1/sequences/deploy_burn_mint_token_pool.go index 87d780ddc1..a8e5e7af2f 100644 --- a/chains/evm/deployment/v1_6_1/sequences/deploy_burn_mint_token_pool.go +++ b/chains/evm/deployment/v1_6_1/sequences/deploy_burn_mint_token_pool.go @@ -5,12 +5,12 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/burn_mint_token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) @@ -27,8 +27,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( deployment.ContractType(input.TokenPoolType), *input.TokenPoolVersion, ) - tpDeployReport, err := cldf_ops.ExecuteOperation(b, burn_mint_token_pool.Deploy, chain, evm_contract.DeployInput[burn_mint_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSel, + tpDeployReport, err := cldf_ops.ExecuteOperation(b, burn_mint_token_pool.Deploy, chain, ops2contract.DeployInput[burn_mint_token_pool.ConstructorArgs]{ TypeAndVersion: typeAndVersion, Args: burn_mint_token_pool.ConstructorArgs{ Token: input.ConstructorArgs.Token, diff --git a/chains/evm/deployment/v1_6_1/sequences/deploy_non_canonical_usdc.go b/chains/evm/deployment/v1_6_1/sequences/deploy_non_canonical_usdc.go index 174156d64e..9e6e716213 100644 --- a/chains/evm/deployment/v1_6_1/sequences/deploy_non_canonical_usdc.go +++ b/chains/evm/deployment/v1_6_1/sequences/deploy_non_canonical_usdc.go @@ -11,12 +11,12 @@ import ( cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) var DeployNonCanonicalUSDC = cldf_ops.NewSequence( @@ -64,9 +64,8 @@ var DeployNonCanonicalUSDC = cldf_ops.NewSequence( if len(existingPools) == 1 { burnMintWithLockReleaseFlagTokenPoolRef = existingPools[0] } else { - burnMintWithLockReleaseFlagTokenPoolReport, err := cldf_ops.ExecuteOperation(b, burn_mint_with_lock_release_flag_token_pool.Deploy, chain, contract_utils.DeployInput[burn_mint_with_lock_release_flag_token_pool.ConstructorArgs]{ + burnMintWithLockReleaseFlagTokenPoolReport, err := cldf_ops.ExecuteOperation(b, burn_mint_with_lock_release_flag_token_pool.Deploy, chain, ops2contract.DeployInput[burn_mint_with_lock_release_flag_token_pool.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(burn_mint_with_lock_release_flag_token_pool.ContractType, *burn_mint_with_lock_release_flag_token_pool.Version), - ChainSelector: chain.Selector, Args: burn_mint_with_lock_release_flag_token_pool.ConstructorArgs{ Token: usdcTokenAddress, LocalTokenDecimals: input.TokenDecimals, diff --git a/chains/evm/deployment/v1_6_1/sequences/token_pool/configure_token_pool_for_remote_chains.go b/chains/evm/deployment/v1_6_1/sequences/token_pool/configure_token_pool_for_remote_chains.go index e06352a694..6b4e397659 100644 --- a/chains/evm/deployment/v1_6_1/sequences/token_pool/configure_token_pool_for_remote_chains.go +++ b/chains/evm/deployment/v1_6_1/sequences/token_pool/configure_token_pool_for_remote_chains.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" ) @@ -133,7 +134,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( // Token pool remote chain configuration can vary depending on whether the remote // pool is or isn't supported. The different cases to consider are recorded below // in the code. - reportWrites := []contract.WriteOutput{} + reportWrites := []ops2contract.WriteOutput{} remotesToDel := []uint64{} if slices.Contains(sc, input.RemoteChainSelector) { remoteToken, err := tp.GetRemoteToken(&bind.CallOpts{Context: b.GetContext()}, input.RemoteChainSelector) @@ -192,12 +193,10 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( // If either rate limiter config is different, then update it if !isOutboundEqual || !isInboundEqual { - report, err := cldf_ops.ExecuteOperation(b, tpops.SetChainRateLimiterConfig, chain, contract.FunctionInput[tpops.SetChainRateLimiterConfigArgs]{ - ChainSelector: chain.Selector, - Address: input.TokenPoolAddress, + report, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteSetChainRateLimiterConfig(tp), chain, ops2contract.FunctionInput[tpops.SetChainRateLimiterConfigArgs]{ Args: tpops.SetChainRateLimiterConfigArgs{ - OutboundConfig: tpops.Config{IsEnabled: inputORL.IsEnabled, Capacity: inputORL.Capacity, Rate: inputORL.Rate}, - InboundConfig: tpops.Config{IsEnabled: inputIRL.IsEnabled, Capacity: inputIRL.Capacity, Rate: inputIRL.Rate}, + OutboundConfig: token_pool.RateLimiterConfig{IsEnabled: inputORL.IsEnabled, Capacity: inputORL.Capacity, Rate: inputORL.Rate}, + InboundConfig: token_pool.RateLimiterConfig{IsEnabled: inputIRL.IsEnabled, Capacity: inputIRL.Capacity, Rate: inputIRL.Rate}, RemoteChainSelector: remoteCS, }, }) @@ -209,9 +208,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( // If the exact 32-byte remote pool address is not registered, add it if !hasRemoteTP { - report, err := cldf_ops.ExecuteOperation(b, tpops.AddRemotePool, chain, contract.FunctionInput[tpops.AddRemotePoolArgs]{ - ChainSelector: chain.Selector, - Address: input.TokenPoolAddress, + report, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteAddRemotePool(tp), chain, ops2contract.FunctionInput[tpops.AddRemotePoolArgs]{ Args: tpops.AddRemotePoolArgs{ RemoteChainSelector: remoteCS, RemotePoolAddress: remoteTP, @@ -248,22 +245,20 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( // if len(reportWrites) == 0 { paddedRemoteTokenPoolAddress := common.LeftPadBytes(input.RemoteChainConfig.RemotePool, 32) - applyChainUpdatesInput := contract.FunctionInput[tpops.ApplyChainUpdatesArgs]{ - ChainSelector: chain.Selector, - Address: input.TokenPoolAddress, + applyChainUpdatesInput := ops2contract.FunctionInput[tpops.ApplyChainUpdatesArgs]{ Args: tpops.ApplyChainUpdatesArgs{ RemoteChainSelectorsToRemove: remotesToDel, - ChainsToAdd: []tpops.ChainUpdate{ + ChainsToAdd: []token_pool.TokenPoolChainUpdate{ { RemotePoolAddresses: [][]byte{paddedRemoteTokenPoolAddress}, RemoteChainSelector: input.RemoteChainSelector, RemoteTokenAddress: input.RemoteChainConfig.RemoteToken, - OutboundRateLimiterConfig: tpops.Config{ + OutboundRateLimiterConfig: token_pool.RateLimiterConfig{ IsEnabled: inputORL.IsEnabled, Capacity: inputORL.Capacity, Rate: inputORL.Rate, }, - InboundRateLimiterConfig: tpops.Config{ + InboundRateLimiterConfig: token_pool.RateLimiterConfig{ IsEnabled: inputIRL.IsEnabled, Capacity: inputIRL.Capacity, Rate: inputIRL.Rate, @@ -273,7 +268,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( }, } - report, err := cldf_ops.ExecuteOperation(b, tpops.ApplyChainUpdates, chain, applyChainUpdatesInput) + report, err := cldf_ops.ExecuteOperation(b, tpops.NewWriteApplyChainUpdates(tp), chain, applyChainUpdatesInput) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply chain updates: %w", err) } @@ -281,7 +276,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( reportWrites = append(reportWrites, report.Output) } - batchOp, err := contract.NewBatchOperationFromWrites(reportWrites) + batchOp, err := ops2contract.NewBatchOperationFromWrites(reportWrites) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation: %w", err) } diff --git a/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go b/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go index 134dbae301..d0b5517ec3 100644 --- a/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go +++ b/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go @@ -3,126 +3,68 @@ package cctp_message_transmitter_proxy import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_2/cctp_message_transmitter_proxy" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CCTPMessageTransmitterProxy" var Version = semver.MustParse("1.6.2") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CCTPMessageTransmitterProxyABI = `[{"type":"constructor","inputs":[{"name":"tokenMessenger","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"configureAllowedCallers","inputs":[{"name":"configArgs","type":"tuple[]","internalType":"struct CCTPMessageTransmitterProxy.AllowedCallerConfigArgs[]","components":[{"name":"caller","type":"address","internalType":"address"},{"name":"allowed","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowedCallers","inputs":[],"outputs":[{"name":"allowedCallers","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"i_cctpTransmitter","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IMessageTransmitter"}],"stateMutability":"view"},{"type":"function","name":"isAllowedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}],"outputs":[{"name":"allowed","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"receiveMessage","inputs":[{"name":"message","type":"bytes","internalType":"bytes"},{"name":"attestation","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AllowedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]}]` -const CCTPMessageTransmitterProxyBin = "0x60a0806040523461010f57602081610e34803803809161001f8285610114565b83398101031261010f57516001600160a01b0381169081900361010f5733156100fe57600180546001600160a01b03191633179055604051632c12192160e01b815290602090829060049082905afa9081156100f2576000916100a9575b506001600160a01b0316608052604051610ce6908161014e82396080518181816101c501526106680152f35b6020813d6020116100ea575b816100c260209383610114565b810103126100e65751906001600160a01b03821682036100e357503861007d565b80fd5b5080fd5b3d91506100b5565b6040513d6000823e3d90fd5b639b15e16f60e01b60005260046000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761013757604052565b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c90816310807aa71461085857508063181f5a771461072057806357ecfd281461054957806379ba5097146104605780638da5cb5b1461040e578063a68012581461039b578063bd028e7c146101e9578063cfc1db061461017a5763f2fde38b1461008257600080fd5b346101755760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101755760043573ffffffffffffffffffffffffffffffffffffffff8116809103610175576100da610a51565b33811461014b57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b600080fd5b346101755760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101755760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101755760043567ffffffffffffffff8111610175573660238201121561017557806004013567ffffffffffffffff8111610175576024820191602436918360061b01011161017557610265610a51565b60005b81811061027157005b602061027e8284866109f1565b0135908115158203610175576001911561031c576102c373ffffffffffffffffffffffffffffffffffffffff6102bd6102b88487896109f1565b610a30565b16610c79565b6102ce575b01610268565b73ffffffffffffffffffffffffffffffffffffffff6102f16102b88386886109f1565b167f663c7e9ed36d9138863ef4306bbfcf01f60e1e7ca69b370c53d3094369e2cb02600080a26102c8565b61034873ffffffffffffffffffffffffffffffffffffffff6103426102b88487896109f1565b16610ab4565b156102c85773ffffffffffffffffffffffffffffffffffffffff6103706102b88386886109f1565b167fbc0a6e072a312bde289d32bc84e5b758d7c617f734ecc0d69f995b2d7e69be36600080a26102c8565b346101755760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101755760043573ffffffffffffffffffffffffffffffffffffffff8116809103610175576104046020916000526003602052604060002054151590565b6040519015158152f35b346101755760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101755760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101755760005473ffffffffffffffffffffffffffffffffffffffff8116330361051f577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346101755760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101755760043567ffffffffffffffff811161017557610598903690600401610984565b60243567ffffffffffffffff8111610175576105b8903690600401610984565b9290916105d2336000526003602052604060002054151590565b156106f25761064d60209361061d9560405196879586957f57ecfd280000000000000000000000000000000000000000000000000000000087526040600488015260448701916109b2565b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8584030160248601526109b2565b0381600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19081156106e6576000916106a6575b6020826040519015158152f35b6020813d6020116106de575b816106bf60209383610943565b810103126106da575180151581036106da5790506020610699565b5080fd5b3d91506106b2565b6040513d6000823e3d90fd5b7f8e4a23d6000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b346101755760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610175576040516060810181811067ffffffffffffffff82111761082957604052602181527f434354504d6573736167655472616e736d697474657250726f787920312e362e60208201527f3200000000000000000000000000000000000000000000000000000000000000604082015260405190602082528181519182602083015260005b8381106108115750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b602082820181015160408784010152859350016107d1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b346101755760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610175576002549081815260208101809260026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b81811061092d57505050816108d4910382610943565b6040519182916020830190602084525180915260408301919060005b8181106108fe575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016108f0565b82548452602090930192600192830192016108be565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761082957604052565b9181601f840112156101755782359167ffffffffffffffff8311610175576020838186019501011161017557565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9190811015610a015760061b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036101755790565b73ffffffffffffffffffffffffffffffffffffffff600154163303610a7257565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b8054821015610a015760005260206000200190600090565b6000818152600360205260409020548015610c72577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111610c4357600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211610c4357818103610bd4575b5050506002548015610ba5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610b62816002610a9c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b610c2b610be5610bf6936002610a9c565b90549060031b1c9283926002610a9c565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080610b29565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5050600090565b80600052600360205260406000205415600014610cd3576002546801000000000000000081101561082957610cba610bf68260018594016002556002610a9c565b9055600254906000526003602052604060002055600190565b5060009056fea164736f6c634300081a000a" - -type CCTPMessageTransmitterProxyContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCCTPMessageTransmitterProxyContract( - address common.Address, - backend bind.ContractBackend, -) (*CCTPMessageTransmitterProxyContract, error) { - parsed, err := abi.JSON(strings.NewReader(CCTPMessageTransmitterProxyABI)) - if err != nil { - return nil, err - } - return &CCTPMessageTransmitterProxyContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CCTPMessageTransmitterProxyContract) Address() common.Address { - return c.address -} - -func (c *CCTPMessageTransmitterProxyContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CCTPMessageTransmitterProxyContract) GetAllowedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *CCTPMessageTransmitterProxyContract) ConfigureAllowedCallers(opts *bind.TransactOpts, args []AllowedCallerConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "configureAllowedCallers", args) -} - -type AllowedCallerConfigArgs struct { - Caller common.Address - Allowed bool -} - type ConstructorArgs struct { - TokenMessenger common.Address + TokenMessenger common.Address `json:"tokenMessenger"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "cctp-message-transmitter-proxy:deploy", - Version: Version, - Description: "Deploys the CCTPMessageTransmitterProxy contract", - ContractMetadata: &bind.MetaData{ - ABI: CCTPMessageTransmitterProxyABI, - Bin: CCTPMessageTransmitterProxyBin, - }, + Name: "cctp-message-transmitter-proxy:deploy", + Version: Version, + Description: "Deploys the CCTPMessageTransmitterProxy contract", + ContractMetadata: gobindings.CCTPMessageTransmitterProxyMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(CCTPMessageTransmitterProxyBin), + EVM: common.FromHex(gobindings.CCTPMessageTransmitterProxyMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetAllowedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *CCTPMessageTransmitterProxyContract]{ - Name: "cctp-message-transmitter-proxy:get-allowed-callers", - Version: Version, - Description: "Calls getAllowedCallers on the contract", - ContractType: ContractType, - NewContract: NewCCTPMessageTransmitterProxyContract, - CallContract: func(c *CCTPMessageTransmitterProxyContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllowedCallers(opts) - }, -}) +func NewReadGetAllowedCallers(c gobindings.CCTPMessageTransmitterProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.CCTPMessageTransmitterProxyInterface]{ + Name: "cctp-message-transmitter-proxy:get-allowed-callers", + Version: Version, + Description: "Calls getAllowedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPMessageTransmitterProxyInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllowedCallers(opts) + }, + }) +} -var ConfigureAllowedCallers = contract.NewWrite(contract.WriteParams[[]AllowedCallerConfigArgs, *CCTPMessageTransmitterProxyContract]{ - Name: "cctp-message-transmitter-proxy:configure-allowed-callers", - Version: Version, - Description: "Calls configureAllowedCallers on the contract", - ContractType: ContractType, - ContractABI: CCTPMessageTransmitterProxyABI, - NewContract: NewCCTPMessageTransmitterProxyContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPMessageTransmitterProxyContract, []AllowedCallerConfigArgs], - Validate: func([]AllowedCallerConfigArgs) error { return nil }, - CallContract: func( - c *CCTPMessageTransmitterProxyContract, - opts *bind.TransactOpts, - args []AllowedCallerConfigArgs, - ) (*types.Transaction, error) { - return c.ConfigureAllowedCallers(opts, args) - }, -}) +func NewWriteConfigureAllowedCallers(c gobindings.CCTPMessageTransmitterProxyInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.CCTPMessageTransmitterProxyAllowedCallerConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.CCTPMessageTransmitterProxyAllowedCallerConfigArgs, gobindings.CCTPMessageTransmitterProxyInterface]{ + Name: "cctp-message-transmitter-proxy:configure-allowed-callers", + Version: Version, + Description: "Calls configureAllowedCallers on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPMessageTransmitterProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPMessageTransmitterProxyInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.CCTPMessageTransmitterProxyAllowedCallerConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPMessageTransmitterProxyInterface, + opts *bind.TransactOpts, + args []gobindings.CCTPMessageTransmitterProxyAllowedCallerConfigArgs, + ) (*types.Transaction, error) { + return c.ConfigureAllowedCallers(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool/hybrid_lock_release_usdc_token_pool.go b/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool/hybrid_lock_release_usdc_token_pool.go index b4f5bc6208..7896c7ff97 100644 --- a/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool/hybrid_lock_release_usdc_token_pool.go +++ b/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool/hybrid_lock_release_usdc_token_pool.go @@ -1,7 +1,8 @@ +// Code generated by operations-gen. DO NOT EDIT. + package hybrid_lock_release_usdc_token_pool import ( - "fmt" "math/big" "github.com/Masterminds/semver/v3" @@ -9,68 +10,100 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_2/hybrid_lock_release_usdc_token_pool" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_2/hybrid_lock_release_usdc_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "HybridLockReleaseUSDCTokenPool" - var Version = semver.MustParse("1.6.2") +var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) type WithdrawLiquidityArgs struct { - RemoteChainSelector uint64 - Amount *big.Int + RemoteChainSelector uint64 `json:"remoteChainSelector"` + Amount *big.Int `json:"amount"` } -var GetLockedTokensForChain = contract.NewRead(contract.ReadParams[uint64, *big.Int, *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool]{ - Name: "hybrid-lock-release-usdc-token-pool:get-locked-tokens-for-chain", - Version: Version, - Description: "Gets locked token balance for a remote chain selector", - ContractType: ContractType, - NewContract: hybrid_lock_release_usdc_token_pool.NewHybridLockReleaseUSDCTokenPool, - CallContract: func(pool *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool, opts *bind.CallOpts, remoteChainSelector uint64) (*big.Int, error) { - return pool.GetLockedTokensForChain(opts, remoteChainSelector) - }, -}) +type ConstructorArgs struct { + TokenMessenger common.Address `json:"tokenMessenger"` + CctpMessageTransmitterProxy common.Address `json:"cctpMessageTransmitterProxy"` + Token common.Address `json:"token"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + PreviousPool common.Address `json:"previousPool"` +} -var GetLiquidityProvider = contract.NewRead(contract.ReadParams[uint64, common.Address, *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool]{ - Name: "hybrid-lock-release-usdc-token-pool:get-liquidity-provider", - Version: Version, - Description: "Gets the liquidity provider for a remote chain selector", - ContractType: ContractType, - NewContract: hybrid_lock_release_usdc_token_pool.NewHybridLockReleaseUSDCTokenPool, - CallContract: func(pool *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool, opts *bind.CallOpts, remoteChainSelector uint64) (common.Address, error) { - return pool.GetLiquidityProvider(opts, remoteChainSelector) +var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ + Name: "hybrid-lock-release-usdc-token-pool:deploy", + Version: Version, + Description: "Deploys the HybridLockReleaseUSDCTokenPool contract", + ContractMetadata: gobindings.HybridLockReleaseUSDCTokenPoolMetaData, + BytecodeByTypeAndVersion: map[string]contract.Bytecode{ + cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { + EVM: common.FromHex(gobindings.HybridLockReleaseUSDCTokenPoolMetaData.Bin), + }, }, }) -var ShouldUseLockRelease = contract.NewRead(contract.ReadParams[uint64, bool, *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool]{ - Name: "hybrid-lock-release-usdc-token-pool:should-use-lock-release", - Version: Version, - Description: "Returns whether a remote chain selector should use lock-release", - ContractType: ContractType, - NewContract: hybrid_lock_release_usdc_token_pool.NewHybridLockReleaseUSDCTokenPool, - CallContract: func(pool *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool, opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { - return pool.ShouldUseLockRelease(opts, remoteChainSelector) - }, -}) +func NewReadShouldUseLockRelease(c gobindings.HybridLockReleaseUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, bool, gobindings.HybridLockReleaseUSDCTokenPoolInterface]{ + Name: "hybrid-lock-release-usdc-token-pool:should-use-lock-release", + Version: Version, + Description: "Calls shouldUseLockRelease on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.HybridLockReleaseUSDCTokenPoolInterface, opts *bind.CallOpts, args uint64) (bool, error) { + return c.ShouldUseLockRelease(opts, args) + }, + }) +} -var WithdrawLiquidity = contract.NewWrite(contract.WriteParams[WithdrawLiquidityArgs, *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool]{ - Name: "hybrid-lock-release-usdc-token-pool:withdraw-liquidity", - Version: Version, - Description: "Withdraws liquidity for a remote chain selector", - ContractType: ContractType, - ContractABI: hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPoolABI, - NewContract: hybrid_lock_release_usdc_token_pool.NewHybridLockReleaseUSDCTokenPool, - IsAllowedCaller: contract.OnlyOwner[*hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool, WithdrawLiquidityArgs], - Validate: func(args WithdrawLiquidityArgs) error { - if args.Amount == nil || args.Amount.Sign() <= 0 { - return fmt.Errorf("amount must be greater than zero") - } - return nil - }, - CallContract: func(pool *hybrid_lock_release_usdc_token_pool.HybridLockReleaseUSDCTokenPool, opts *bind.TransactOpts, args WithdrawLiquidityArgs) (*types.Transaction, error) { - return pool.WithdrawLiquidity(opts, args.RemoteChainSelector, args.Amount) - }, -}) +func NewReadGetLockedTokensForChain(c gobindings.HybridLockReleaseUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], *big.Int, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, *big.Int, gobindings.HybridLockReleaseUSDCTokenPoolInterface]{ + Name: "hybrid-lock-release-usdc-token-pool:get-locked-tokens-for-chain", + Version: Version, + Description: "Calls getLockedTokensForChain on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.HybridLockReleaseUSDCTokenPoolInterface, opts *bind.CallOpts, args uint64) (*big.Int, error) { + return c.GetLockedTokensForChain(opts, args) + }, + }) +} + +func NewReadGetLiquidityProvider(c gobindings.HybridLockReleaseUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, common.Address, gobindings.HybridLockReleaseUSDCTokenPoolInterface]{ + Name: "hybrid-lock-release-usdc-token-pool:get-liquidity-provider", + Version: Version, + Description: "Calls getLiquidityProvider on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.HybridLockReleaseUSDCTokenPoolInterface, opts *bind.CallOpts, args uint64) (common.Address, error) { + return c.GetLiquidityProvider(opts, args) + }, + }) +} + +func NewWriteWithdrawLiquidity(c gobindings.HybridLockReleaseUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[WithdrawLiquidityArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[WithdrawLiquidityArgs, gobindings.HybridLockReleaseUSDCTokenPoolInterface]{ + Name: "hybrid-lock-release-usdc-token-pool:withdraw-liquidity", + Version: Version, + Description: "Calls withdrawLiquidity on the contract", + ContractType: ContractType, + ContractABI: gobindings.HybridLockReleaseUSDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.HybridLockReleaseUSDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args WithdrawLiquidityArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.HybridLockReleaseUSDCTokenPoolInterface, + opts *bind.TransactOpts, + args WithdrawLiquidityArgs, + ) (*types.Transaction, error) { + return c.WithdrawLiquidity(opts, args.RemoteChainSelector, args.Amount) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_3/operations/fee_quoter/fee_quoter.go b/chains/evm/deployment/v1_6_3/operations/fee_quoter/fee_quoter.go index ce93ce5cd4..ec6e71a9fe 100644 --- a/chains/evm/deployment/v1_6_3/operations/fee_quoter/fee_quoter.go +++ b/chains/evm/deployment/v1_6_3/operations/fee_quoter/fee_quoter.go @@ -3,429 +3,225 @@ package fee_quoter import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "FeeQuoter" var Version = semver.MustParse("1.6.3") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const FeeQuoterABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"},{"name":"tokenPriceStalenessThreshold","type":"uint32","internalType":"uint32"}]},{"name":"priceUpdaters","type":"address[]","internalType":"address[]"},{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"tokenPriceFeeds","type":"tuple[]","internalType":"struct FeeQuoter.TokenPriceFeedUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"feedConfig","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"premiumMultiplierWeiPerEthArgs","type":"tuple[]","internalType":"struct FeeQuoter.PremiumMultiplierWeiPerEthArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}]},{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}]}],"stateMutability":"nonpayable"},{"type":"function","name":"FEE_BASE_DECIMALS","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"KEYSTONE_PRICE_DECIMALS","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainConfigUpdates","inputs":[{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyFeeTokensUpdates","inputs":[{"name":"feeTokensToRemove","type":"address[]","internalType":"address[]"},{"name":"feeTokensToAdd","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyPremiumMultiplierWeiPerEthUpdates","inputs":[{"name":"premiumMultiplierWeiPerEthArgs","type":"tuple[]","internalType":"struct FeeQuoter.PremiumMultiplierWeiPerEthArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"tokensToUseDefaultFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigRemoveArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"convertTokenAmount","inputs":[{"name":"fromToken","type":"address","internalType":"address"},{"name":"fromTokenAmount","type":"uint256","internalType":"uint256"},{"name":"toToken","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getDestinationChainGasPrice","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getFeeTokens","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getPremiumMultiplierWeiPerEth","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"premiumMultiplierWeiPerEth","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"},{"name":"tokenPriceStalenessThreshold","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenAndGasPrices","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"tokenPrice","type":"uint224","internalType":"uint224"},{"name":"gasPriceValue","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"getTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenPriceFeedConfig","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenPrices","inputs":[{"name":"tokens","type":"address[]","internalType":"address[]"}],"outputs":[{"name":"","type":"tuple[]","internalType":"struct Internal.TimestampedPackedUint224[]","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getValidatedFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getValidatedTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"onReport","inputs":[{"name":"metadata","type":"bytes","internalType":"bytes"},{"name":"report","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"processMessageArgs","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"feeToken","type":"address","internalType":"address"},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"extraArgs","type":"bytes","internalType":"bytes"},{"name":"messageReceiver","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"isOutOfOrderExecution","type":"bool","internalType":"bool"},{"name":"convertedExtraArgs","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"processPoolReturnData","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampTokenTransfers","type":"tuple[]","internalType":"struct Internal.EVM2AnyTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"address","internalType":"address"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"destExecData","type":"bytes","internalType":"bytes"}]},{"name":"sourceTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"outputs":[{"name":"destExecDataPerToken","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"setReportPermissions","inputs":[{"name":"permissions","type":"tuple[]","internalType":"struct KeystoneFeedsPermissionHandler.Permission[]","components":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"isAllowed","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updatePrices","inputs":[{"name":"priceUpdates","type":"tuple","internalType":"struct Internal.PriceUpdates","components":[{"name":"tokenPriceUpdates","type":"tuple[]","internalType":"struct Internal.TokenPriceUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"usdPerToken","type":"uint224","internalType":"uint224"}]},{"name":"gasPriceUpdates","type":"tuple[]","internalType":"struct Internal.GasPriceUpdate[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"usdPerUnitGas","type":"uint224","internalType":"uint224"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateTokenPriceFeeds","inputs":[{"name":"tokenPriceFeedUpdates","type":"tuple[]","internalType":"struct FeeQuoter.TokenPriceFeedUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"feedConfig","type":"tuple","internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DestChainAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"anonymous":false},{"type":"event","name":"DestChainConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxNumberOfTokensPerMsg","type":"uint16","internalType":"uint16"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteHigh","type":"uint8","internalType":"uint8"},{"name":"destGasPerPayloadByteThreshold","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityOverheadGas","type":"uint32","internalType":"uint32"},{"name":"destGasPerDataAvailabilityByte","type":"uint16","internalType":"uint16"},{"name":"destDataAvailabilityMultiplierBps","type":"uint16","internalType":"uint16"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"enforceOutOfOrder","type":"bool","internalType":"bool"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasMultiplierWeiPerEth","type":"uint64","internalType":"uint64"},{"name":"gasPriceStalenessThreshold","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint32","internalType":"uint32"}]}],"anonymous":false},{"type":"event","name":"FeeTokenAdded","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FeeTokenRemoved","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PremiumMultiplierWeiPerEthUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"premiumMultiplierWeiPerEth","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"PriceFeedPerTokenUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"priceFeedConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.TokenPriceFeedConfig","components":[{"name":"dataFeedAddress","type":"address","internalType":"address"},{"name":"tokenDecimals","type":"uint8","internalType":"uint8"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"ReportPermissionSet","inputs":[{"name":"reportId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"permission","type":"tuple","indexed":false,"internalType":"struct KeystoneFeedsPermissionHandler.Permission","components":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"isAllowed","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"minFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"maxFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"deciBps","type":"uint16","internalType":"uint16"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"UsdPerTokenUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"UsdPerUnitGasUpdated","inputs":[{"name":"destChain","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"DataFeedValueOutOfUint224Range","inputs":[]},{"type":"error","name":"DestinationChainNotEnabled","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ExtraArgOutOfOrderExecutionMustBeTrue","inputs":[]},{"type":"error","name":"FeeTokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidChainFamilySelector","inputs":[{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidDestBytesOverhead","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidEVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidExtraArgsData","inputs":[]},{"type":"error","name":"InvalidExtraArgsTag","inputs":[]},{"type":"error","name":"InvalidFeeRange","inputs":[{"name":"minFeeUSDCents","type":"uint256","internalType":"uint256"},{"name":"maxFeeUSDCents","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidSVMExtraArgsWritableBitmap","inputs":[{"name":"accountIsWritableBitmap","type":"uint64","internalType":"uint64"},{"name":"numAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidStaticConfig","inputs":[]},{"type":"error","name":"InvalidTVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidTokenReceiver","inputs":[]},{"type":"error","name":"MessageComputeUnitLimitTooHigh","inputs":[]},{"type":"error","name":"MessageFeeTooHigh","inputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"maxFeeJuelsPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MessageGasLimitTooHigh","inputs":[]},{"type":"error","name":"MessageTooLarge","inputs":[{"name":"maxSize","type":"uint256","internalType":"uint256"},{"name":"actualSize","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReportForwarderUnauthorized","inputs":[{"name":"forwarder","type":"address","internalType":"address"},{"name":"workflowOwner","type":"address","internalType":"address"},{"name":"workflowName","type":"bytes10","internalType":"bytes10"},{"name":"reportName","type":"bytes2","internalType":"bytes2"}]},{"type":"error","name":"SourceTokenDataTooLarge","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"StaleGasPrice","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"threshold","type":"uint256","internalType":"uint256"},{"name":"timePassed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"TokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TooManySVMExtraArgsAccounts","inputs":[{"name":"numAccounts","type":"uint256","internalType":"uint256"},{"name":"maxAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"TooManySuiExtraArgsReceiverObjectIds","inputs":[{"name":"numReceiverObjectIds","type":"uint256","internalType":"uint256"},{"name":"maxReceiverObjectIds","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnsupportedNumberOfTokens","inputs":[{"name":"numberOfTokens","type":"uint256","internalType":"uint256"},{"name":"maxNumberOfTokensPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const FeeQuoterBin = "0x60e0604052346110b2576174a0803803806100198161131e565b92833981019080820361012081126110b2576060136110b25761003a6112e0565b81516001600160601b03811681036110b257815261005a60208301611343565b906020810191825261006e60408401611357565b6040820190815260608401516001600160401b0381116110b2578561009491860161137f565b60808501519094906001600160401b0381116110b257866100b691830161137f565b60a08201519096906001600160401b0381116110b25782019080601f830112156110b25781516100ed6100e882611368565b61131e565b9260208085848152019260071b820101908382116110b257602001915b81831061126b5750505060c08301516001600160401b0381116110b25783019781601f8a0112156110b2578851986101446100e88b611368565b996020808c838152019160051b830101918483116110b25760208101915b838310611109575050505060e08401516001600160401b0381116110b25784019382601f860112156110b257845161019c6100e882611368565b9560208088848152019260061b820101908582116110b257602001915b8183106110cd57505050610100810151906001600160401b0382116110b2570182601f820112156110b2578051906101f36100e883611368565b9360206102808187868152019402830101918183116110b257602001925b828410610ef057505050503315610edf57600180546001600160a01b031916331790556020986102408a61131e565b976000895260003681376102526112ff565b998a52888b8b015260005b89518110156102c4576001906001600160a01b0361027b828d611418565b51168d61028782611604565b610294575b50500161025d565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a1388d61028c565b508a985089519660005b885181101561033f576001600160a01b036102e9828b611418565b511690811561032e577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef8c8361032060019561158c565b50604051908152a1016102ce565b6342bcdf7f60e11b60005260046000fd5b5081518a985089906001600160a01b0316158015610ecd575b8015610ebe575b610ead5791516001600160a01b031660a05290516001600160601b03166080525163ffffffff1660c0526103928661131e565b9360008552600036813760005b855181101561040e576001906103c76001600160a01b036103c0838a611418565b5116611499565b6103d2575b0161039f565b818060a01b036103e28289611418565b51167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f91600080a26103cc565b508694508560005b84518110156104855760019061043e6001600160a01b036104378389611418565b51166115cb565b610449575b01610416565b818060a01b036104598288611418565b51167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23600080a2610443565b508593508460005b835181101561054757806104a360019286611418565b517fe6a7a17d710bf0b2cd05e5397dc6f97a5da4ee79e31e234bf5f965ee2bd9a5bf606089858060a01b038451169301518360005260078b5260406000209060ff878060a01b038251169283898060a01b03198254161781558d8301908151604082549501948460a81b8651151560a81b16918560a01b9060a01b169061ffff60a01b19161717905560405193845251168c8301525115156040820152a20161048d565b5091509160005b8251811015610b45576105618184611418565b51856001600160401b036105758487611418565b5151169101519080158015610b32575b8015610b14575b8015610a92575b610a7e57600081815260098852604090205460019392919060081b6001600160e01b03191661093657807f71e9302ab4e912a9678ae7f5a8542856706806f2817e1bf2a20b171e265cb4ad604051806106fc868291909161024063ffffffff8161026084019580511515855261ffff602082015116602086015282604082015116604086015282606082015116606086015282608082015116608086015260ff60a08201511660a086015260ff60c08201511660c086015261ffff60e08201511660e0860152826101008201511661010086015261ffff6101208201511661012086015261ffff610140820151166101408601528260e01b61016082015116610160860152610180810151151561018086015261ffff6101a0820151166101a0860152826101c0820151166101c0860152826101e0820151166101e086015260018060401b03610200820151166102008601528261022082015116610220860152015116910152565b0390a25b60005260098752826040600020825115158382549162ffff008c83015160081b169066ffffffff000000604084015160181b166affffffff00000000000000606085015160381b16926effffffff0000000000000000000000608086015160581b169260ff60781b60a087015160781b169460ff60801b60c088015160801b169161ffff60881b60e089015160881b169063ffffffff60981b6101008a015160981b169361ffff60b81b6101208b015160b81b169661ffff60c81b6101408c015160c81b169963ffffffff60d81b6101608d015160081c169b61018060ff60f81b910151151560f81b169c8f8060f81b039a63ffffffff60d81b199961ffff60c81b199861ffff60b81b199763ffffffff60981b199661ffff60881b199560ff60801b199460ff60781b19936effffffff0000000000000000000000199260ff6affffffff000000000000001992169066ffffffffffffff19161716171617161716171617161716171617161716179063ffffffff60d81b1617178155019061ffff6101a0820151169082549165ffffffff00006101c083015160101b169269ffffffff0000000000006101e084015160301b166a01000000000000000000008860901b0361020085015160501b169263ffffffff60901b61022086015160901b169461024063ffffffff60b01b91015160b01b169563ffffffff60b01b199363ffffffff60901b19926a01000000000000000000008c60901b0319918c8060501b03191617161716171617171790550161054e565b807f2431cc0363f2f66b21782c7e3d54dd9085927981a21bd0cc6be45a51b19689e360405180610a76868291909161024063ffffffff8161026084019580511515855261ffff602082015116602086015282604082015116604086015282606082015116606086015282608082015116608086015260ff60a08201511660a086015260ff60c08201511660c086015261ffff60e08201511660e0860152826101008201511661010086015261ffff6101208201511661012086015261ffff610140820151166101408601528260e01b61016082015116610160860152610180810151151561018086015261ffff6101a0820151166101a0860152826101c0820151166101c0860152826101e0820151166101e086015260018060401b03610200820151166102008601528261022082015116610220860152015116910152565b0390a2610700565b63c35aa79d60e01b60005260045260246000fd5b5063ffffffff60e01b61016083015116630a04b54b60e21b8114159081610b02575b81610af0575b81610ade575b81610acc575b50610593565b63647e2ba960e01b1415905088610ac6565b63c4e0595360e01b8114159150610ac0565b632b1dfffb60e21b8114159150610aba565b6307842f7160e21b8114159150610ab4565b5063ffffffff6101e08301511663ffffffff6060840151161061058c565b5063ffffffff6101e08301511615610585565b84828560005b8151811015610bcb576001906001600160a01b03610b698285611418565b5151167fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d86848060401b0381610b9f8689611418565b510151168360005260088252604060002081878060401b0319825416179055604051908152a201610b4b565b83600184610bd88361131e565b9060008252600092610ea8575b909282935b8251851015610de757610bfd8584611418565b5180516001600160401b0316939083019190855b83518051821015610dd657610c27828792611418565b51015184516001600160a01b0390610c40908490611418565b5151169063ffffffff815116908781019163ffffffff8351169081811015610dc15750506080810163ffffffff815116898110610daa575090899291838c52600a8a5260408c20600160a01b6001900386168d528a5260408c2092825163ffffffff169380549180518d1b67ffffffff0000000016916040860192835160401b69ffff000000000000000016966060810195865160501b6dffffffff00000000000000000000169063ffffffff60701b895160701b169260a001998b60ff60901b8c51151560901b169560ff60901b199363ffffffff60701b19926dffffffff000000000000000000001991600160501b60019003191617161716171617171790556040519586525163ffffffff168c8601525161ffff1660408501525163ffffffff1660608401525163ffffffff16608083015251151560a082015260c07f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b591a3600101610c11565b6312766e0160e11b8c52600485905260245260448bfd5b6305a7b3d160e11b8c5260045260245260448afd5b505060019096019593509050610bea565b9150825b8251811015610e69576001906001600160401b03610e098286611418565b515116828060a01b0384610e1d8488611418565b5101511690808752600a855260408720848060a01b038316885285528660408120557f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b8780a301610deb565b604051615e07908161169982396080518181816105a20152610bfc015260a0518181816105d80152610bad015260c0518181816105ff01526137680152f35b610be5565b63d794ef9560e01b60005260046000fd5b5063ffffffff8251161561035f565b5080516001600160601b031615610358565b639b15e16f60e01b60005260046000fd5b83820361028081126110b257610260610f076112ff565b91610f11876113f5565b8352601f1901126110b2576040519161026083016001600160401b038111848210176110b757604052610f46602087016113e8565b8352610f5460408701611409565b6020840152610f6560608701611357565b6040840152610f7660808701611357565b6060840152610f8760a08701611357565b6080840152610f9860c087016113da565b60a0840152610fa960e087016113da565b60c0840152610fbb6101008701611409565b60e0840152610fcd6101208701611357565b610100840152610fe06101408701611409565b610120840152610ff36101608701611409565b610140840152610180860151916001600160e01b0319831683036110b2578360209361016061028096015261102b6101a089016113e8565b61018082015261103e6101c08901611409565b6101a08201526110516101e08901611357565b6101c08201526110646102008901611357565b6101e082015261107761022089016113f5565b61020082015261108a6102408901611357565b61022082015261109d6102608901611357565b61024082015283820152815201930192610211565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040838703126110b25760206040916110e46112ff565b6110ed86611343565b81526110fa8387016113f5565b838201528152019201916101b9565b82516001600160401b0381116110b25782016040818803601f1901126110b2576111316112ff565b9061113e602082016113f5565b825260408101516001600160401b0381116110b257602091010187601f820112156110b25780516111716100e882611368565b91602060e08185858152019302820101908a82116110b257602001915b8183106111ad5750505091816020938480940152815201920191610162565b828b0360e081126110b25760c06111c26112ff565b916111cc86611343565b8352601f1901126110b2576040519160c08301916001600160401b038311848410176110b75760e093602093604052611206848801611357565b815261121460408801611357565b8482015261122460608801611409565b604082015261123560808801611357565b606082015261124660a08801611357565b608082015261125760c088016113e8565b60a08201528382015281520192019161118e565b828403608081126110b25760606112806112ff565b9161128a86611343565b8352601f1901126110b2576080916020916112a36112e0565b6112ae848801611343565b81526112bc604088016113da565b848201526112cc606088016113e8565b60408201528382015281520192019161010a565b60405190606082016001600160401b038111838210176110b757604052565b60408051919082016001600160401b038111838210176110b757604052565b6040519190601f01601f191682016001600160401b038111838210176110b757604052565b51906001600160a01b03821682036110b257565b519063ffffffff821682036110b257565b6001600160401b0381116110b75760051b60200190565b9080601f830112156110b25781516113996100e882611368565b9260208085848152019260051b8201019283116110b257602001905b8282106113c25750505090565b602080916113cf84611343565b8152019101906113b5565b519060ff821682036110b257565b519081151582036110b257565b51906001600160401b03821682036110b257565b519061ffff821682036110b257565b805182101561142c5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561142c5760005260206000200190600090565b805480156114835760001901906114718282611442565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b6000818152600c6020526040902054801561155a57600019810181811161154457600b54600019810191908211611544578181036114f3575b5050506114df600b61145a565b600052600c60205260006040812055600190565b61152c61150461151593600b611442565b90549060031b1c928392600b611442565b819391549060031b91821b91600019901b19161790565b9055600052600c6020526040600020553880806114d2565b634e487b7160e01b600052601160045260246000fd5b5050600090565b805490680100000000000000008210156110b7578161151591600161158894018155611442565b9055565b806000526003602052604060002054156000146115c5576115ae816002611561565b600254906000526003602052604060002055600190565b50600090565b80600052600c602052604060002054156000146115c5576115ed81600b611561565b600b5490600052600c602052604060002055600190565b600081815260036020526040902054801561155a576000198101818111611544576002546000198101919082116115445780820361165e575b50505061164a600261145a565b600052600360205260006040812055600190565b61168061166f611515936002611442565b90549060031b1c9283926002611442565b9055600052600360205260406000205538808061163d56fe6080604052600436101561001257600080fd5b60003560e01c806241e5be1461021657806301447eaa1461021157806301ffc9a71461020c578063061877e31461020757806306285c6914610202578063181f5a77146101fd5780632451a627146101f8578063325c868e146101f35780633937306f146101ee5780633a49bb49146101e957806341ed29e7146101e457806345ac924d146101df5780634ab35b0b146101da578063514e8cff146101d55780636def4ce7146101d0578063770e2dc4146101cb57806379ba5097146101c65780637afac322146101c1578063805f2132146101bc57806382b49eb0146101b757806387b8d879146101b25780638da5cb5b146101ad57806391a2749a146101a8578063a69c64c0146101a3578063bf78e03f1461019e578063cdc73d5114610199578063d02641a014610194578063d63d3af21461018f578063d8694ccd1461018a578063f2fde38b14610185578063fbe3f778146101805763ffdb4b371461017b57600080fd5b6125ed565b6124f0565b612434565b612001565b611fe5565b611f9c565b611f25565b611e7f565b611dc6565b611d32565b611d0b565b611aef565b611972565b6116d7565b61159e565b611486565b611285565b611106565b610f47565b610f0f565b610e46565b610cb1565b610b3b565b610861565b610845565b6107c2565b610720565b610566565b61051e565b610464565b6103b0565b61023e565b6001600160a01b0381160361022c57565b600080fd5b359061023c8261021b565b565b3461022c57606060031936011261022c5760206102756004356102608161021b565b602435604435916102708361021b565b612781565b604051908152f35b6004359067ffffffffffffffff8216820361022c57565b6024359067ffffffffffffffff8216820361022c57565b359067ffffffffffffffff8216820361022c57565b9181601f8401121561022c5782359167ffffffffffffffff831161022c576020808501948460051b01011161022c57565b919082519283825260005b84811061031d575050601f19601f8460006020809697860101520116010190565b806020809284010151828286010152016102fc565b602081016020825282518091526040820191602060408360051b8301019401926000915b83831061036557505050505090565b90919293946020806103a1837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0866001960301875289516102f1565b97019301930191939290610356565b3461022c57606060031936011261022c576103c961027d565b60243567ffffffffffffffff811161022c576103e99036906004016102c0565b6044929192359167ffffffffffffffff831161022c573660238401121561022c5782600401359167ffffffffffffffff831161022c573660248460061b8601011161022c5761044b94602461043f950192612958565b60405191829182610332565b0390f35b35906001600160e01b03198216820361022c57565b3461022c57602060031936011261022c576004356001600160e01b0319811680910361022c57807f805f213200000000000000000000000000000000000000000000000000000000602092149081156104f4575b81156104ca575b506040519015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386104bf565b7f66792e8000000000000000000000000000000000000000000000000000000000811491506104b8565b3461022c57602060031936011261022c576001600160a01b036004356105438161021b565b166000526008602052602067ffffffffffffffff60406000205416604051908152f35b3461022c57600060031936011261022c5761057f612b71565b50606060405161058e8161064d565b63ffffffff6bffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016918281526001600160a01b0360406020830192827f00000000000000000000000000000000000000000000000000000000000000001684520191837f00000000000000000000000000000000000000000000000000000000000000001683526040519485525116602084015251166040820152f35b634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff82111761066957604052565b610637565b60a0810190811067ffffffffffffffff82111761066957604052565b6040810190811067ffffffffffffffff82111761066957604052565b60c0810190811067ffffffffffffffff82111761066957604052565b6080810190811067ffffffffffffffff82111761066957604052565b90601f601f19910116810190811067ffffffffffffffff82111761066957604052565b6040519061023c6040836106de565b6040519061023c610260836106de565b3461022c57600060031936011261022c5761044b604080519061074381836106de565b600f82527f46656551756f74657220312e362e3300000000000000000000000000000000006020830152519182916020835260208301906102f1565b602060408183019282815284518094520192019060005b8181106107a35750505090565b82516001600160a01b0316845260209384019390920191600101610796565b3461022c57600060031936011261022c5760405180602060025491828152019060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b81811061082f5761044b85610823818703826106de565b6040519182918261077f565b825484526020909301926001928301920161080c565b3461022c57600060031936011261022c57602060405160248152f35b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c5780600401906040600319823603011261022c5761089f613bee565b6108a98280612b90565b4263ffffffff1692915060005b818110610a02575050602401906108cd8284612b90565b92905060005b8381106108dc57005b806108fb6108f66001936108f0868a612b90565b90612811565b612c11565b7fdd84a3fa9ef9409f550d54d6affec7e9c480c878c6ab27b78912a03e1b371c6e67ffffffffffffffff6109de6109d060208501946109c261094487516001600160e01b031690565b61095e61094f610701565b6001600160e01b039092168252565b63ffffffff8c16602082015261099961097f845167ffffffffffffffff1690565b67ffffffffffffffff166000526005602052604060002090565b815160209092015160e01b6001600160e01b0319166001600160e01b0392909216919091179055565b5167ffffffffffffffff1690565b93516001600160e01b031690565b604080516001600160e01b039290921682524260208301529190931692a2016108d3565b80610a1b610a166001936108f08980612b90565b612bda565b7f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a6001600160a01b03610ab46109d06020850194610aa7610a6387516001600160e01b031690565b610a6e61094f610701565b63ffffffff8d166020820152610999610a8e84516001600160a01b031690565b6001600160a01b03166000526006602052604060002090565b516001600160a01b031690565b604080516001600160e01b039290921682524260208301529190931692a2016108b6565b9181601f8401121561022c5782359167ffffffffffffffff831161022c576020838186019501011161022c57565b92610b389492610b2a928552151560208501526080604085015260808401906102f1565b9160608184039101526102f1565b90565b3461022c5760a060031936011261022c57610b5461027d565b60243590610b618261021b565b6044359160643567ffffffffffffffff811161022c57610b85903690600401610ad8565b93909160843567ffffffffffffffff811161022c57610ba8903690600401610ad8565b9290917f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0382166001600160a01b03821614600014610c74575050935b6bffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016808611610c43575091610c34939161044b9693613c32565b90939160405194859485610b06565b857f6a92a4830000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b91610c7e92612781565b93610bed565b67ffffffffffffffff81116106695760051b60200190565b8015150361022c57565b359061023c82610c9c565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590610cee82610c84565b90610cfc60405192836106de565b828252602460a06020840194028201019036821161022c57602401925b818410610d2b57610d2983612c36565b005b60a08436031261022c5760405190610d428261066e565b8435610d4d8161021b565b825260208501357fffffffffffffffffffff000000000000000000000000000000000000000000008116810361022c5760208301526040850135907fffff0000000000000000000000000000000000000000000000000000000000008216820361022c5782602092604060a0950152610dc860608801610231565b6060820152610dd960808801610ca6565b6080820152815201930192610d19565b602060408183019282815284518094520192019060005b818110610e0d5750505090565b9091926020604082610e3b600194885163ffffffff602080926001600160e01b038151168552015116910152565b019401929101610e00565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c57610e779036906004016102c0565b610e8081610c84565b91610e8e60405193846106de565b818352601f19610e9d83610c84565b0160005b818110610ef857505060005b82811015610eea57600190610ece610ec98260051b8501612826565b613714565b610ed88287612944565b52610ee38186612944565b5001610ead565b6040518061044b8682610de9565b602090610f03612d76565b82828801015201610ea1565b3461022c57602060031936011261022c576020610f36600435610f318161021b565b613a02565b6001600160e01b0360405191168152f35b3461022c57602060031936011261022c5767ffffffffffffffff610f6961027d565b610f71612d76565b50166000526005602052604060002060405190610f8d8261068a565b546001600160e01b038116825260e01c6020820152604051809161044b82604081019263ffffffff602080926001600160e01b038151168552015116910152565b61023c9092919261024080610260830195610feb84825115159052565b60208181015161ffff169085015260408181015163ffffffff169085015260608181015163ffffffff169085015260808181015163ffffffff169085015260a08181015160ff169085015260c08181015160ff169085015260e08181015161ffff16908501526101008181015163ffffffff16908501526101208181015161ffff16908501526101408181015161ffff1690850152610160818101516001600160e01b03191690850152610180818101511515908501526101a08181015161ffff16908501526101c08181015163ffffffff16908501526101e08181015163ffffffff16908501526102008181015167ffffffffffffffff16908501526102208181015163ffffffff1690850152015163ffffffff16910152565b3461022c57602060031936011261022c5761044b6111c96111c461112861027d565b6000610240611135610710565b8281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e08201528261010082015282610120820152826101408201528261016082015282610180820152826101a0820152826101c0820152826101e08201528261020082015282610220820152015267ffffffffffffffff166000526009602052604060002090565b612db4565b60405191829182610fce565b359063ffffffff8216820361022c57565b359061ffff8216820361022c57565b81601f8201121561022c5780359061120c82610c84565b9261121a60405194856106de565b82845260208085019360061b8301019181831161022c57602001925b828410611244575050505090565b60408483031261022c576020604091825161125e8161068a565b611267876102ab565b8152828701356112768161021b565b83820152815201930192611236565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c5780600401356112c181610c84565b916112cf60405193846106de565b8183526024602084019260051b8201019036821161022c5760248101925b82841061131e576024358567ffffffffffffffff821161022c57611318610d299236906004016111f5565b90612f0a565b833567ffffffffffffffff811161022c5782016040602319823603011261022c576040519061134c8261068a565b611358602482016102ab565b8252604481013567ffffffffffffffff811161022c57602491010136601f8201121561022c57803561138981610c84565b9161139760405193846106de565b818352602060e081850193028201019036821161022c57602001915b8183106113d257505050918160209384809401528152019301926112ed565b82360360e0811261022c5760c0601f19604051926113ef8461068a565b86356113fa8161021b565b8452011261022c5760e091602091604051611414816106a6565b61141f8488016111d5565b815261142d604088016111d5565b8482015261143d606088016111e6565b604082015261144e608088016111d5565b606082015261145f60a088016111d5565b608082015260c087013561147281610c9c565b60a0820152838201528152019201916113b3565b3461022c57600060031936011261022c576000546001600160a01b038116330361150d577fffffffffffffffffffffffff0000000000000000000000000000000000000000600154913382841617600155166000556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b9080601f8301121561022c57813561154e81610c84565b9261155c60405194856106de565b81845260208085019260051b82010192831161022c57602001905b8282106115845750505090565b6020809183356115938161021b565b815201910190611577565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c576115cf903690600401611537565b60243567ffffffffffffffff811161022c576115ef903690600401611537565b906115f8613e27565b60005b8151811015611667578061161c611617610aa760019486612944565b615b03565b611627575b016115fb565b6001600160a01b0361163c610aa78386612944565b167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f91600080a2611621565b8260005b8151811015610d29578061168c611687610aa760019486612944565b615b17565b611697575b0161166b565b6001600160a01b036116ac610aa78386612944565b167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23600080a2611691565b3461022c57604060031936011261022c5760043567ffffffffffffffff811161022c57611708903690600401610ad8565b6024359167ffffffffffffffff831161022c5761176161175961173f611735611769963690600401610ad8565b94909536916128a3565b90604082015190605e604a84015160601c93015191929190565b919033613fb9565b8101906131b9565b60005b8151811015610d29576117b46117af6117966117888486612944565b51516001600160a01b031690565b6001600160a01b03166000526007602052604060002090565b613278565b6117c86117c46040830151151590565b1590565b61192957906118136117e06020600194015160ff1690565b61180d61180160206117f28689612944565b5101516001600160e01b031690565b6001600160e01b031690565b9061408b565b61182e60406118228487612944565b51015163ffffffff1690565b63ffffffff611859611850611849610a8e611788888b612944565b5460e01c90565b63ffffffff1690565b911610611923576118a761187260406118228588612944565b61189761187d610701565b6001600160e01b03851681529163ffffffff166020830152565b610999610a8e6117888689612944565b7f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a6001600160a01b036118dd6117888588612944565b6119196118ef6040611822888b612944565b60405193849316958390929163ffffffff6020916001600160e01b03604085019616845216910152565b0390a25b0161176c565b5061191d565b61196e6119396117888486612944565b7f06439c6b000000000000000000000000000000000000000000000000000000006000526001600160a01b0316600452602490565b6000fd5b3461022c57604060031936011261022c5761044b6119fa61199161027d565b67ffffffffffffffff602435916119a78361021b565b600060a06040516119b7816106a6565b828152826020820152826040820152826060820152826080820152015216600052600a6020526040600020906001600160a01b0316600052602052604060002090565b611a76611a6d60405192611a0d846106a6565b5463ffffffff8116845263ffffffff8160201c16602085015261ffff8160401c166040850152611a54611a478263ffffffff9060501c1690565b63ffffffff166060860152565b63ffffffff607082901c16608085015260901c60ff1690565b151560a0830152565b6040519182918291909160a08060c083019463ffffffff815116845263ffffffff602082015116602085015261ffff604082015116604085015263ffffffff606082015116606085015263ffffffff608082015116608085015201511515910152565b60ff81160361022c57565b359061023c82611ad9565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590611b2c82610c84565b90611b3a60405192836106de565b82825260246102806020840194028201019036821161022c57602401925b818410611b6857610d29836132ae565b833603610280811261022c57610260601f1960405192611b878461068a565b611b90886102ab565b8452011261022c5761028091602091611ba7610710565b611bb2848901610ca6565b8152611bc0604089016111e6565b84820152611bd0606089016111d5565b6040820152611be1608089016111d5565b6060820152611bf260a089016111d5565b6080820152611c0360c08901611ae4565b60a0820152611c1460e08901611ae4565b60c0820152611c2661010089016111e6565b60e0820152611c3861012089016111d5565b610100820152611c4b61014089016111e6565b610120820152611c5e61016089016111e6565b610140820152611c71610180890161044f565b610160820152611c846101a08901610ca6565b610180820152611c976101c089016111e6565b6101a0820152611caa6101e089016111d5565b6101c0820152611cbd61020089016111d5565b6101e0820152611cd061022089016102ab565b610200820152611ce361024089016111d5565b610220820152611cf661026089016111d5565b61024082015283820152815201930192611b58565b3461022c57600060031936011261022c5760206001600160a01b0360015416604051908152f35b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c576040600319823603011261022c57604051611d6f8161068a565b816004013567ffffffffffffffff811161022c57611d939060043691850101611537565b8152602482013567ffffffffffffffff811161022c57610d29926004611dbc9236920101611537565b60208201526134e6565b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c57806004013590611e0382610c84565b90611e1160405192836106de565b8282526024602083019360061b8201019036821161022c57602401925b818410611e3e57610d2983613638565b60408436031261022c5760206040918251611e588161068a565b8635611e638161021b565b8152611e708388016102ab565b83820152815201930192611e2e565b3461022c57602060031936011261022c576001600160a01b03600435611ea48161021b565b611eac612b71565b5016600052600760205261044b604060002060ff60405191611ecd8361064d565b546001600160a01b0381168352818160a01c16602084015260a81c16151560408201526040519182918291909160408060608301946001600160a01b03815116845260ff602082015116602085015201511515910152565b3461022c57600060031936011261022c57604051806020600b54918281520190600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db99060005b818110611f865761044b85610823818703826106de565b8254845260209093019260019283019201611f6f565b3461022c57602060031936011261022c576040611fbe600435610ec98161021b565b611fe38251809263ffffffff602080926001600160e01b038151168552015116910152565bf35b3461022c57600060031936011261022c57602060405160128152f35b3461022c57604060031936011261022c5761201a61027d565b60243567ffffffffffffffff811161022c578060040160a0600319833603011261022c5761205f6111c48467ffffffffffffffff166000526009602052604060002090565b9161206d6117c48451151590565b6123fc57606481016120a36117c461208483612826565b6001600160a01b03166000526001600b01602052604060002054151590565b6123bb578390604483016120b78186612b90565b9590506120c581858a61496a565b926120d2610f3182612826565b9788936120f06120ea61022084015163ffffffff1690565b8c614f9e565b9a6000808b1561238257505061218861215561ffff8561217a99612161999896612195966121396101c061212d6101a061219b9d015161ffff1690565b95015163ffffffff1690565b61214c6121458b612826565b938d612b90565b9690951661508f565b98919897909894612826565b6001600160a01b03166000526008602052604060002090565b5467ffffffffffffffff1690565b67ffffffffffffffff1690565b9061274e565b9560009761ffff6121b261014089015161ffff1690565b16612324575b509461219561218861020061228a61044b9d6dffffffffffffffffffffffffffff6122826122a29f9e9b61227d6001600160e01b039f9b9c61229a9f61227d9e63ffffffff61221161227d9f602461221b950190612870565b929050169061385a565b908b60a0810161223e612238612232835160ff1690565b60ff1690565b8561274e565b9360e0830191612250835161ffff1690565b9061ffff821683116122b2575b505050506080015161227d916118509163ffffffff16613898565b613898565b61385a565b91169061274e565b93015167ffffffffffffffff1690565b911690612761565b6040519081529081906020820190565b61185094965061227d959361ffff612313612302612278966122fc6122f56122ec60809960ff6122e661231a9b5160ff1690565b16613867565b965161ffff1690565b61ffff1690565b90613707565b61219561223260c08d015160ff1690565b911661385a565b959383955061225d565b9095949897508261234a8b989495986dffffffffffffffffffffffffffff9060701c1690565b6dffffffffffffffffffffffffffff16916123686024890185612870565b90506123749388615294565b9697939438969392966121b8565b9594925095505061219561218861217a6121616123b56123b061185061024061219b99015163ffffffff1690565b6126c3565b94612826565b6123c761196e91612826565b7f2502348c000000000000000000000000000000000000000000000000000000006000526001600160a01b0316600452602490565b7f99ac52f20000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff841660045260246000fd5b3461022c57602060031936011261022c576001600160a01b036004356124598161021b565b612461613e27565b163381146124c657807fffffffffffffffffffffffff000000000000000000000000000000000000000060005416176000556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461022c57602060031936011261022c5760043567ffffffffffffffff811161022c573660238201121561022c5780600401359061252d82610c84565b9061253b60405192836106de565b8282526024602083019360071b8201019036821161022c57602401925b81841061256857610d29836138b2565b8336036080811261022c576060601f19604051926125858461068a565b87356125908161021b565b8452011261022c576080916020916040516125aa8161064d565b838801356125b78161021b565b815260408801356125c781611ad9565b8482015260608801356125d981610c9c565b604082015283820152815201930192612558565b3461022c57604060031936011261022c5760043561260a8161021b565b612612610294565b9067ffffffffffffffff82169182600052600960205260ff604060002054161561267f5761264261266392613a02565b92600052600960205263ffffffff60016040600020015460901c1690614f9e565b604080516001600160e01b039384168152919092166020820152f35b827f99ac52f20000000000000000000000000000000000000000000000000000000060005260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b90662386f26fc10000820291808304662386f26fc1000014901517156126e557565b6126ad565b908160051b91808304602014901517156126e557565b9061012c82029180830461012c14901517156126e557565b90606c820291808304606c14901517156126e557565b90655af3107a4000820291808304655af3107a400014901517156126e557565b818102929181159184041417156126e557565b811561276b570490565b634e487b7160e01b600052601260045260246000fd5b6127ab6127a5610b3894936001600160e01b0361279e8195613a02565b169061274e565b92613a02565b1690612761565b906127bc82610c84565b6127c960405191826106de565b828152601f196127d98294610c84565b019060005b8281106127ea57505050565b8060606020809385010152016127de565b634e487b7160e01b600052603260045260246000fd5b91908110156128215760061b0190565b6127fb565b35610b388161021b565b91908110156128215760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618136030182121561022c570190565b903590601e198136030182121561022c570180359067ffffffffffffffff821161022c5760200191813603831361022c57565b92919267ffffffffffffffff821161066957604051916128cd601f8201601f1916602001846106de565b82948184528183011161022c578281602093846000960137010152565b9061023c6040516128fa816106a6565b925463ffffffff8082168552602082811c821690860152604082811c61ffff1690860152605082901c81166060860152607082901c16608085015260901c60ff16151560a0840152565b80518210156128215760209160051b010190565b90929161298d61297c8367ffffffffffffffff166000526009602052604060002090565b5460081b6001600160e01b03191690565b90612997816127b2565b9560005b8281106129ac575050505050505090565b6129bf6129ba828489612811565b612826565b83886129d96129cf858484612830565b6040810190612870565b905060208111612af6575b508392612a1a612a14612a0d612a03600198612a5597612a5097612830565b6020810190612870565b36916128a3565b89613a7a565b612a388967ffffffffffffffff16600052600a602052604060002090565b906001600160a01b0316600052602052604060002090565b6128ea565b60a081015115612aba57612a9e612a766060612a9093015163ffffffff1690565b6040805163ffffffff909216602083015290928391820190565b03601f1981018352826106de565b612aa8828b612944565b52612ab3818a612944565b500161299b565b50612a90612a9e612af184612ae38a67ffffffffffffffff166000526009602052604060002090565b015460101c63ffffffff1690565b612a76565b915050612b2e611850612b2184612a388b67ffffffffffffffff16600052600a602052604060002090565b5460701c63ffffffff1690565b10612b3b578388386129e4565b7f36f536ca000000000000000000000000000000000000000000000000000000006000526001600160a01b031660045260246000fd5b60405190612b7e8261064d565b60006040838281528260208201520152565b903590601e198136030182121561022c570180359067ffffffffffffffff821161022c57602001918160061b3603831361022c57565b35906001600160e01b038216820361022c57565b60408136031261022c57612c09602060405192612bf68461068a565b8035612c018161021b565b845201612bc6565b602082015290565b60408136031261022c57612c09602060405192612c2d8461068a565b612c01816102ab565b90612c3f613e27565b60005b8251811015612d715780612c5860019285612944565b517f32a4ba3fa3351b11ad555d4c8ec70a744e8705607077a946807030d64b6ab1a360a06001600160a01b038351169260608101936001600160a01b0380865116957fffff000000000000000000000000000000000000000000000000000000000000612cf660208601947fffffffffffffffffffff00000000000000000000000000000000000000000000865116604088019a848c511692615a7f565b977fffffffffffffffffffff000000000000000000000000000000000000000000006080870195612d44875115158c600052600460205260406000209060ff60ff1983541691151516179055565b8560405198511688525116602087015251166040850152511660608301525115156080820152a201612c42565b509050565b60405190612d838261068a565b60006020838281520152565b90604051612d9c8161068a565b91546001600160e01b038116835260e01c6020830152565b9061023c612efc6001612dc5610710565b94612e9b612e918254612de1612ddb8260ff1690565b15158a52565b61ffff600882901c1660208a015263ffffffff601882901c1660408a015263ffffffff603882901c1660608a015263ffffffff605882901c1660808a015260ff607882901c1660a08a015260ff608082901c1660c08a015261ffff608882901c1660e08a015263ffffffff609882901c166101008a015261ffff60b882901c166101208a015261ffff60c882901c166101408a01526001600160e01b0319600882901b166101608a015260f81c90565b1515610180880152565b015461ffff81166101a086015263ffffffff601082901c166101c086015263ffffffff603082901c166101e086015267ffffffffffffffff605082901c1661020086015263ffffffff609082901c1661022086015260b01c63ffffffff1690565b63ffffffff16610240840152565b90612f13613e27565b6000915b805183101561310557612f2a8382612944565b5190612f3e825167ffffffffffffffff1690565b946020600093019367ffffffffffffffff8716935b855180518210156130f057612f6a82602092612944565b510151612f7b611788838951612944565b8151602083015163ffffffff9081169116818110156130b7575050608082015163ffffffff1660208110613076575090867f94967ae9ea7729ad4f54021c1981765d2b1d954f7c92fbec340aa0a54f46b8b56001600160a01b0384613005858f60019998612a386130009267ffffffffffffffff16600052600a602052604060002090565b613e65565b61306d60405192839216958291909160a08060c083019463ffffffff815116845263ffffffff602082015116602085015261ffff604082015116604085015263ffffffff606082015116606085015263ffffffff608082015116608085015201511515910152565b0390a301612f53565b7f24ecdc02000000000000000000000000000000000000000000000000000000006000526001600160a01b0390911660045263ffffffff1660245260446000fd5b7f0b4f67a20000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b50509550925092600191500191929092612f17565b50905060005b81518110156131b5578061313361312460019385612944565b515167ffffffffffffffff1690565b67ffffffffffffffff6001600160a01b0361316260206131538689612944565b5101516001600160a01b031690565b600061318682612a388767ffffffffffffffff16600052600a602052604060002090565b551691167f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b600080a30161310b565b5050565b60208183031261022c5780359067ffffffffffffffff821161022c570181601f8201121561022c578035906131ed82610c84565b926131fb60405194856106de565b8284526020606081860194028301019181831161022c57602001925b828410613225575050505090565b60608483031261022c5760206060916040516132408161064d565b863561324b8161021b565b8152613258838801612bc6565b83820152613268604088016111d5565b6040820152815201930192613217565b906040516132858161064d565b604060ff8294546001600160a01b0381168452818160a01c16602085015260a81c161515910152565b906132b7613e27565b60005b8251811015612d71576132cd8184612944565b5160206132dd6131248487612944565b9101519067ffffffffffffffff8116801580156134c7575b8015613499575b8015613406575b6133ce5791613394826001959461334461333761297c6133999767ffffffffffffffff166000526009602052604060002090565b6001600160e01b03191690565b61339f577f71e9302ab4e912a9678ae7f5a8542856706806f2817e1bf2a20b171e265cb4ad604051806133778782610fce565b0390a267ffffffffffffffff166000526009602052604060002090565b61415c565b016132ba565b7f2431cc0363f2f66b21782c7e3d54dd9085927981a21bd0cc6be45a51b19689e3604051806133778782610fce565b7fc35aa79d0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff821660045260246000fd5b506001600160e01b03196134266101608501516001600160e01b03191690565b16630a04b54b60e21b8114159081613487575b81613475575b81613463575b81613451575b50613303565b63647e2ba960e01b915014153861344b565b63c4e0595360e01b8114159150613445565b632b1dfffb60e21b811415915061343f565b6307842f7160e21b8114159150613439565b506101e083015163ffffffff1663ffffffff6134bf611850606087015163ffffffff1690565b9116116132fc565b5063ffffffff6134df6101e085015163ffffffff1690565b16156132f5565b6134ee613e27565b60208101519160005b835181101561357b5780613510610aa760019387612944565b61353261352d6001600160a01b0383165b6001600160a01b031690565b615d6f565b61353e575b50016134f7565b6040516001600160a01b039190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a138613537565b5091505160005b81518110156131b557613598610aa78284612944565b906001600160a01b0382161561360e577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef613605836135ea6135e56135216001976001600160a01b031690565b615cf6565b506040516001600160a01b0390911681529081906020820190565b0390a101613582565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b613640613e27565b60005b81518110156131b557806001600160a01b0361366160019385612944565b5151167fbb77da6f7210cdd16904228a9360133d1d7dfff99b1bc75f128da5b53e28f97d6136fe67ffffffffffffffff602061369d8689612944565b51015116836000526008602052604060002067ffffffffffffffff82167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008254161790556040519182918291909167ffffffffffffffff6020820193169052565b0390a201613643565b919082039182116126e557565b61371c612d76565b5061374261373d826001600160a01b03166000526006602052604060002090565b612d8f565b602081019161376161375b611850855163ffffffff1690565b42613707565b63ffffffff7f00000000000000000000000000000000000000000000000000000000000000001611613809576117af6137ad916001600160a01b03166000526007602052604060002090565b6137bd6117c46040830151151590565b801561380f575b613809576137d1906147f4565b9163ffffffff6137f96118506137ee602087015163ffffffff1690565b935163ffffffff1690565b911610613804575090565b905090565b50905090565b506001600160a01b0361382982516001600160a01b031690565b16156137c4565b90600282018092116126e557565b90602082018092116126e557565b90600182018092116126e557565b919082018092116126e557565b9061ffff8091169116029061ffff82169182036126e557565b63ffffffff60209116019063ffffffff82116126e557565b9063ffffffff8091169116019063ffffffff82116126e557565b906138bb613e27565b60005b8251811015612d7157806138d460019285612944565b517fe6a7a17d710bf0b2cd05e5397dc6f97a5da4ee79e31e234bf5f965ee2bd9a5bf6139f960206001600160a01b0384511693015183600052600760205260406000206139596001600160a01b0383511682906001600160a01b03167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b602082015181547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff74ff000000000000000000000000000000000000000075ff0000000000000000000000000000000000000000006040870151151560a81b169360a01b169116171790556040519182918291909160408060608301946001600160a01b03815116845260ff602082015116602085015201511515910152565b0390a2016138be565b613a0b81613714565b9063ffffffff602083015116158015613a68575b613a315750516001600160e01b031690565b6001600160a01b03907f06439c6b000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b506001600160e01b0382511615613a1f565b6001600160e01b0319169190630a04b54b60e21b8314613b14576307842f7160e21b8314613b0657632b1dfffb60e21b8314613afb5763647e2ba960e01b8314613af05763c4e0595360e01b8314613ae15782632ee8207560e01b60005260045260246000fd5b61023c91925061dee99061542a565b61023c91925061548b565b61023c9192506153c7565b61023c91925060019061542a565b61023c919250615348565b916001600160e01b03198316630a04b54b60e21b8114613be2576307842f7160e21b8114613bc257632b1dfffb60e21b8114613bb65763647e2ba960e01b8114613baa5763c4e0595360e01b14613b8f57632ee8207560e01b6000526001600160e01b0319831660045260246000fd5b61023c925015613ba25761dee99061542a565b60009061542a565b505061023c915061548b565b505061023c91506153c7565b5061023c925015613bd95760ff60015b169061542a565b60ff6000613bd2565b505061023c9150615348565b33600052600360205260406000205415613c0457565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6111c4613c599196949395929667ffffffffffffffff166000526009602052604060002090565b946101608601946001600160e01b0319613c7b87516001600160e01b03191690565b16630a04b54b60e21b8114908115613e16575b8115613e05575b50613dc057505063c4e0595360e01b6001600160e01b0319613cbf86516001600160e01b03191690565b1614613d89576307842f7160e21b6001600160e01b0319613ce886516001600160e01b03191690565b1614613d205761196e613d0385516001600160e01b03191690565b632ee8207560e01b6000526001600160e01b031916600452602490565b613d749350612a0d6060613d5e8763ffffffff613d55610180613d4d86613d829b9d015163ffffffff1690565b930151151590565b911685876159b6565b0151604051958691602083019190602083019252565b03601f1981018652856106de565b9160019190565b613d749350612a0d6040613d5e8763ffffffff613db7610180613d4d6060613d829b9d015163ffffffff1690565b911685876157ba565b94509491613de691613de06118506101e0610b3896015163ffffffff1690565b91615568565b93613dfd6020613df587615671565b960151151590565b9336916128a3565b63647e2ba960e01b91501438613c95565b632b1dfffb60e21b81149150613c8e565b6001600160a01b03600154163303613e3b57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b815181546020808501516040808701517fffffffffffffffffffffffffffffffffffffffffffff0000000000000000000090941663ffffffff958616179190921b67ffffffff00000000161791901b69ffff000000000000000016178255606083015161023c93613f759260a092613f17911685547fffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffff1660509190911b6dffffffff0000000000000000000016178555565b613f6e613f2b608083015163ffffffff1690565b85547fffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffff1660709190911b71ffffffff000000000000000000000000000016178555565b0151151590565b81547fffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffff1690151560901b72ff00000000000000000000000000000000000016179055565b91929092613fc982828686615a7f565b600052600460205260ff6040600020541615613fe55750505050565b6040517f097e17ff0000000000000000000000000000000000000000000000000000000081526001600160a01b0393841660048201529390921660248401527fffffffffffffffffffff0000000000000000000000000000000000000000000090911660448301527fffff000000000000000000000000000000000000000000000000000000000000166064820152608490fd5b0390fd5b604d81116126e557600a0a90565b60ff1660120160ff81116126e55760ff169060248211156141085760231982019182116126e5576140be6140c49261407d565b90612761565b6001600160e01b0381116140de576001600160e01b031690565b7f10cb51d10000000000000000000000000000000000000000000000000000000060005260046000fd5b9060240390602482116126e5576121956141219261407d565b6140c4565b9060ff80911691160160ff81116126e55760ff169060248211156141085760231982019182116126e5576140be6140c49261407d565b90614740610240600161023c946141896141768651151590565b829060ff60ff1983541691151516179055565b6141cf61419b602087015161ffff1690565b82547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff1660089190911b62ffff0016178255565b61421b6141e3604087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffff1660189190911b66ffffffff00000016178255565b61426b61422f606087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffff1660389190911b6affffffff0000000000000016178255565b6142bf61427f608087015163ffffffff1690565b82547fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff1660589190911b6effffffff000000000000000000000016178255565b6143116142d060a087015160ff1690565b82547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff1660789190911b6fff00000000000000000000000000000016178255565b61436461432260c087015160ff1690565b82547fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff1660809190911b70ff0000000000000000000000000000000016178255565b6143ba61437660e087015161ffff1690565b82547fffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffff1660889190911b72ffff000000000000000000000000000000000016178255565b6144176143cf61010087015163ffffffff1690565b82547fffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffff1660989190911b76ffffffff0000000000000000000000000000000000000016178255565b61447461442a61012087015161ffff1690565b82547fffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffff1660b89190911b78ffff000000000000000000000000000000000000000000000016178255565b6144d361448761014087015161ffff1690565b82547fffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffff1660c89190911b7affff0000000000000000000000000000000000000000000000000016178255565b61453c6144ec6101608701516001600160e01b03191690565b82547fff00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffff1660089190911c7effffffff00000000000000000000000000000000000000000000000000000016178255565b61459d61454d610180870151151590565b82547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690151560f81b7fff0000000000000000000000000000000000000000000000000000000000000016178255565b01926145e16145b26101a083015161ffff1690565b859061ffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000825416179055565b61462d6145f66101c083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff1660109190911b65ffffffff000016178555565b61467d6146426101e083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffffff1660309190911b69ffffffff00000000000016178555565b6146d961469661020083015167ffffffffffffffff1690565b85547fffffffffffffffffffffffffffff0000000000000000ffffffffffffffffffff1660509190911b71ffffffffffffffff0000000000000000000016178555565b6147356146ee61022083015163ffffffff1690565b85547fffffffffffffffffffff00000000ffffffffffffffffffffffffffffffffffff1660909190911b75ffffffff00000000000000000000000000000000000016178555565b015163ffffffff1690565b7fffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffff79ffffffff0000000000000000000000000000000000000000000083549260b01b169116179055565b519069ffffffffffffffffffff8216820361022c57565b908160a091031261022c576147b58161478a565b91602082015191604081015191610b3860806060840151930161478a565b6040513d6000823e3d90fd5b9081602091031261022c5751610b3881611ad9565b6147fc612d76565b5061481461352161352183516001600160a01b031690565b90604051907ffeaf968c00000000000000000000000000000000000000000000000000000000825260a082600481865afa92831561491c57600092600094614921575b50600083126140de576020600491604051928380927f313ce5670000000000000000000000000000000000000000000000000000000082525afa92831561491c57610b389363ffffffff936148bd936000926148e6575b506020015160ff165b90614126565b926148d86148c9610701565b6001600160e01b039095168552565b1663ffffffff166020830152565b6148b791925061490d602091823d8411614915575b61490581836106de565b8101906147df565b9291506148ae565b503d6148fb565b6147d3565b90935061494791925060a03d60a011614954575b61493f81836106de565b8101906147a1565b5093925050919238614857565b503d614935565b9081602091031261022c573590565b91906149796020830183612870565b9390506040830161498a8185612b90565b905060408401916149a2611850845163ffffffff1690565b808811614f6c5750602085015161ffff16808311614f3657506101608501966149d388516001600160e01b03191690565b6001600160e01b03198116630a04b54b60e21b81148015614f26575b8015614f16575b15614a7157505050505050509181614a6b612a0d614a52614a6496614a216080610b38980186612870565b6101e083015163ffffffff169063ffffffff614a4a610180613df5606088015163ffffffff1690565b941692615b2b565b51958694516001600160e01b03191690565b9280612870565b90613b1f565b63c4e0595360e01b819b9a939495979996989b14600014614ce6575050614af3614ad2614ae6999a614aa66080880188612870565b63ffffffff614aca610180614ac2606087015163ffffffff1690565b950151151590565b9316916157ba565b918251998a91516001600160e01b03191690565b614a6b612a0d8880612870565b6060810151519082614b10614b088780612870565b81019061495b565b614cc9575081614c93575b8515159081614c86575b50614c5c5760408111614c2a5750614b4a90614b448594939795612718565b9061385a565b946000935b838510614ba8575050505050611850614b6c915163ffffffff1690565b808211614b7857505090565b7f869337890000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b9091929395600190614bff611850612b21614bd78667ffffffffffffffff16600052600a602052604060002090565b614be86129ba8d6108f08b8d612b90565b6001600160a01b0316600052602052604060002090565b8015614c1a57614c0e9161385a565b965b0193929190614b4f565b50614c249061383e565b96614c10565b7fc327a56c00000000000000000000000000000000000000000000000000000000600052600452604060245260446000fd5b7f5bed51920000000000000000000000000000000000000000000000000000000060005260046000fd5b6040915001511538614b25565b61196e827fc327a56c00000000000000000000000000000000000000000000000000000000600052906044916004526000602452565b614ce0919350614b44614cdb8461384c565b6126ea565b91614b1b565b6307842f7160e21b03614ef85750614d53614d30614ae6999a614d0c6080880188612870565b63ffffffff614d28610180614ac2606087015163ffffffff1690565b9316916159b6565b91614d42611850845163ffffffff1690565b998a91516001600160e01b03191690565b6080810151519082614d68614b088780612870565b614ee0575081614eaa575b85151580614e9e575b614c5c5760408211614e6a576020015167ffffffffffffffff9081169081831c16614e30575050614db490614b448594939795612700565b946000935b838510614dd6575050505050611850614b6c915163ffffffff1690565b9091929395600190614e05611850612b21614bd78667ffffffffffffffff16600052600a602052604060002090565b8015614e2057614e149161385a565b965b0193929190614db9565b50614e2a9061383e565b96614e16565b7fafa933080000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260245260446000fd5b7f8a0d71f7000000000000000000000000000000000000000000000000000000006000526004829052604060245260446000fd5b50606081015115614d7c565b61196e827f8a0d71f700000000000000000000000000000000000000000000000000000000600052906044916004526000602452565b614ef2919350614b44614cdb84613830565b91614d73565b632ee8207560e01b6000526001600160e01b03191660045260246000fd5b5063647e2ba960e01b81146149f6565b50632b1dfffb60e21b81146149ef565b7fd88dddd600000000000000000000000000000000000000000000000000000000600052600483905261ffff1660245260446000fd5b7f8693378900000000000000000000000000000000000000000000000000000000600052600452602487905260446000fd5b67ffffffffffffffff8116600052600560205260406000209160405192614fc48461068a565b546001600160e01b038116845260e01c9182602085015263ffffffff82169283614ffe575b50505050610b3890516001600160e01b031690565b63ffffffff1642908103939084116126e557831161501c5780614fe9565b7ff08bcb3e0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045263ffffffff1660245260445260646000fd5b60408136031261022c576020604051916150788361068a565b80356150838161021b565b83520135602082015290565b9694919695929390956000946000986000986000965b8088106150b9575050505050505050929190565b9091929394959697999a6150d66150d18a848b612811565b61505f565b9a61510d612a508d614be86150ff8967ffffffffffffffff16600052600a602052604060002090565b91516001600160a01b031690565b9161511e6117c460a0850151151590565b6152675760009c60408401906151396122f5835161ffff1690565b6151ef575b5050606083015163ffffffff1661515491613898565b9c60808301516151679063ffffffff1690565b61517091613898565b9b82516151809063ffffffff1690565b63ffffffff1661518f906126c3565b600193908083106151e357506123b061185060206151b293015163ffffffff1690565b8082116151d257506151c39161385a565b985b01969594939291906150a5565b90506151dd9161385a565b986151c5565b9150506151dd9161385a565b90612195615258939f61524661524f9460208f8e6122f595506001600160a01b0361522185516001600160a01b031690565b91166001600160a01b038216146152605761523c9150613a02565b915b015190615b69565b925161ffff1690565b620186a0900490565b9b388061513e565b509161523e565b999b50600191506152888461528261528e93614b448b6126c3565b9b613898565b9c613880565b9a6151c5565b91939093806101e00193846101e0116126e55761012081029080820461012014901517156126e5576101e09101018093116126e5576122f561014061532a610b38966dffffffffffffffffffffffffffff6122826153156153026153349a63ffffffff6121959a169061385a565b6121956122f56101208c015161ffff1690565b614b446118506101008b015163ffffffff1690565b93015161ffff1690565b61272e565b9081602091031261022c575190565b602081510361537e576153646020825183010160208301615339565b6001600160a01b0381119081156153bb575b5061537e5750565b614079906040519182917f8d666f6000000000000000000000000000000000000000000000000000000000835260206004840181815201906102f1565b61040091501038615376565b60208151036153ed57600b6153e56020835184010160208401615339565b106153ed5750565b614079906040519182917fe0d7fb0200000000000000000000000000000000000000000000000000000000835260206004840181815201906102f1565b906020825103615450578061543d575050565b6153e56020835184010160208401615339565b6040517fe0d7fb02000000000000000000000000000000000000000000000000000000008152602060048201528061407960248201856102f1565b60248151036154a1576022810151156154a15750565b614079906040519182917f373b0e4400000000000000000000000000000000000000000000000000000000835260206004840181815201906102f1565b919091356001600160e01b0319811692600481106154fa575050565b6001600160e01b0319929350829060040360031b1b161690565b909291928360041161022c57831161022c57600401916003190190565b9060041161022c5790600490565b9081604091031261022c576020604051916155598361068a565b805183520151612c0981610c9c565b91615571612d76565b50811561564f575061559a612a0d82806155946001600160e01b031995876154de565b95615514565b91167f181dcf100000000000000000000000000000000000000000000000000000000081036155d7575080602080610b389351830101910161553f565b7f97a657c90000000000000000000000000000000000000000000000000000000014615627577f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b8060208061563a93518301019101615339565b615642610701565b9081526000602082015290565b91505067ffffffffffffffff615663610701565b911681526000602082015290565b6020604051917f181dcf1000000000000000000000000000000000000000000000000000000000828401528051602484015201511515604482015260448152610b386064826106de565b604051906156c8826106c2565b606080836000815260006020820152600060408201520152565b9080601f8301121561022c5781356156f981610c84565b9261570760405194856106de565b81845260208085019260051b82010192831161022c57602001905b82821061572f5750505090565b8135815260209182019101615722565b60208183031261022c5780359067ffffffffffffffff821161022c570160808183031261022c5760405191615773836106c2565b81358352602082013561578581610c9c565b602084015260408201356040840152606082013567ffffffffffffffff811161022c576157b292016156e2565b606082015290565b6157c26156bb565b5081156158cb577f21ea4ca9000000000000000000000000000000000000000000000000000000006001600160e01b03196158066158008585615531565b906154de565b16036158a157816158229261581a92615514565b81019061573f565b918061588b575b615861578151116158375790565b7f4c4fc93a0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fee433e990000000000000000000000000000000000000000000000000000000060005260046000fd5b5061589c6117c46020840151151590565b615829565b7f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fb00b53dc0000000000000000000000000000000000000000000000000000000060005260046000fd5b604051906159028261066e565b60606080836000815260006020820152600060408201526000838201520152565b60208183031261022c5780359067ffffffffffffffff821161022c570160a08183031261022c57604051916159578361066e565b615960826111d5565b835261596e602083016102ab565b6020840152604082013561598181610c9c565b604084015260608201356060840152608082013567ffffffffffffffff811161022c576159ae92016156e2565b608082015290565b6159be6158f5565b5081156158cb577f1f3b3aba000000000000000000000000000000000000000000000000000000006001600160e01b03196159fc6158008585615531565b16036158a15781615a1892615a1092615514565b810190615923565b9180615a69575b6158615763ffffffff615a36835163ffffffff1690565b1611615a3f5790565b7f2e2b0c290000000000000000000000000000000000000000000000000000000060005260046000fd5b50615a7a6117c46040840151151590565b615a1f565b604080516001600160a01b039283166020820190815292909316908301527fffffffffffffffffffff0000000000000000000000000000000000000000000090921660608201527fffff000000000000000000000000000000000000000000000000000000000000909216608083015290615afd8160a08101612a90565b51902090565b6001600160a01b03610b389116600b615bfd565b6001600160a01b03610b389116600b615d31565b9063ffffffff615b4893959495615b40612d76565b501691615568565b918251116158375780615b5d575b6158615790565b50602081015115615b56565b670de0b6b3a7640000916001600160e01b03615b85921661274e565b0490565b80548210156128215760005260206000200190600090565b91615bbb918354906000199060031b92831b921b19161790565b9055565b80548015615be7576000190190615bd68282615b89565b60001982549160031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b6001810191806000528260205260406000205492831515600014615caf5760001984018481116126e55783549360001985019485116126e5576000958583615c6097615c519503615c66575b505050615bbf565b90600052602052604060002090565b55600190565b615c96615c9091615c87615c7d615ca69588615b89565b90549060031b1c90565b92839187615b89565b90615ba1565b8590600052602052604060002090565b55388080615c49565b50505050600090565b805490680100000000000000008210156106695781615cdf916001615bbb94018155615b89565b81939154906000199060031b92831b921b19161790565b600081815260036020526040902054615d2b57615d14816002615cb8565b600254906000526003602052604060002055600190565b50600090565b6000828152600182016020526040902054615d685780615d5383600193615cb8565b80549260005201602052604060002055600190565b5050600090565b600081815260036020526040902054908115615d68576000198201908282116126e5576002549260001984019384116126e5578383615c609460009603615dcf575b505050615dbe6002615bbf565b600390600052602052604060002090565b615dbe615c9091615de7615c7d615df1956002615b89565b9283916002615b89565b55388080615db156fea164736f6c634300081a000a" - -type FeeQuoterContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewFeeQuoterContract( - address common.Address, - backend bind.ContractBackend, -) (*FeeQuoterContract, error) { - parsed, err := abi.JSON(strings.NewReader(FeeQuoterABI)) - if err != nil { - return nil, err - } - return &FeeQuoterContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *FeeQuoterContract) Address() common.Address { - return c.address -} - -func (c *FeeQuoterContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *FeeQuoterContract) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, args []DestChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyDestChainConfigUpdates", args) -} - -func (c *FeeQuoterContract) UpdatePrices(opts *bind.TransactOpts, args PriceUpdates) (*types.Transaction, error) { - return c.contract.Transact(opts, "updatePrices", args) -} - -func (c *FeeQuoterContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *FeeQuoterContract) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - -func (c *FeeQuoterContract) GetDestChainConfig(opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChainConfig", args) - if err != nil { - var zero DestChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DestChainConfig)).(*DestChainConfig), nil -} - -func (c *FeeQuoterContract) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (TokenTransferFeeConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenTransferFeeConfig", destChainSelector, token) - if err != nil { - var zero TokenTransferFeeConfig - return zero, err - } - return *abi.ConvertType(out[0], new(TokenTransferFeeConfig)).(*TokenTransferFeeConfig), nil -} - -func (c *FeeQuoterContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *FeeQuoterContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *FeeQuoterContract) GetTokenPrices(opts *bind.CallOpts, args []common.Address) ([]TimestampedPackedUint224, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenPrices", args) - if err != nil { - var zero []TimestampedPackedUint224 - return zero, err - } - return *abi.ConvertType(out[0], new([]TimestampedPackedUint224)).(*[]TimestampedPackedUint224), nil -} - -func (c *FeeQuoterContract) GetDestinationChainGasPrice(opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestinationChainGasPrice", args) - if err != nil { - var zero TimestampedPackedUint224 - return zero, err - } - return *abi.ConvertType(out[0], new(TimestampedPackedUint224)).(*TimestampedPackedUint224), nil -} - -func (c *FeeQuoterContract) GetFeeTokens(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getFeeTokens") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type DestChainConfig struct { - IsEnabled bool - MaxNumberOfTokensPerMsg uint16 - MaxDataBytes uint32 - MaxPerMsgGasLimit uint32 - DestGasOverhead uint32 - DestGasPerPayloadByteBase uint8 - DestGasPerPayloadByteHigh uint8 - DestGasPerPayloadByteThreshold uint16 - DestDataAvailabilityOverheadGas uint32 - DestGasPerDataAvailabilityByte uint16 - DestDataAvailabilityMultiplierBps uint16 - ChainFamilySelector [4]byte - EnforceOutOfOrder bool - DefaultTokenFeeUSDCents uint16 - DefaultTokenDestGasOverhead uint32 - DefaultTxGasLimit uint32 - GasMultiplierWeiPerEth uint64 - GasPriceStalenessThreshold uint32 - NetworkFeeUSDCents uint32 -} - -type DestChainConfigArgs struct { - DestChainSelector uint64 - DestChainConfig DestChainConfig -} - -type GasPriceUpdate struct { - DestChainSelector uint64 - UsdPerUnitGas *big.Int -} - -type PremiumMultiplierWeiPerEthArgs struct { - Token common.Address - PremiumMultiplierWeiPerEth uint64 -} - -type PriceUpdates struct { - TokenPriceUpdates []TokenPriceUpdate - GasPriceUpdates []GasPriceUpdate -} - -type StaticConfig struct { - MaxFeeJuelsPerMsg *big.Int - LinkToken common.Address - TokenPriceStalenessThreshold uint32 -} - -type TimestampedPackedUint224 struct { - Value *big.Int - Timestamp uint32 -} - -type TokenPriceFeedConfig struct { - DataFeedAddress common.Address - TokenDecimals uint8 - IsEnabled bool -} - -type TokenPriceFeedUpdate struct { - SourceToken common.Address - FeedConfig TokenPriceFeedConfig -} - -type TokenPriceUpdate struct { - SourceToken common.Address - UsdPerToken *big.Int -} - -type TokenTransferFeeConfig struct { - MinFeeUSDCents uint32 - MaxFeeUSDCents uint32 - DeciBps uint16 - DestGasOverhead uint32 - DestBytesOverhead uint32 - IsEnabled bool -} - -type TokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - TokenTransferFeeConfigs []TokenTransferFeeConfigSingleTokenArgs -} - -type TokenTransferFeeConfigRemoveArgs struct { - DestChainSelector uint64 - Token common.Address -} - -type TokenTransferFeeConfigSingleTokenArgs struct { - Token common.Address - TokenTransferFeeConfig TokenTransferFeeConfig -} - type ApplyTokenTransferFeeConfigUpdatesArgs struct { - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - TokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs + TokenTransferFeeConfigArgs []gobindings.FeeQuoterTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + TokensToUseDefaultFeeConfigs []gobindings.FeeQuoterTokenTransferFeeConfigRemoveArgs `json:"tokensToUseDefaultFeeConfigs"` } type GetTokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - Token common.Address + DestChainSelector uint64 `json:"destChainSelector"` + Token common.Address `json:"token"` } type ConstructorArgs struct { - StaticConfig StaticConfig - PriceUpdaters []common.Address - FeeTokens []common.Address - TokenPriceFeeds []TokenPriceFeedUpdate - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - PremiumMultiplierWeiPerEthArgs []PremiumMultiplierWeiPerEthArgs - DestChainConfigArgs []DestChainConfigArgs + StaticConfig gobindings.FeeQuoterStaticConfig `json:"staticConfig"` + PriceUpdaters []common.Address `json:"priceUpdaters"` + FeeTokens []common.Address `json:"feeTokens"` + TokenPriceFeeds []gobindings.FeeQuoterTokenPriceFeedUpdate `json:"tokenPriceFeeds"` + TokenTransferFeeConfigArgs []gobindings.FeeQuoterTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + PremiumMultiplierWeiPerEthArgs []gobindings.FeeQuoterPremiumMultiplierWeiPerEthArgs `json:"premiumMultiplierWeiPerEthArgs"` + DestChainConfigArgs []gobindings.FeeQuoterDestChainConfigArgs `json:"destChainConfigArgs"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "fee-quoter:deploy", - Version: Version, - Description: "Deploys the FeeQuoter contract", - ContractMetadata: &bind.MetaData{ - ABI: FeeQuoterABI, - Bin: FeeQuoterBin, - }, + Name: "fee-quoter:deploy", + Version: Version, + Description: "Deploys the FeeQuoter contract", + ContractMetadata: gobindings.FeeQuoterMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(FeeQuoterBin), + EVM: common.FromHex(gobindings.FeeQuoterMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyDestChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]DestChainConfigArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-dest-chain-config-updates", - Version: Version, - Description: "Calls applyDestChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, []DestChainConfigArgs], - Validate: func([]DestChainConfigArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args []DestChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyDestChainConfigUpdates(opts, args) - }, -}) - -var UpdatePrices = contract.NewWrite(contract.WriteParams[PriceUpdates, *FeeQuoterContract]{ - Name: "fee-quoter:update-prices", - Version: Version, - Description: "Calls updatePrices on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, PriceUpdates], - Validate: func(PriceUpdates) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args PriceUpdates, - ) (*types.Transaction, error) { - return c.UpdatePrices(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var ApplyTokenTransferFeeConfigUpdates = contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-token-transfer-fee-config-updates", - Version: Version, - Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, ApplyTokenTransferFeeConfigUpdatesArgs], - Validate: func(ApplyTokenTransferFeeConfigUpdatesArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args ApplyTokenTransferFeeConfigUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) - }, -}) - -var GetDestChainConfig = contract.NewRead(contract.ReadParams[uint64, DestChainConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-dest-chain-config", - Version: Version, - Description: "Calls getDestChainConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - return c.GetDestChainConfig(opts, args) - }, -}) - -var GetTokenTransferFeeConfig = contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, TokenTransferFeeConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-token-transfer-fee-config", - Version: Version, - Description: "Calls getTokenTransferFeeConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (TokenTransferFeeConfig, error) { - return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) - }, -}) - -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *FeeQuoterContract]{ - Name: "fee-quoter:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) - -var GetTokenPrices = contract.NewRead(contract.ReadParams[[]common.Address, []TimestampedPackedUint224, *FeeQuoterContract]{ - Name: "fee-quoter:get-token-prices", - Version: Version, - Description: "Calls getTokenPrices on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args []common.Address) ([]TimestampedPackedUint224, error) { - return c.GetTokenPrices(opts, args) - }, }) -var GetDestinationChainGasPrice = contract.NewRead(contract.ReadParams[uint64, TimestampedPackedUint224, *FeeQuoterContract]{ - Name: "fee-quoter:get-destination-chain-gas-price", - Version: Version, - Description: "Calls getDestinationChainGasPrice on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - return c.GetDestinationChainGasPrice(opts, args) - }, -}) - -var GetFeeTokens = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *FeeQuoterContract]{ - Name: "fee-quoter:get-fee-tokens", - Version: Version, - Description: "Calls getFeeTokens on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetFeeTokens(opts) - }, -}) +func NewWriteApplyDestChainConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.FeeQuoterDestChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.FeeQuoterDestChainConfigArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-dest-chain-config-updates", + Version: Version, + Description: "Calls applyDestChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.FeeQuoterDestChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args []gobindings.FeeQuoterDestChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyDestChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteUpdatePrices(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.InternalPriceUpdates], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.InternalPriceUpdates, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:update-prices", + Version: Version, + Description: "Calls updatePrices on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.InternalPriceUpdates) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.InternalPriceUpdates, + ) (*types.Transaction, error) { + return c.UpdatePrices(opts, args) + }, + }) +} + +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} + +func NewWriteApplyTokenTransferFeeConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[ApplyTokenTransferFeeConfigUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-token-transfer-fee-config-updates", + Version: Version, + Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args ApplyTokenTransferFeeConfigUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args ApplyTokenTransferFeeConfigUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) + }, + }) +} + +func NewReadGetDestChainConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.FeeQuoterDestChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.FeeQuoterDestChainConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-dest-chain-config", + Version: Version, + Description: "Calls getDestChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.FeeQuoterDestChainConfig, error) { + return c.GetDestChainConfig(opts, args) + }, + }) +} + +func NewReadGetTokenTransferFeeConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[GetTokenTransferFeeConfigArgs], gobindings.FeeQuoterTokenTransferFeeConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, gobindings.FeeQuoterTokenTransferFeeConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-transfer-fee-config", + Version: Version, + Description: "Calls getTokenTransferFeeConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (gobindings.FeeQuoterTokenTransferFeeConfig, error) { + return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.FeeQuoterStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.FeeQuoterStaticConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) (gobindings.FeeQuoterStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetAllAuthorizedCallers(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} + +func NewReadGetTokenPrices(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], []gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[[]common.Address, []gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-prices", + Version: Version, + Description: "Calls getTokenPrices on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args []common.Address) ([]gobindings.InternalTimestampedPackedUint224, error) { + return c.GetTokenPrices(opts, args) + }, + }) +} + +func NewReadGetDestinationChainGasPrice(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-destination-chain-gas-price", + Version: Version, + Description: "Calls getDestinationChainGasPrice on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.InternalTimestampedPackedUint224, error) { + return c.GetDestinationChainGasPrice(opts, args) + }, + }) +} + +func NewReadGetFeeTokens(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-fee-tokens", + Version: Version, + Description: "Calls getFeeTokens on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetFeeTokens(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_5/operations/usdc_token_pool/usdc_token_pool.go b/chains/evm/deployment/v1_6_5/operations/usdc_token_pool/usdc_token_pool.go index d3be2241ba..e33834ae84 100644 --- a/chains/evm/deployment/v1_6_5/operations/usdc_token_pool/usdc_token_pool.go +++ b/chains/evm/deployment/v1_6_5/operations/usdc_token_pool/usdc_token_pool.go @@ -3,288 +3,199 @@ package usdc_token_pool import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "USDCTokenPool" var Version = semver.MustParse("1.6.5") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const USDCTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"tokenMessenger","type":"address","internalType":"contract ITokenMessenger"},{"name":"cctpMessageTransmitterProxy","type":"address","internalType":"contract CCTPMessageTransmitterProxy"},{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"supportedUSDCVersion","type":"uint32","internalType":"uint32"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDomain","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct USDCTokenPool.Domain","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"i_localDomainIdentifier","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"i_messageTransmitterProxy","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CCTPMessageTransmitterProxy"}],"stateMutability":"view"},{"type":"function","name":"i_supportedUSDCVersion","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"i_tokenMessenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDomains","inputs":[{"name":"domains","type":"tuple[]","internalType":"struct USDCTokenPool.DomainUpdate[]","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"tokenMessenger","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DomainsSet","inputs":[{"name":"","type":"tuple[]","indexed":false,"internalType":"struct USDCTokenPool.DomainUpdate[]","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidConfig","inputs":[]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidDestinationDomain","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidDomain","inputs":[{"name":"domain","type":"tuple","internalType":"struct USDCTokenPool.DomainUpdate","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}]},{"type":"error","name":"InvalidMessageLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidMessageVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidNonce","inputs":[{"name":"expected","type":"uint64","internalType":"uint64"},{"name":"got","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidReceiver","inputs":[{"name":"receiver","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourceDomain","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolDataLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenMessengerVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidTransmitterInProxy","inputs":[]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnknownDomain","inputs":[{"name":"domain","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"UnlockingUSDCFailed","inputs":[]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const USDCTokenPoolBin = "0x610180806040523461065557615f42803803809161001d8285610a1e565b8339810160e0828203126106555781516001600160a01b03811692838203610655576020810151936001600160a01b03851690818603610655576040830151956001600160a01b038716958688036106555760608501516001600160401b0381116106555785019080601f83011215610655578151916001600160401b03831161065a578260051b9060208201936100b86040519586610a1e565b845260208085019282010192831161065557602001905b828210610a06575050506100e560808601610a41565b946100fe60c06100f760a08401610a41565b9201610a55565b95602099604051996101108c8c610a1e565b60008b52600036813733156109f557600180546001600160a01b03191633179055801580156109e4575b80156109d3575b6109c2576004928c9260805260c0526040519283809263313ce56760e01b82525afa809160009161098b575b5090610967575b50600660a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e0819052610839575b50604051946101b78887610a1e565b60008652600036813760408051979088016001600160401b0381118982101761065a576040528752858888015260005b865181101561024e576001906001600160a01b03610205828a610a66565b51168a61021182610ae7565b61021e575b5050016101e7565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a1388a610216565b5087955086519360005b85518110156102c9576001600160a01b036102738288610a66565b51169081156102b8577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef89836102aa600195610c03565b50604051908152a101610258565b6342bcdf7f60e11b60005260046000fd5b50869394508561010052841561082857604051632c12192160e01b81528481600481895afa9081156106c0576000916107f3575b5060405163054fd4d560e41b81526001600160a01b039190911691908581600481865afa9081156106c0576000916107be575b5063ffffffff8061010051169116908082036107a7575050604051639cdbb18160e01b815285816004818a5afa9081156106c057600091610772575b5063ffffffff80610100511691169080820361075b57505084600491604051928380926367e0ed8360e11b82525afa80156106c0578291600091610712575b506001600160a01b03160361070157600492849261012052610140526040519283809263234d8e3d60e21b82525afa9081156106c0576000916106cc575b506101605260805161012051604051636eb1769f60e11b81523060048201526001600160a01b03918216602482018190529492909116908381604481855afa9081156106c057600091610693575b50600019810180911161067d57604051908482019563095ea7b360e01b8752602483015260448201526044815261046f606482610a1e565b6000806040968751936104828986610a1e565b8785527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488860152519082865af13d15610670573d906001600160401b03821161065a5786516104ef9490926104e1601f8201601f1916890185610a1e565b83523d60008885013e610cd0565b8051806105dc575b847f2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea954485858351908152a1516151a19081610da182396080518181816104f601528181610590015281816108c101528181611809015281816145a0015261497e015260a051816106cc015260c05181818161254401528181613b3d015261413a015260e051818181610ca70152818161268501526148a80152610100518181816104870152613caf015261012051818181610ec701526118b7015261014051818181610829015261166f015261016051818181611024015281816119990152613d1c0152f35b8184918101031261065557820151801590811503610655576105ff5783806104f7565b50608491519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b916104ef92606091610cd0565b634e487b7160e01b600052601160045260246000fd5b90508381813d83116106b9575b6106aa8183610a1e565b81010312610655575185610437565b503d6106a0565b6040513d6000823e3d90fd5b90508181813d83116106fa575b6106e38183610a1e565b81010312610655576106f490610a55565b836103e9565b503d6106d9565b632a32133b60e11b60005260046000fd5b9091508581813d8311610754575b61072a8183610a1e565b810103126107505751906001600160a01b038216820361074d57508190876103ab565b80fd5b5080fd5b503d610720565b633785f8f160e01b60005260045260245260446000fd5b90508581813d83116107a0575b6107898183610a1e565b810103126106555761079a90610a55565b8761036c565b503d61077f565b63960693cd60e01b60005260045260245260446000fd5b90508581813d83116107ec575b6107d58183610a1e565b81010312610655576107e690610a55565b87610330565b503d6107cb565b90508481813d8311610821575b61080a8183610a1e565b810103126106555761081b90610a41565b866102fd565b503d610800565b6306b7c75960e31b60005260046000fd5b604051929692959194909361084e8988610a1e565b60008752600036813760e051156109565760005b87518110156108c9576001906001600160a01b03610880828b610a66565b51168b61088c82610c3c565b610899575b505001610862565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1388b610891565b509193955091939560005b8651811015610948576001906001600160a01b036108f2828a610a66565b51168015610942578a61090482610bc4565b610912575b50505b016108d4565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a1388a610909565b5061090c565b5091939590929450386101a8565b6335f4a7b360e01b60005260046000fd5b60ff1660068114610174576332ad3e0760e11b600052600660045260245260446000fd5b8b81813d83116109bb575b6109a08183610a1e565b8101031261075057519060ff8216820361074d57503861016d565b503d610996565b630a64406560e11b60005260046000fd5b506001600160a01b03831615610141565b506001600160a01b0384161561013a565b639b15e16f60e01b60005260046000fd5b60208091610a1384610a41565b8152019101906100cf565b601f909101601f19168101906001600160401b0382119082101761065a57604052565b51906001600160a01b038216820361065557565b519063ffffffff8216820361065557565b8051821015610a7a5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b8054821015610a7a5760005260206000200190600090565b80548015610ad1576000190190610abf8282610a90565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b6000818152600b60205260409020548015610b9257600019810181811161067d57600a5460001981019190821161067d57808203610b41575b505050610b2d600a610aa8565b600052600b60205260006040812055600190565b610b7a610b52610b6393600a610a90565b90549060031b1c928392600a610a90565b819391549060031b91821b91600019901b19161790565b9055600052600b602052604060002055388080610b20565b5050600090565b8054906801000000000000000082101561065a5781610b63916001610bc094018155610a90565b9055565b80600052600360205260406000205415600014610bfd57610be6816002610b99565b600254906000526003602052604060002055600190565b50600090565b80600052600b60205260406000205415600014610bfd57610c2581600a610b99565b600a5490600052600b602052604060002055600190565b6000818152600360205260409020548015610b9257600019810181811161067d5760025460001981019190821161067d57818103610c96575b505050610c826002610aa8565b600052600360205260006040812055600190565b610cb8610ca7610b63936002610a90565b90549060031b1c9283926002610a90565b90556000526003602052604060002055388080610c75565b91929015610d325750815115610ce4575090565b3b15610ced5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610d455750805190602001fd5b6040519062461bcd60e51b8252602060048301528181519182602483015260005b838110610d885750508160006044809484010152601f80199101168101030190fd5b60208282018101516044878401015285935001610d6656fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a714610277578063181f5a7714610272578063212a052e1461026d57806321df0da714610268578063240028e8146102635780632451a6271461025e57806324f65ee71461025957806339077537146102545780634c5ef0ed1461024f57806354c8a4f31461024a5780636155cda01461024557806362ddd3c4146102405780636b716b0d1461023b5780636d3d1a581461023657806379ba5097146102315780637d54534e1461022c5780638926f54f146102275780638da5cb5b1461022257806391a2749a1461021d578063962d40201461021857806398db9643146102135780639a4575b91461020e578063a42a7b8b14610209578063a7cd63b714610204578063acfecf91146101ff578063af58d59f146101fa578063b0f479a1146101f5578063b7946580146101f0578063c0d78655146101eb578063c4bffe2b146101e6578063c75eea9c146101e1578063c781d0e3146101dc578063cf7401f3146101d7578063dc0bd971146101d2578063dfadfa35146101cd578063e0351e13146101c8578063e8a1da17146101c35763f2fde38b146101be57600080fd5b612ac9565b6126aa565b61264f565b612568565b6124f9565b6123dd565b612268565b6121ff565b61214e565b61200e565b611fb9565b611f56565b611e8c565b611d60565b611ce8565b611bc8565b6116e6565b611624565b61146b565b61136a565b61128f565b611232565b611183565b61109a565b611048565b610fe9565b610f66565b610e7c565b610c75565b610b6d565b6106f0565b610694565b610610565b610538565b6104ab565b61044c565b6103cb565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610367576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361036757807faff2afbf000000000000000000000000000000000000000000000000000000006020921490811561033d575b8115610313575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438610308565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150610301565b600080fd5b919082519283825260005b8481106103b65750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201610377565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757610448604080519061040c8183610a6d565b601382527f55534443546f6b656e506f6f6c20312e362e350000000000000000000000000060208301525191829160208352602083019061036c565b0390f35b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b73ffffffffffffffffffffffffffffffffffffffff81160361036757565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760206105b66004356105788161051a565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691161490565b6040519015158152f35b602060408183019282815284518094520192019060005b8181106105e45750505090565b825173ffffffffffffffffffffffffffffffffffffffff168452602093840193909201916001016105d7565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757604051600a548082526020820190600a60005260206000209060005b81811061067e576104488561067281870382610a6d565b604051918291826105c0565b825484526020909301926001928301920161065b565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760043567ffffffffffffffff811161036757806004016101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83360301126103675761076a612bbd565b5060648201359061077b8282613a70565b60c483016107898183612be1565b9050604081036109795750816107d36107cb6107c36107b86107b060209661080e98612be1565b810190612c43565b9360e4890190612be1565b810190612c7b565b918251613c9c565b8181519101519060405193849283927f57ecfd2800000000000000000000000000000000000000000000000000000000845260048401612d01565b0381600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af190811561097457600091610945575b501561091b57817ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc067ffffffffffffffff6108a6604461089f60246104489801612d32565b9401612d3c565b6040805173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081168252336020830152929092169082015260608101859052921691608090a2610908610aae565b8190526040519081529081906020820190565b7fbf969f220000000000000000000000000000000000000000000000000000000060005260046000fd5b610967915060203d60201161096d575b61095f8183610a6d565b810190612cec565b3861085a565b503d610955565b612d26565b7f04bbdfd00000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6000fd5b67ffffffffffffffff81160361036757565b35906109c7826109aa565b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610a1457604052565b6109c9565b6060810190811067ffffffffffffffff821117610a1457604052565b6080810190811067ffffffffffffffff821117610a1457604052565b60a0810190811067ffffffffffffffff821117610a1457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610a1457604052565b604051906109c7602083610a6d565b604051906109c7604083610a6d565b604051906109c760a083610a6d565b604051906109c7608083610a6d565b92919267ffffffffffffffff8211610a145760405191610b32601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184610a6d565b829481845281830111610367578281602093846000960137010152565b9080601f8301121561036757816020610b6a93359101610aea565b90565b346103675760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757600435610ba8816109aa565b60243567ffffffffffffffff811161036757602091610bce6105b6923690600401610b4f565b90612d46565b9181601f840112156103675782359167ffffffffffffffff8311610367576020808501948460051b01011161036757565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126103675760043567ffffffffffffffff81116103675781610c4e91600401610bd4565b929092916024359067ffffffffffffffff821161036757610c7191600401610bd4565b9091565b3461036757610c9d610ca5610c8936610c05565b9491610c96939193613e8f565b36916112f9565b9236916112f9565b7f000000000000000000000000000000000000000000000000000000000000000015610e525760005b8251811015610d935780610d01610ce76001938661302f565b5173ffffffffffffffffffffffffffffffffffffffff1690565b610d3d610d3873ffffffffffffffffffffffffffffffffffffffff83165b73ffffffffffffffffffffffffffffffffffffffff1690565b614a51565b610d49575b5001610cce565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756690602090a138610d42565b5060005b8151811015610e505780610db0610ce76001938561302f565b73ffffffffffffffffffffffffffffffffffffffff811615610e4a57610df3610dee73ffffffffffffffffffffffffffffffffffffffff8316610d1f565b614d63565b610e00575b505b01610d97565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d890602090a183610df8565b50610dfa565b005b7f35f4a7b30000000000000000000000000000000000000000000000000000000060005260046000fd5b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261036757600435610f21816109aa565b9160243567ffffffffffffffff811161036757826023820112156103675780600401359267ffffffffffffffff84116103675760248483010111610367576024019190565b3461036757610f7436610eeb565b610f7f929192613e8f565b67ffffffffffffffff8216610fa1816000526006602052604060002054151590565b15610fbc5750610e5092610fb6913691610aea565b90613efb565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760005473ffffffffffffffffffffffffffffffffffffffff81163303611159577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610367577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff6004356111f68161051a565b6111fe613e8f565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a1005b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760206105b667ffffffffffffffff60043561127b816109aa565b166000526006602052604060002054151590565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b67ffffffffffffffff8111610a145760051b60200190565b929190611305816112e1565b936113136040519586610a6d565b602085838152019160051b810192831161036757905b82821061133557505050565b6020809183356113448161051a565b815201910190611329565b9080601f8301121561036757816020610b6a933591016112f9565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760043567ffffffffffffffff81116103675760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8236030112610367576040516113e3816109f8565b816004013567ffffffffffffffff811161036757611407906004369185010161134f565b8152602482013567ffffffffffffffff811161036757610e50926004611430923692010161134f565b6020820152612d83565b9181601f840112156103675782359167ffffffffffffffff8311610367576020808501946060850201011161036757565b346103675760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760043567ffffffffffffffff8111610367576114ba903690600401610bd4565b9060243567ffffffffffffffff8111610367576114db90369060040161143a565b9060443567ffffffffffffffff8111610367576114fc90369060040161143a565b61151e610d1f60095473ffffffffffffffffffffffffffffffffffffffff1690565b331415806115f9575b6115cb578386148015906115c1575b6115975760005b86811061154657005b8061159161155f61155a6001948b8b612f41565b612d32565b61156a838989612f56565b61158b61158361157b86898b612f56565b923690612394565b913690612394565b91613fc0565b0161153d565b7f568efce20000000000000000000000000000000000000000000000000000000060005260046000fd5b5080861415611536565b7f8e4a23d6000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b5061161c610d1f60015473ffffffffffffffffffffffffffffffffffffffff1690565b331415611527565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b90610b6a916020815260206116b38351604083850152606084019061036c565b9201519060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08285030191015261036c565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760043567ffffffffffffffff811161036757806004019060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261036757611760612f66565b5061176a826140f0565b6024810161179c61179761177d83612d32565b67ffffffffffffffff16600052600c602052604060002090565b612f7f565b6117b06117ac6060830151151590565b1590565b611b085760206117c08580612be1565b905003611ac45760208181015161189c95606491908115611aa75750945b0135936117f2604084015163ffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169687945160405198899485947ff856ddb60000000000000000000000000000000000000000000000000000000086528a60048701919360809363ffffffff73ffffffffffffffffffffffffffffffffffffffff9398979660a0860199865216602085015260408401521660608201520152565b0381600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19283156109745761044894600094611a36575b5061197183611a1a937ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff611976956119696119326119ee9a612d32565b6040805173ffffffffffffffffffffffffffffffffffffffff90971687523360208801528601929092529116929081906060820190565b0390a2612d32565b6131fc565b92611992611982610abd565b67ffffffffffffffff9092168252565b63ffffffff7f000000000000000000000000000000000000000000000000000000000000000016602082015260405192839160208301919091602063ffffffff81604084019567ffffffffffffffff8151168552015116910152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610a6d565b611a22610abd565b918252602082015260405191829182611693565b6119769194506119ee93611a1a937ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff611a926119719560203d602011611aa0575b611a8a8183610a6d565b81019061301a565b9895505050935093506118ec565b503d611a80565b611abe915080611ab691612be1565b81019061300b565b946117de565b611ace8480612be1565b90611b046040519283927fa3c8cf0900000000000000000000000000000000000000000000000000000000845260048401612ffa565b0390fd5b6109a6611b1483612d32565b7fd201c48a0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b602081016020825282518091526040820191602060408360051b8301019401926000915b838310611b7d57505050505090565b9091929394602080611bb9837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08660019603018752895161036c565b97019301930191939290611b6e565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675767ffffffffffffffff600435611c0c816109aa565b166000526007602052611c256005604060002001614464565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611c6b611c55846112e1565b93611c636040519586610a6d565b8085526112e1565b0160005b818110611cd757505060005b8151811015611cc95780611cad611ca8611c976001948661302f565b516000526008602052604060002090565b613096565b611cb7828661302f565b52611cc2818561302f565b5001611c7b565b604051806104488582611b4a565b806060602080938701015201611c6f565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610367576040516002548082526020820190600260005260206000209060005b818110611d4a576104488561067281870382610a6d565b8254845260209093019260019283019201611d33565b3461036757611d6e36610eeb565b611d79929192613e8f565b67ffffffffffffffff821691611d9f6117ac846000526006602052604060002054151590565b611e5557611de26117ac6005611dc98467ffffffffffffffff166000526007602052604060002090565b01611dd5368689610aea565b6020815191012090614bfc565b611e1e57507f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769192611e1960405192839283612ffa565b0390a2005b611b0484926040519384937f74f23c7c00000000000000000000000000000000000000000000000000000000855260048501613156565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675767ffffffffffffffff600435611ed0816109aa565b611ed8613177565b50166000526007602052610448611efd611ef860026040600020016131a2565b6141fb565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b906020610b6a92818152019061036c565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757610448611ffa600435611971816109aa565b60405191829160208352602083019061036c565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675773ffffffffffffffffffffffffffffffffffffffff60043561205e8161051a565b612066613e8f565b1680156120e05760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a1005b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b602060408183019282815284518094520192019060005b81811061212e5750505090565b825167ffffffffffffffff16845260209384019390920191600101612121565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757612185614419565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06121b5611c55846112e1565b0136602084013760005b81518110156121f1578067ffffffffffffffff6121de6001938561302f565b51166121ea828661302f565b52016121bf565b60405180610448858261210a565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675767ffffffffffffffff600435612243816109aa565b61224b613177565b50166000526007602052610448611efd611ef860406000206131a2565b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760043567ffffffffffffffff8111610367573660238201121561036757806004013567ffffffffffffffff81116103675736602460a0830284010111610367576024610e50920161321e565b8015150361036757565b35906fffffffffffffffffffffffffffffffff8216820361036757565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c6060910112610367576040519061234182610a19565b8160843561234e816122e3565b815260a4356fffffffffffffffffffffffffffffffff8116810361036757602082015260c435906fffffffffffffffffffffffffffffffff821682036103675760400152565b9190826060910312610367576040516123ac81610a19565b60406123d881839580356123bf816122e3565b85526123cd602082016122ed565b6020860152016122ed565b910152565b346103675760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757600435612418816109aa565b60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc3601126103675760405161244e81610a19565b60243561245a816122e3565b81526044356fffffffffffffffffffffffffffffffff811681036103675760208201526064356fffffffffffffffffffffffffffffffff811681036103675760408201526124a73661230a565b9073ffffffffffffffffffffffffffffffffffffffff60095416331415806124d7575b6115cb57610e5092613fc0565b5073ffffffffffffffffffffffffffffffffffffffff600154163314156124ca565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261036757602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675767ffffffffffffffff6004356125ac816109aa565b600060606040516125bc81610a35565b828152826020820152826040820152015216600052600c602052610448604060002060ff6002604051926125ef84610a35565b8054845260018101546020850152015463ffffffff8116604084015260201c1615156060820152604051918291829190916060806080830194805184526020810151602085015263ffffffff604082015116604085015201511515910152565b346103675760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b34610367576126b836610c05565b9190926126c3613e8f565b6000915b8083106129755750505060009163ffffffff4216925b8281106126e657005b6126f96126f482858561365a565b613719565b906060820161270881516142d8565b608083019361271785516142d8565b6040840190815151156120e0576127516117ac61274c61273f885167ffffffffffffffff1690565b67ffffffffffffffff1690565b614d9e565b61292a5761288a61278a612770879a999a5167ffffffffffffffff1690565b67ffffffffffffffff166000526007602052604060002090565b61284d89612847875161282e6127b360408301516fffffffffffffffffffffffffffffffff1690565b916128156127de6127d760208401516fffffffffffffffffffffffffffffffff1690565b9251151590565b61280c6127e9610acc565b6fffffffffffffffffffffffffffffffff851681529763ffffffff166020890152565b15156040870152565b6fffffffffffffffffffffffffffffffff166060850152565b6fffffffffffffffffffffffffffffffff166080830152565b826137a8565b61287f896128768a5161282e6127b360408301516fffffffffffffffffffffffffffffffff1690565b600283016137a8565b6004845191016138b4565b602085019660005b885180518210156128cd57906128c76001926128c0836128ba8c5167ffffffffffffffff1690565b9261302f565b5190613efb565b01612892565b505097965094906129217f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939261290e6001975167ffffffffffffffff1690565b92519351905190604051948594856139db565b0390a1016126dd565b6109a661293f865167ffffffffffffffff1690565b7f1d5ad3c50000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b90919261298661155a858486612f41565b9461299d6117ac67ffffffffffffffff8816614b35565b612a91576129ca60056129c48867ffffffffffffffff166000526007602052604060002090565b01614464565b9360005b8551811015612a1657600190612a0f60056129fd8b67ffffffffffffffff166000526007602052604060002090565b01612a08838a61302f565b5190614bfc565b50016129ce565b509350937f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916612a8360019397612a68612a638267ffffffffffffffff166000526007602052604060002090565b6135ab565b60405167ffffffffffffffff90911681529081906020820190565b0390a10191909392936126c7565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff861660045260246000fd5b346103675760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103675773ffffffffffffffffffffffffffffffffffffffff600435612b198161051a565b612b21613e8f565b16338114612b9357807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b604051906020820182811067ffffffffffffffff821117610a145760405260008252565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610367570180359067ffffffffffffffff82116103675760200191813603831361036757565b359063ffffffff8216820361036757565b9081604091031261036757612c73602060405192612c60846109f8565b8035612c6b816109aa565b845201612c32565b602082015290565b6020818303126103675780359067ffffffffffffffff821161036757016040818303126103675760405191612caf836109f8565b813567ffffffffffffffff81116103675781612ccc918401610b4f565b8352602082013567ffffffffffffffff811161036757612c739201610b4f565b908160209103126103675751610b6a816122e3565b9091612d18610b6a9360408452604084019061036c565b91602081840391015261036c565b6040513d6000823e3d90fd5b35610b6a816109aa565b35610b6a8161051a565b9067ffffffffffffffff610b6a92166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b612d8b613e8f565b60208101519160005b8351811015612e2a5780612dad610ce76001938761302f565b612dd4612dcf73ffffffffffffffffffffffffffffffffffffffff8316610d1f565b6150bb565b612de0575b5001612d94565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a138612dd9565b5091505160005b8151811015612f0e57612e47610ce7828461302f565b9073ffffffffffffffffffffffffffffffffffffffff821615612ee4577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef612edb83612eb3612eae610d1f60019773ffffffffffffffffffffffffffffffffffffffff1690565b614dd3565b5060405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390a101612e31565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612f515760051b0190565b612f12565b9190811015612f51576060020190565b60405190612f73826109f8565b60606020838281520152565b90604051612f8c81610a35565b606060ff600283958054855260018101546020860152015463ffffffff8116604085015260201c161515910152565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b916020610b6a938181520191612fbb565b90816020910312610367573590565b908160209103126103675751610b6a816109aa565b8051821015612f515760209160051b010190565b90600182811c9216801561308c575b602083101461305d57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613052565b90604051918260008254926130aa84613043565b808452936001811690811561311657506001146130cf575b506109c792500383610a6d565b90506000929192526020600020906000915b8183106130fa5750509060206109c792820101386130c2565b60209193508060019154838589010152019101909184926130e1565b602093506109c79592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386130c2565b60409067ffffffffffffffff610b6a95931681528160208201520191612fbb565b6040519061318482610a51565b60006080838281528260208201528260408201528260608201520152565b906040516131af81610a51565b60806fffffffffffffffffffffffffffffffff6001839560ff8154848116875263ffffffff81871c16602088015260a01c1615156040860152015481808216166060850152821c16910152565b67ffffffffffffffff166000526007602052610b6a6004604060002001613096565b613226613e8f565b60005b8281106132685750907fe6d14ea297366c7bc1265d289d924bfd8b9afb148eb972b481f70da41c842cf59161326360405192839283613454565b0390a1565b61327b6132768285856133e6565b6133f6565b80511580156133c0575b613353579061334d826132f361177d606060019651936132e460208201516132dc6132b7604085015163ffffffff1690565b60808501511515926132c7610adb565b998a5260208a015263ffffffff166040890152565b151586840152565b015167ffffffffffffffff1690565b6002908251815560208301516001820155019063ffffffff6040820151167fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000064ff0000000060608554940151151560201b16921617179055565b01613229565b604080517fa606c63500000000000000000000000000000000000000000000000000000000815282516004820152602083015160248201529082015163ffffffff166044820152606082015167ffffffffffffffff1660648201526080909101511515608482015260a490fd5b5067ffffffffffffffff6133df606083015167ffffffffffffffff1690565b1615613285565b9190811015612f515760a0020190565b60a0813603126103675760806040519161340f83610a51565b803583526020810135602084015261342960408201612c32565b6040840152606081013561343c816109aa565b6060840152013561344c816122e3565b608082015290565b602080825281018390526040019160005b8181106134725750505090565b90919260a080600192863581526020870135602082015263ffffffff61349a60408901612c32565b16604082015267ffffffffffffffff60608801356134b7816109aa565b16606082015260808701356134cb816122e3565b15156080820152019401929101613465565b91613515918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b818110613524575050565b60008155600101613519565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181029291811591840414171561357257565b613530565b8054906000815581613587575050565b6000526020600020908101905b81811061359f575050565b60008155600101613594565b60056109c79160008155600060018201556000600282015560006003820155600481016135d88154613043565b90816135e7575b505001613577565b81601f600093116001146135ff5750555b38806135df565b8183526020832061361a91601f01861c810190600101613519565b808252602082209081548360011b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8560031b1c1916179055556135f8565b9190811015612f515760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee181360301821215610367570190565b9080601f830112156103675781356136b1816112e1565b926136bf6040519485610a6d565b81845260208085019260051b820101918383116103675760208201905b8382106136eb57505050505090565b813567ffffffffffffffff81116103675760209161370e87848094880101610b4f565b8152019101906136dc565b61012081360312610367576040519061373182610a51565b61373a816109bc565b8252602081013567ffffffffffffffff81116103675761375d903690830161369a565b602083015260408101359067ffffffffffffffff82116103675761378761344c9236908301610b4f565b60408401526137993660608301612394565b606084015260c0369101612394565b8151815460208401516040850151608091821b73ffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffff000000000000000000000000000000000000000000909416939093179290921791151560a01b74ff000000000000000000000000000000000000000016919091178355606084015193810151901b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000016921691909117600190910155565b9190601f811161387e57505050565b6109c7926000526020600020906020601f840160051c830193106138aa575b601f0160051c0190613519565b909150819061389d565b919091825167ffffffffffffffff8111610a14576138dc816138d68454613043565b8461386f565b6020601f821160011461393657819061351593949560009261392b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b0151905038806138f9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169061396984600052602060002090565b9160005b8181106139c35750958360019596971061398c575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080613982565b9192602060018192868b01518155019401920161396d565b613a3f613a0a6109c79597969467ffffffffffffffff60a095168452610100602085015261010084019061036c565b9660408301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b01906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808101613a836117ac61057883612d3c565b613c4e57506020810190613b246020613ac9613aa161273f86612d32565b60801b7fffffffffffffffffffffffffffffffff000000000000000000000000000000001690565b6040517f2cbc26bb0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116600482015291829081906024820190565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561097457600091613c2f575b50613c0557613b84613b7f83612d32565b6144af565b613b8d82612d32565b90613bad6117ac60a0830193610bce613ba68686612be1565b3691610aea565b613bc557505090613bc06109c792612d32565b614547565b613bcf9250612be1565b90611b046040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260048401612ffa565b7f53ad11d80000000000000000000000000000000000000000000000000000000060005260046000fd5b613c48915060203d60201161096d5761095f8183610a6d565b38613b6e565b613c5a6109a691612d3c565b7f961c9a4f0000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff16600452602490565b90815160748110613e62575060048201517f000000000000000000000000000000000000000000000000000000000000000063ffffffff811663ffffffff831603613e295750506008820151916014600c82015191015192613d05602084015163ffffffff1690565b63ffffffff811663ffffffff831603613df05750507f000000000000000000000000000000000000000000000000000000000000000063ffffffff811663ffffffff831603613db75750505167ffffffffffffffff1667ffffffffffffffff811667ffffffffffffffff831603613d7a575050565b7ff917ffea0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff9081166004521660245260446000fd5b7f77e480260000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b7fe366a1170000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b7f960693cd0000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b7f758b22cc0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff600154163303613eb057565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b60409067ffffffffffffffff610b6a9493168152816020820152019061036c565b908051156120e0578051602082012067ffffffffffffffff831692836000526007602052613f30826005604060002001614e08565b15613f89575081613f787f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea93613f73613f84946000526008602052604060002090565b6138b4565b60405191829182611fa8565b0390a2565b9050611b046040519283927f393b8ad200000000000000000000000000000000000000000000000000000000845260048401613eda565b67ffffffffffffffff1660008181526006602052604090205490929190156140c257916140bf60e09261408b856140177f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b976142d8565b84600052600760205261402e8160406000206145f8565b614037836142d8565b8460005260076020526140518360026040600020016145f8565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b608081016141036117ac61057883612d3c565b613c4e575060208101906141216020613ac9613aa161273f86612d32565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610974576000916141a2575b50613c055760606141996109c79361418d61418860408601612d3c565b6148a6565b61155a613b7f82612d32565b91013590614928565b6141bb915060203d60201161096d5761095f8183610a6d565b3861416b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161357257565b9190820391821161357257565b614203613177565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff82511690602083019163ffffffff835116420342811161357257614267906fffffffffffffffffffffffffffffffff6080870151169061355f565b81018091116135725761428d6fffffffffffffffffffffffffffffffff92918392615182565b161682524263ffffffff16905290565b6109c79092919260608101936fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b80511561437c5760408101516fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff61433c61432760208501516fffffffffffffffffffffffffffffffff1690565b6fffffffffffffffffffffffffffffffff1690565b9116116143465750565b611b04906040519182917f8020d1240000000000000000000000000000000000000000000000000000000083526004830161429d565b6fffffffffffffffffffffffffffffffff6143aa60408301516fffffffffffffffffffffffffffffffff1690565b16158015906143f1575b6143bb5750565b611b04906040519182917fd68af9cc0000000000000000000000000000000000000000000000000000000083526004830161429d565b5061441261432760208301516fffffffffffffffffffffffffffffffff1690565b15156143b4565b604051906005548083528260208101600560005260206000209260005b81811061444b5750506109c792500383610a6d565b8454835260019485019487945060209093019201614436565b906040519182815491828252602082019060005260206000209260005b8181106144965750506109c792500383610a6d565b8454835260019485019487945060209093019201614481565b67ffffffffffffffff166144d0816000526006602052604060002054151590565b1561451a575033600052600b602052604060002054156144ec57565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fa9902c7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b67ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c911691826000526007602052806145c8600260406000200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016928391614e78565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101613f84565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19916147d761326392805461464961464361463a8363ffffffff9060801c1690565b63ffffffff1690565b426141ee565b90816147e3575b5050614791600161467460208601516fffffffffffffffffffffffffffffffff1690565b926146ff6146c26143276fffffffffffffffffffffffffffffffff6146a985546fffffffffffffffffffffffffffffffff1690565b166fffffffffffffffffffffffffffffffff8816615182565b82906fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b61475261470c8751151590565b82547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016178255565b019182906fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b604083015181546fffffffffffffffffffffffffffffffff1660809190911b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6040519182918261429d565b6143276146c2916fffffffffffffffffffffffffffffffff61485761485e958261485060018a0154928261484961484261482c876fffffffffffffffffffffffffffffffff1690565b996fffffffffffffffffffffffffffffffff1690565b9560801c90565b169061355f565b9116614cdd565b9116615182565b80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161781553880614650565b7f00000000000000000000000000000000000000000000000000000000000000006148ce5750565b73ffffffffffffffffffffffffffffffffffffffff16806000526003602052604060002054156148fb5750565b7fd0d259760000000000000000000000000000000000000000000000000000000060005260045260246000fd5b67ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da8178944911691826000526007602052806145c8604060002073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016928391614e78565b8054821015612f515760005260206000200190600090565b80548015614a22577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906149f382826149a6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600081815260036020526040902054908115614b2e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161357257600254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411613572578383600095614aed9503614af3575b505050614adc60026149be565b600390600052602052604060002090565b55600190565b614adc614b1f91614b15614b0b614b259560026149a6565b90549060031b1c90565b92839160026149a6565b906134dd565b55388080614acf565b5050600090565b600081815260066020526040902054908115614b2e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161357257600554927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411613572578383600095614aed9503614bd1575b505050614bc060056149be565b600690600052602052604060002090565b614bc0614b1f91614be9614b0b614bf39560056149a6565b92839160056149a6565b55388080614bb3565b6001810191806000528260205260406000205492831515600014614cd4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401848111613572578354937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8501948511613572576000958583614aed97614c8c9503614c9b575b5050506149be565b90600052602052604060002090565b614cbb614b1f91614cb2614b0b614ccb95886149a6565b928391876149a6565b8590600052602052604060002090565b55388080614c84565b50505050600090565b9190820180921161357257565b92614cf5919261355f565b810180911161357257610b6a91615182565b80549068010000000000000000821015610a145781614d2e916001613515940181556149a6565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b600081815260036020526040902054614d9857614d81816002614d07565b600254906000526003602052604060002055600190565b50600090565b600081815260066020526040902054614d9857614dbc816005614d07565b600554906000526006602052604060002055600190565b6000818152600b6020526040902054614d9857614df181600a614d07565b600a5490600052600b602052604060002055600190565b6000828152600182016020526040902054614b2e5780614e2a83600193614d07565b80549260005201602052604060002055600190565b8115614e49570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8054939290919060ff60a086901c161580156150b3575b6150ac57614eae6fffffffffffffffffffffffffffffffff8616614327565b9060018401958654614ee861464361463a614edb614327856fffffffffffffffffffffffffffffffff1690565b9460801c63ffffffff1690565b80615018575b5050838110614fcd5750828210614f4e57506109c7939450614f1391614327916141ee565b6fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b90614f856109a693614f80614f7184614f6b6143278c5460801c90565b936141ee565b614f7a836141c1565b90614cdd565b614e3f565b7fd0c8d23a0000000000000000000000000000000000000000000000000000000060005260045260245273ffffffffffffffffffffffffffffffffffffffff16604452606490565b7f1a76572a00000000000000000000000000000000000000000000000000000000600052600452602483905273ffffffffffffffffffffffffffffffffffffffff1660445260646000fd5b828592939511615082576150326143276150399460801c90565b9185614cea565b84547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178555913880614eee565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050509050565b508115614e8f565b6000818152600b6020526040902054908115614b2e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161357257600a54927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411613572578383614aed9460009603615157575b505050615146600a6149be565b600b90600052602052604060002090565b615146614b1f9161516f614b0b61517995600a6149a6565b928391600a6149a6565b55388080615139565b908082101561518f575090565b90509056fea164736f6c634300081a000a" - -type USDCTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewUSDCTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*USDCTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(USDCTokenPoolABI)) - if err != nil { - return nil, err - } - return &USDCTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *USDCTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *USDCTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *USDCTokenPoolContract) SetDomains(opts *bind.TransactOpts, args []DomainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDomains", args) -} - -func (c *USDCTokenPoolContract) GetDomain(opts *bind.CallOpts, args uint64) (Domain, error) { - var out []any - err := c.contract.Call(opts, &out, "getDomain", args) - if err != nil { - var zero Domain - return zero, err - } - return *abi.ConvertType(out[0], new(Domain)).(*Domain), nil -} - -func (c *USDCTokenPoolContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *USDCTokenPoolContract) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []ChainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) -} - -func (c *USDCTokenPoolContract) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *USDCTokenPoolContract) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *USDCTokenPoolContract) TransferOwnership(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "transferOwnership", args) -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type ChainUpdate struct { - RemoteChainSelector uint64 - RemotePoolAddresses [][]byte - RemoteTokenAddress []byte - OutboundRateLimiterConfig Config - InboundRateLimiterConfig Config -} - -type Config struct { - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - -type Domain struct { - AllowedCaller [32]byte - MintRecipient [32]byte - DomainIdentifier uint32 - Enabled bool -} - -type DomainUpdate struct { - AllowedCaller [32]byte - MintRecipient [32]byte - DomainIdentifier uint32 - DestChainSelector uint64 - Enabled bool -} - type ApplyChainUpdatesArgs struct { - RemoteChainSelectorsToRemove []uint64 - ChainsToAdd []ChainUpdate + RemoteChainSelectorsToRemove []uint64 `json:"remoteChainSelectorsToRemove"` + ChainsToAdd []gobindings.TokenPoolChainUpdate `json:"chainsToAdd"` } type AddRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type RemoveRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type ConstructorArgs struct { - TokenMessenger common.Address - CctpMessageTransmitterProxy common.Address - Token common.Address - Allowlist []common.Address - RmnProxy common.Address - Router common.Address - SupportedUSDCVersion uint32 + TokenMessenger common.Address `json:"tokenMessenger"` + CctpMessageTransmitterProxy common.Address `json:"cctpMessageTransmitterProxy"` + Token common.Address `json:"token"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + SupportedUSDCVersion uint32 `json:"supportedUSDCVersion"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "usdc-token-pool:deploy", - Version: Version, - Description: "Deploys the USDCTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: USDCTokenPoolABI, - Bin: USDCTokenPoolBin, - }, + Name: "usdc-token-pool:deploy", + Version: Version, + Description: "Deploys the USDCTokenPool contract", + ContractMetadata: gobindings.USDCTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(USDCTokenPoolBin), + EVM: common.FromHex(gobindings.USDCTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var SetDomains = contract.NewWrite(contract.WriteParams[[]DomainUpdate, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:set-domains", - Version: Version, - Description: "Calls setDomains on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, []DomainUpdate], - Validate: func([]DomainUpdate) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args []DomainUpdate, - ) (*types.Transaction, error) { - return c.SetDomains(opts, args) - }, -}) - -var GetDomain = contract.NewRead(contract.ReadParams[uint64, Domain, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:get-domain", - Version: Version, - Description: "Calls getDomain on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolContract, - CallContract: func(c *USDCTokenPoolContract, opts *bind.CallOpts, args uint64) (Domain, error) { - return c.GetDomain(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, }) -var ApplyChainUpdates = contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:apply-chain-updates", - Version: Version, - Description: "Calls applyChainUpdates on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, ApplyChainUpdatesArgs], - Validate: func(ApplyChainUpdatesArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args ApplyChainUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) - }, -}) - -var AddRemotePool = contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:add-remote-pool", - Version: Version, - Description: "Calls addRemotePool on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, AddRemotePoolArgs], - Validate: func(AddRemotePoolArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args AddRemotePoolArgs, - ) (*types.Transaction, error) { - return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var RemoveRemotePool = contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:remove-remote-pool", - Version: Version, - Description: "Calls removeRemotePool on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, RemoveRemotePoolArgs], - Validate: func(RemoveRemotePoolArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args RemoveRemotePoolArgs, - ) (*types.Transaction, error) { - return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var TransferOwnership = contract.NewWrite(contract.WriteParams[common.Address, *USDCTokenPoolContract]{ - Name: "usdc-token-pool:transfer-ownership", - Version: Version, - Description: "Calls transferOwnership on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolABI, - NewContract: NewUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *USDCTokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.TransferOwnership(opts, args) - }, -}) +func NewReadGetDomain(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.USDCTokenPoolDomain, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.USDCTokenPoolDomain, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:get-domain", + Version: Version, + Description: "Calls getDomain on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, args uint64) (gobindings.USDCTokenPoolDomain, error) { + return c.GetDomain(opts, args) + }, + }) +} + +func NewWriteSetDomains(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.USDCTokenPoolDomainUpdate], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.USDCTokenPoolDomainUpdate, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:set-domains", + Version: Version, + Description: "Calls setDomains on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.USDCTokenPoolDomainUpdate) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolInterface, + opts *bind.TransactOpts, + args []gobindings.USDCTokenPoolDomainUpdate, + ) (*types.Transaction, error) { + return c.SetDomains(opts, args) + }, + }) +} + +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} + +func NewReadGetAllAuthorizedCallers(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} + +func NewWriteApplyChainUpdates(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[ApplyChainUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:apply-chain-updates", + Version: Version, + Description: "Calls applyChainUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args ApplyChainUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolInterface, + opts *bind.TransactOpts, + args ApplyChainUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) + }, + }) +} + +func NewWriteAddRemotePool(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[AddRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:add-remote-pool", + Version: Version, + Description: "Calls addRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args AddRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolInterface, + opts *bind.TransactOpts, + args AddRemotePoolArgs, + ) (*types.Transaction, error) { + return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewWriteRemoveRemotePool(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[RemoveRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:remove-remote-pool", + Version: Version, + Description: "Calls removeRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args RemoveRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolInterface, + opts *bind.TransactOpts, + args RemoveRemotePoolArgs, + ) (*types.Transaction, error) { + return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.USDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.USDCTokenPoolInterface]{ + Name: "usdc-token-pool:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} diff --git a/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go b/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go index dc1fb1cede..a80bdf762f 100644 --- a/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go +++ b/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go @@ -3,371 +3,198 @@ package usdc_token_pool_cctp_v2 import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool_cctp_v2" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "USDCTokenPoolCCTPV2" var Version = semver.MustParse("1.6.5") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const USDCTokenPoolCCTPV2ABI = `[{"type":"constructor","inputs":[{"name":"tokenMessenger","type":"address","internalType":"contract ITokenMessenger"},{"name":"cctpMessageTransmitterProxy","type":"address","internalType":"contract CCTPMessageTransmitterProxy"},{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"FINALITY_THRESHOLD","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"MAX_FEE","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"MIN_USDC_MESSAGE_LENGTH","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCurrentInboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getCurrentOutboundRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDomain","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct USDCTokenPool.Domain","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getRateLimitAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRouter","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"i_localDomainIdentifier","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"i_messageTransmitterProxy","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract CCTPMessageTransmitterProxy"}],"stateMutability":"view"},{"type":"function","name":"i_supportedUSDCVersion","inputs":[],"outputs":[{"name":"","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"i_tokenMessenger","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setChainRateLimiterConfigs","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"outboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundConfigs","type":"tuple[]","internalType":"struct RateLimiter.Config[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDomains","inputs":[{"name":"domains","type":"tuple[]","internalType":"struct USDCTokenPool.DomainUpdate[]","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitAdmin","inputs":[{"name":"rateLimitAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRouter","inputs":[{"name":"newRouter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ConfigChanged","inputs":[{"name":"config","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"tokenMessenger","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DomainsSet","inputs":[{"name":"","type":"tuple[]","indexed":false,"internalType":"struct USDCTokenPool.DomainUpdate[]","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitAdminSet","inputs":[{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"name":"oldRouter","type":"address","indexed":false,"internalType":"address"},{"name":"newRouter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidBurnToken","inputs":[{"name":"expected","type":"address","internalType":"address"},{"name":"got","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidConfig","inputs":[]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidDepositHash","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"got","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidDestinationDomain","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidDomain","inputs":[{"name":"domain","type":"tuple","internalType":"struct USDCTokenPool.DomainUpdate","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipient","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"enabled","type":"bool","internalType":"bool"}]}]},{"type":"error","name":"InvalidExecutionFinalityThreshold","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidMessageLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidMessageVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidMinFee","inputs":[{"name":"maxAcceptableFee","type":"uint256","internalType":"uint256"},{"name":"actualFee","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidMinFinalityThreshold","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidNonce","inputs":[{"name":"expected","type":"uint64","internalType":"uint64"},{"name":"got","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidReceiver","inputs":[{"name":"receiver","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourceDomain","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidSourcePoolDataLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenMessengerVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidTransmitterInProxy","inputs":[]},{"type":"error","name":"InvalidVersion","inputs":[{"name":"version","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnknownDomain","inputs":[{"name":"domain","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"UnlockingUSDCFailed","inputs":[]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const USDCTokenPoolCCTPV2Bin = "0x610180806040523461064c57615d42803803809161001d82856109d5565b8339810160c08282031261064c578151906001600160a01b03821680830361064c576020840151926001600160a01b0384169081850361064c5760408601516001600160a01b0381169690949087860361064c5760608101516001600160401b03811161064c5781019180601f8401121561064c578251926001600160401b038411610651578360051b9060208201946100ba60405196876109d5565b855260208086019282010192831161064c57602001905b8282106109bd575050506100f360a06100ec608084016109f8565b92016109f8565b9060209660405199610105898c6109d5565b60008b52600036813733156109ac57600180546001600160a01b031916331790558015801561099b575b801561098a575b61097957600492899260805260c0526040519283809263313ce56760e01b82525afa8091600091610942575b509061091e575b50600660a052600480546001600160a01b0319166001600160a01b03929092169190911790558051151560e08190526107f8575b50604051926101ac85856109d5565b60008452600036813760408051979088016001600160401b03811189821017610651576040528752838588015260005b8451811015610243576001906001600160a01b036101fa8288610a28565b51168761020682610aa9565b610213575b5050016101dc565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a1388761020b565b508493508587519260005b84518110156102bf576001600160a01b036102698287610a28565b51169081156102ae577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef88836102a0600195610bc5565b50604051908152a10161024e565b6342bcdf7f60e11b60005260046000fd5b509085918560016101005284156107e757604051632c12192160e01b81528481600481895afa9081156106b7576000916107b2575b5060405163054fd4d560e41b81526001600160a01b039190911691908581600481865afa9081156106b757600091610795575b5063ffffffff80610100511691169080820361077e575050604051639cdbb18160e01b815285816004818a5afa9081156106b757600091610761575b5063ffffffff80610100511691169080820361074a57505084600491604051928380926367e0ed8360e11b82525afa80156106b7578291600091610701575b506001600160a01b0316036106f057600492849261012052610140526040519283809263234d8e3d60e21b82525afa9081156106b7576000916106c3575b506101605260805161012051604051636eb1769f60e11b81523060048201526001600160a01b03918216602482018190529492909116908381604481855afa9081156106b75760009161068a575b50600019810180911161067457604051908482019563095ea7b360e01b875260248301526044820152604481526104666064826109d5565b60008060409687519361047989866109d5565b8785527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488860152519082865af13d15610667573d906001600160401b0382116106515786516104e69490926104d8601f8201601f19168901856109d5565b83523d60008885013e610c92565b8051806105d3575b847f2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea954485858351908152a151614fdf9081610d6382396080518181816104b901528181610535015281816107dd0152818161159e015281816143de01526147bc015260a05181610635015260c05181818161218a015281816136f30152613e5e015260e051818181610b560152818161228f01526146e6015261010051818181610468015261393f015261012051818181610d5801526114ef01526101405181818161074501526113ba015261016051818181610e790152818161169a01526139c50152f35b8184918101031261064c5782015180159081150361064c576105f65783806104ee565b50608491519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b916104e692606091610c92565b634e487b7160e01b600052601160045260246000fd5b90508381813d83116106b0575b6106a181836109d5565b8101031261064c57518561042e565b503d610697565b6040513d6000823e3d90fd5b6106e39150823d84116106e9575b6106db81836109d5565b810190610a0c565b836103e0565b503d6106d1565b632a32133b60e11b60005260046000fd5b9091508581813d8311610743575b61071981836109d5565b8101031261073f5751906001600160a01b038216820361073c57508190876103a2565b80fd5b5080fd5b503d61070f565b633785f8f160e01b60005260045260245260446000fd5b6107789150863d88116106e9576106db81836109d5565b87610363565b63960693cd60e01b60005260045260245260446000fd5b6107ac9150863d88116106e9576106db81836109d5565b87610327565b90508481813d83116107e0575b6107c981836109d5565b8101031261064c576107da906109f8565b866102f4565b503d6107bf565b6306b7c75960e31b60005260046000fd5b9091946040519361080986866109d5565b60008552600036813760e0511561090d5760005b8551811015610884576001906001600160a01b0361083b8289610a28565b51168861084782610bfe565b610854575b50500161081d565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1388861084c565b50919350919460005b8451811015610901576001906001600160a01b036108ab8288610a28565b511680156108fb57876108bd82610b86565b6108cb575b50505b0161088d565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a138876108c2565b506108c5565b5091949092503861019d565b6335f4a7b360e01b60005260046000fd5b60ff1660068114610169576332ad3e0760e11b600052600660045260245260446000fd5b8881813d8311610972575b61095781836109d5565b8101031261073f57519060ff8216820361073c575038610162565b503d61094d565b630a64406560e11b60005260046000fd5b506001600160a01b03831615610136565b506001600160a01b0384161561012f565b639b15e16f60e01b60005260046000fd5b602080916109ca846109f8565b8152019101906100d1565b601f909101601f19168101906001600160401b0382119082101761065157604052565b51906001600160a01b038216820361064c57565b9081602091031261064c575163ffffffff8116810361064c5790565b8051821015610a3c5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b8054821015610a3c5760005260206000200190600090565b80548015610a93576000190190610a818282610a52565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b6000818152600b60205260409020548015610b5457600019810181811161067457600a5460001981019190821161067457808203610b03575b505050610aef600a610a6a565b600052600b60205260006040812055600190565b610b3c610b14610b2593600a610a52565b90549060031b1c928392600a610a52565b819391549060031b91821b91600019901b19161790565b9055600052600b602052604060002055388080610ae2565b5050600090565b805490680100000000000000008210156106515781610b25916001610b8294018155610a52565b9055565b80600052600360205260406000205415600014610bbf57610ba8816002610b5b565b600254906000526003602052604060002055600190565b50600090565b80600052600b60205260406000205415600014610bbf57610be781600a610b5b565b600a5490600052600b602052604060002055600190565b6000818152600360205260409020548015610b545760001981018181116106745760025460001981019190821161067457818103610c58575b505050610c446002610a6a565b600052600360205260006040812055600190565b610c7a610c69610b25936002610a52565b90549060031b1c9283926002610a52565b90556000526003602052604060002055388080610c37565b91929015610cf45750815115610ca6575090565b3b15610caf5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015610d075750805190602001fd5b6040519062461bcd60e51b8252602060048301528181519182602483015260005b838110610d4a5750508160006044809484010152601f80199101168101030190fd5b60208282018101516044878401015285935001610d2856fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146102a7578063181f5a77146102a2578063212a052e1461029d57806321df0da714610298578063240028e8146102935780632451a6271461028e57806324f65ee71461028957806339077537146102845780634c5ef0ed1461027f57806354c8a4f31461027a5780636155cda01461027557806362ddd3c4146102705780636b716b0d1461026b5780636d3d1a581461026657806379ba5097146102615780637d54534e1461025c5780638926f54f146102575780638da5cb5b1461025257806391a2749a1461024d578063962d40201461024857806398db9643146102435780639a4575b91461023e578063a42a7b8b14610239578063a7cd63b714610234578063acfecf911461022f578063af58d59f1461022a578063b0f479a114610225578063b794658014610220578063bc063e1a1461021b578063c0d7865514610216578063c4bffe2b14610211578063c75eea9c1461020c578063c781d0e314610207578063c8c8fd1914610202578063cf7401f3146101fd578063da4b05e7146101f8578063dc0bd971146101f3578063dfadfa35146101ee578063e0351e13146101e9578063e8a1da17146101e45763f2fde38b146101df57600080fd5b6126d3565b6122b4565b612277565b6121ae565b61215d565b612140565b612042565b611f2b565b611ece565b611e83565b611df0565b611cce565b611cb2565b611c7b565b611c36565b611b8a565b611a5e565b611a04565b611902565b611431565b61138d565b6111ee565b611129565b61106c565b61102d565b610f9c565b610ed1565b610e9d565b610e5c565b610dd9565b610d2b565b610b24565b610a58565b610659565b61061b565b6105b5565b6104fb565b61048c565b61044b565b6103e8565b34610379576020600319360112610379576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361037957807faff2afbf000000000000000000000000000000000000000000000000000000006020921490811561034f575b8115610325575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861031a565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150610313565b600080fd5b600091031261037957565b919082519283825260005b8481106103d35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201610394565b3461037957600060031936011261037957610447604080519061040b8183610958565b601982527f55534443546f6b656e506f6f6c43435450563220312e362e3500000000000000602083015251918291602083526020830190610389565b0390f35b3461037957600060031936011261037957602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461037957600060031936011261037957602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b73ffffffffffffffffffffffffffffffffffffffff81160361037957565b3461037957602060031936011261037957602061055b60043561051d816104dd565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691161490565b6040519015158152f35b602060408183019282815284518094520192019060005b8181106105895750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161057c565b3461037957600060031936011261037957604051600a548082526020820190600a60005260206000209060005b81811061060557610447856105f981870382610958565b60405191829182610565565b82548452602090930192600192830192016105e2565b3461037957600060031936011261037957602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103795760206003193601126103795760043567ffffffffffffffff811161037957806004016101006003198336030112610379576106976127a9565b5061072a60206064840135926106ad8482613626565b6106ef6106e86106e36106dc6106d16106c960e48b01876127cd565b81019061281e565b9460c48a01906127cd565b36916109d5565b61384b565b825161392c565b8181519101519060405193849283927f57ecfd28000000000000000000000000000000000000000000000000000000008452600484016128ac565b0381600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af190811561089057600091610861575b501561083757817ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc067ffffffffffffffff6107c260446107bb602461044798016128dd565b94016128e7565b6040805173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081168252336020830152929092169082015260608101859052921691608090a2610824610999565b8190526040519081529081906020820190565b7fbf969f220000000000000000000000000000000000000000000000000000000060005260046000fd5b610883915060203d602011610889575b61087b8183610958565b810190612897565b38610776565b503d610871565b6128d1565b67ffffffffffffffff81160361037957565b35906108b282610895565b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176108ff57604052565b6108b4565b6060810190811067ffffffffffffffff8211176108ff57604052565b6080810190811067ffffffffffffffff8211176108ff57604052565b60a0810190811067ffffffffffffffff8211176108ff57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108ff57604052565b604051906108b2602083610958565b604051906108b2604083610958565b604051906108b260a083610958565b604051906108b2608083610958565b92919267ffffffffffffffff82116108ff5760405191610a1d601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184610958565b829481845281830111610379578281602093846000960137010152565b9080601f8301121561037957816020610a55933591016109d5565b90565b3461037957604060031936011261037957600435610a7581610895565b60243567ffffffffffffffff811161037957602091610a9b61055b923690600401610a3a565b906128f1565b9181601f840112156103795782359167ffffffffffffffff8311610379576020808501948460051b01011161037957565b60406003198201126103795760043567ffffffffffffffff81116103795781610afd91600401610aa1565b929092916024359067ffffffffffffffff821161037957610b2091600401610aa1565b9091565b3461037957610b4c610b54610b3836610ad2565b9491610b45939193613bb3565b36916110b8565b9236916110b8565b7f000000000000000000000000000000000000000000000000000000000000000015610d015760005b8251811015610c425780610bb0610b9660019386612bd4565b5173ffffffffffffffffffffffffffffffffffffffff1690565b610bec610be773ffffffffffffffffffffffffffffffffffffffff83165b73ffffffffffffffffffffffffffffffffffffffff1690565b61488f565b610bf8575b5001610b7d565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756690602090a138610bf1565b5060005b8151811015610cff5780610c5f610b9660019385612bd4565b73ffffffffffffffffffffffffffffffffffffffff811615610cf957610ca2610c9d73ffffffffffffffffffffffffffffffffffffffff8316610bce565b614ba1565b610caf575b505b01610c46565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d890602090a183610ca7565b50610ca9565b005b7f35f4a7b30000000000000000000000000000000000000000000000000000000060005260046000fd5b3461037957600060031936011261037957602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b604060031982011261037957600435610d9481610895565b9160243567ffffffffffffffff811161037957826023820112156103795780600401359267ffffffffffffffff84116103795760248483010111610379576024019190565b3461037957610de736610d7c565b610df2929192613bb3565b67ffffffffffffffff8216610e14816000526006602052604060002054151590565b15610e2f5750610cff92610e299136916109d5565b90613c1f565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b3461037957600060031936011261037957602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461037957600060031936011261037957602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b346103795760006003193601126103795760005473ffffffffffffffffffffffffffffffffffffffff81163303610f72577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b34610379576020600319360112610379577f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174602073ffffffffffffffffffffffffffffffffffffffff600435610ff1816104dd565b610ff9613bb3565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955604051908152a1005b3461037957602060031936011261037957602061055b67ffffffffffffffff60043561105881610895565b166000526006602052604060002054151590565b3461037957600060031936011261037957602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b67ffffffffffffffff81116108ff5760051b60200190565b9291906110c4816110a0565b936110d26040519586610958565b602085838152019160051b810192831161037957905b8282106110f457505050565b602080918335611103816104dd565b8152019101906110e8565b9080601f8301121561037957816020610a55933591016110b8565b346103795760206003193601126103795760043567ffffffffffffffff8111610379576040600319823603011261037957604051611166816108e3565b816004013567ffffffffffffffff81116103795761118a906004369185010161110e565b8152602482013567ffffffffffffffff811161037957610cff9260046111b3923692010161110e565b602082015261292e565b9181601f840112156103795782359167ffffffffffffffff8311610379576020808501946060850201011161037957565b346103795760606003193601126103795760043567ffffffffffffffff81116103795761121f903690600401610aa1565b9060243567ffffffffffffffff8111610379576112409036906004016111bd565b9060443567ffffffffffffffff8111610379576112619036906004016111bd565b611283610bce60095473ffffffffffffffffffffffffffffffffffffffff1690565b33141580611362575b61133057838614801590611326575b6112fc5760005b8681106112ab57005b806112f66112c46112bf6001948b8b612aec565b6128dd565b6112cf838989612b01565b6112f06112e86112e086898b612b01565b923690611ff9565b913690611ff9565b91613ce4565b016112a2565b7f568efce20000000000000000000000000000000000000000000000000000000060005260046000fd5b508086141561129b565b7f8e4a23d6000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6000fd5b50611385610bce60015473ffffffffffffffffffffffffffffffffffffffff1690565b33141561128c565b3461037957600060031936011261037957602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b90610a55916020815260206113fe83516040838501526060840190610389565b9201519060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082850301910152610389565b346103795760206003193601126103795760043567ffffffffffffffff8111610379578060040160a060031983360301126103795761146e612b11565b5061147881613e14565b60248201916114ab6114a661148c856128dd565b67ffffffffffffffff16600052600c602052604060002090565b612b2a565b6114bf6114bb6060830151151590565b1590565b6118425760206114cf84806127cd565b9050036117fe57606473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016920135926040517f516990e30000000000000000000000000000000000000000000000000000000081526020818061154f88600483019190602083019252565b0381875afa600091816117cd575b50611795575b5060208201519081156117785750935b6040820192611586845163ffffffff1690565b9273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016938151833b15610379576040517f8e0250ee0000000000000000000000000000000000000000000000000000000081526004810189905263ffffffff9290921660248301526044820189905273ffffffffffffffffffffffffffffffffffffffff861660648301526084820152600060a482018190526107d060c4830152909492859060e490829084905af18015610890576116ef611740966116ce7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1094866104479c61173b9a67ffffffffffffffff9761175d575b506116c47f0000000000000000000000000000000000000000000000000000000000000000955163ffffffff1690565b9251928d86613ee5565b6116e56116d96109a8565b63ffffffff9093168352565b6020820152613f90565b966117336116fc866128dd565b6040805173ffffffffffffffffffffffffffffffffffffffff90971687523360208801528601929092529116929081906060820190565b0390a26128dd565b612da1565b906117496109a8565b9182526020820152604051918291826113de565b8061176c600061177293610958565b8061037e565b38611694565b61178f915080611787916127cd565b810190612bc5565b93611573565b8015611563577f24ff10b000000000000000000000000000000000000000000000000000000000600090815260045260245260446000fd5b6117f091925060203d6020116117f7575b6117e88183610958565b810190612bb6565b903861155d565b503d6117de565b61180883806127cd565b9061183e6040519283927fa3c8cf0900000000000000000000000000000000000000000000000000000000845260048401612ba5565b0390fd5b61135e61184e856128dd565b7fd201c48a0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b602081016020825282518091526040820191602060408360051b8301019401926000915b8383106118b757505050505090565b90919293946020806118f3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc086600196030187528951610389565b970193019301919392906118a8565b346103795760206003193601126103795767ffffffffffffffff60043561192881610895565b16600052600760205261194160056040600020016142a2565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611987611971846110a0565b9361197f6040519586610958565b8085526110a0565b0160005b8181106119f357505060005b81518110156119e557806119c96119c46119b360019486612bd4565b516000526008602052604060002090565b612c3b565b6119d38286612bd4565b526119de8185612bd4565b5001611997565b604051806104478582611884565b80606060208093870101520161198b565b34610379576000600319360112610379576040516002548082526020820190600260005260206000209060005b818110611a4857610447856105f981870382610958565b8254845260209093019260019283019201611a31565b3461037957611a6c36610d7c565b611a77929192613bb3565b67ffffffffffffffff821691611a9d6114bb846000526006602052604060002054151590565b611b5357611ae06114bb6005611ac78467ffffffffffffffff166000526007602052604060002090565b01611ad33686896109d5565b6020815191012090614a3a565b611b1c57507f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769192611b1760405192839283612ba5565b0390a2005b61183e84926040519384937f74f23c7c00000000000000000000000000000000000000000000000000000000855260048501612cfb565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b346103795760206003193601126103795767ffffffffffffffff600435611bb081610895565b611bb8612d1c565b50166000526007602052610447611bdd611bd86002604060002001612d47565b614039565b6040519182918291909160806fffffffffffffffffffffffffffffffff8160a084019582815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b3461037957600060031936011261037957602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b906020610a55928181520190610389565b3461037957602060031936011261037957610447611c9e60043561173b81610895565b604051918291602083526020830190610389565b3461037957600060031936011261037957602060405160008152f35b346103795760206003193601126103795773ffffffffffffffffffffffffffffffffffffffff600435611d00816104dd565b611d08613bb3565b168015611d825760407f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a1005b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b602060408183019282815284518094520192019060005b818110611dd05750505090565b825167ffffffffffffffff16845260209384019390920191600101611dc3565b3461037957600060031936011261037957611e09614257565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611e39611971846110a0565b0136602084013760005b8151811015611e75578067ffffffffffffffff611e6260019385612bd4565b5116611e6e8286612bd4565b5201611e43565b604051806104478582611dac565b346103795760206003193601126103795767ffffffffffffffff600435611ea981610895565b611eb1612d1c565b50166000526007602052610447611bdd611bd86040600020612d47565b346103795760206003193601126103795760043567ffffffffffffffff8111610379573660238201121561037957806004013567ffffffffffffffff81116103795736602460a0830284010111610379576024610cff9201612dc3565b346103795760006003193601126103795760206040516101188152f35b8015150361037957565b35906fffffffffffffffffffffffffffffffff8216820361037957565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c60609101126103795760405190611fa682610904565b81608435611fb381611f48565b815260a4356fffffffffffffffffffffffffffffffff8116810361037957602082015260c435906fffffffffffffffffffffffffffffffff821682036103795760400152565b91908260609103126103795760405161201181610904565b604061203d818395803561202481611f48565b855261203260208201611f52565b602086015201611f52565b910152565b346103795760e06003193601126103795760043561205f81610895565b60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc3601126103795760405161209581610904565b6024356120a181611f48565b81526044356fffffffffffffffffffffffffffffffff811681036103795760208201526064356fffffffffffffffffffffffffffffffff811681036103795760408201526120ee36611f6f565b9073ffffffffffffffffffffffffffffffffffffffff600954163314158061211e575b61133057610cff92613ce4565b5073ffffffffffffffffffffffffffffffffffffffff60015416331415612111565b346103795760006003193601126103795760206040516107d08152f35b3461037957600060031936011261037957602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346103795760206003193601126103795767ffffffffffffffff6004356121d481610895565b600060606040516121e481610920565b828152826020820152826040820152015216600052600c602052610447604060002060ff60026040519261221784610920565b8054845260018101546020850152015463ffffffff8116604084015260201c1615156060820152604051918291829190916060806080830194805184526020810151602085015263ffffffff604082015116604085015201511515910152565b346103795760006003193601126103795760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b34610379576122c236610ad2565b9190926122cd613bb3565b6000915b80831061257f5750505060009163ffffffff4216925b8281106122f057005b6123036122fe828585613210565b6132cf565b90606082016123128151614116565b60808301936123218551614116565b604084019081515115611d825761235b6114bb612356612349885167ffffffffffffffff1690565b67ffffffffffffffff1690565b614bdc565b6125345761249461239461237a879a999a5167ffffffffffffffff1690565b67ffffffffffffffff166000526007602052604060002090565b6124578961245187516124386123bd60408301516fffffffffffffffffffffffffffffffff1690565b9161241f6123e86123e160208401516fffffffffffffffffffffffffffffffff1690565b9251151590565b6124166123f36109b7565b6fffffffffffffffffffffffffffffffff851681529763ffffffff166020890152565b15156040870152565b6fffffffffffffffffffffffffffffffff166060850152565b6fffffffffffffffffffffffffffffffff166080830152565b8261335e565b612489896124808a516124386123bd60408301516fffffffffffffffffffffffffffffffff1690565b6002830161335e565b60048451910161346a565b602085019660005b885180518210156124d757906124d16001926124ca836124c48c5167ffffffffffffffff1690565b92612bd4565b5190613c1f565b0161249c565b5050979650949061252b7f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c293926125186001975167ffffffffffffffff1690565b9251935190519060405194859485613591565b0390a1016122e7565b61135e612549865167ffffffffffffffff1690565b7f1d5ad3c50000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b9091926125906112bf858486612aec565b946125a76114bb67ffffffffffffffff8816614973565b61269b576125d460056125ce8867ffffffffffffffff166000526007602052604060002090565b016142a2565b9360005b85518110156126205760019061261960056126078b67ffffffffffffffff166000526007602052604060002090565b01612612838a612bd4565b5190614a3a565b50016125d8565b509350937f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d85991661268d6001939761267261266d8267ffffffffffffffff166000526007602052604060002090565b613161565b60405167ffffffffffffffff90911681529081906020820190565b0390a10191909392936122d1565b7f1e670e4b0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff861660045260246000fd5b346103795760206003193601126103795773ffffffffffffffffffffffffffffffffffffffff600435612705816104dd565b61270d613bb3565b1633811461277f57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b604051906020820182811067ffffffffffffffff8211176108ff5760405260008252565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610379570180359067ffffffffffffffff82116103795760200191813603831361037957565b6020818303126103795780359067ffffffffffffffff821161037957016040818303126103795760405191612852836108e3565b813567ffffffffffffffff8111610379578161286f918401610a3a565b8352602082013567ffffffffffffffff81116103795761288f9201610a3a565b602082015290565b908160209103126103795751610a5581611f48565b90916128c3610a5593604084526040840190610389565b916020818403910152610389565b6040513d6000823e3d90fd5b35610a5581610895565b35610a55816104dd565b9067ffffffffffffffff610a5592166000526007602052600560406000200190602081519101209060019160005201602052604060002054151590565b612936613bb3565b60208101519160005b83518110156129d55780612958610b9660019387612bd4565b61297f61297a73ffffffffffffffffffffffffffffffffffffffff8316610bce565b614ef9565b61298b575b500161293f565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a138612984565b5091505160005b8151811015612ab9576129f2610b968284612bd4565b9073ffffffffffffffffffffffffffffffffffffffff821615612a8f577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef612a8683612a5e612a59610bce60019773ffffffffffffffffffffffffffffffffffffffff1690565b614c11565b5060405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390a1016129dc565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612afc5760051b0190565b612abd565b9190811015612afc576060020190565b60405190612b1e826108e3565b60606020838281520152565b90604051612b3781610920565b606060ff600283958054855260018101546020860152015463ffffffff8116604085015260201c161515910152565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b916020610a55938181520191612b66565b90816020910312610379575190565b90816020910312610379573590565b8051821015612afc5760209160051b010190565b90600182811c92168015612c31575b6020831014612c0257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612bf7565b9060405191826000825492612c4f84612be8565b8084529360018116908115612cbb5750600114612c74575b506108b292500383610958565b90506000929192526020600020906000915b818310612c9f5750509060206108b29282010138612c67565b6020919350806001915483858901015201910190918492612c86565b602093506108b29592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138612c67565b60409067ffffffffffffffff610a5595931681528160208201520191612b66565b60405190612d298261093c565b60006080838281528260208201528260408201528260608201520152565b90604051612d548161093c565b60806fffffffffffffffffffffffffffffffff6001839560ff8154848116875263ffffffff81871c16602088015260a01c1615156040860152015481808216166060850152821c16910152565b67ffffffffffffffff166000526007602052610a556004604060002001612c3b565b612dcb613bb3565b60005b828110612e0d5750907fe6d14ea297366c7bc1265d289d924bfd8b9afb148eb972b481f70da41c842cf591612e086040519283928361300a565b0390a1565b612e20612e1b828585612f8b565b612fac565b8051158015612f65575b612ef85790612ef282612e9861148c60606001965193612e896020820151612e81612e5c604085015163ffffffff1690565b6080850151151592612e6c6109c6565b998a5260208a015263ffffffff166040890152565b151586840152565b015167ffffffffffffffff1690565b6002908251815560208301516001820155019063ffffffff6040820151167fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000064ff0000000060608554940151151560201b16921617179055565b01612dce565b604080517fa606c63500000000000000000000000000000000000000000000000000000000815282516004820152602083015160248201529082015163ffffffff166044820152606082015167ffffffffffffffff1660648201526080909101511515608482015260a490fd5b5067ffffffffffffffff612f84606083015167ffffffffffffffff1690565b1615612e2a565b9190811015612afc5760a0020190565b359063ffffffff8216820361037957565b60a08136031261037957608060405191612fc58361093c565b8035835260208101356020840152612fdf60408201612f9b565b60408401526060810135612ff281610895565b6060840152013561300281611f48565b608082015290565b602080825281018390526040019160005b8181106130285750505090565b90919260a080600192863581526020870135602082015263ffffffff61305060408901612f9b565b16604082015267ffffffffffffffff606088013561306d81610895565b166060820152608087013561308181611f48565b1515608082015201940192910161301b565b916130cb918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b8181106130da575050565b600081556001016130cf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181029291811591840414171561312857565b6130e6565b805490600081558161313d575050565b6000526020600020908101905b818110613155575050565b6000815560010161314a565b60056108b291600081556000600182015560006002820155600060038201556004810161318e8154612be8565b908161319d575b50500161312d565b81601f600093116001146131b55750555b3880613195565b818352602083206131d091601f01861c8101906001016130cf565b808252602082209081548360011b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8560031b1c1916179055556131ae565b9190811015612afc5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee181360301821215610379570190565b9080601f83011215610379578135613267816110a0565b926132756040519485610958565b81845260208085019260051b820101918383116103795760208201905b8382106132a157505050505090565b813567ffffffffffffffff8111610379576020916132c487848094880101610a3a565b815201910190613292565b6101208136031261037957604051906132e78261093c565b6132f0816108a7565b8252602081013567ffffffffffffffff8111610379576133139036908301613250565b602083015260408101359067ffffffffffffffff82116103795761333d6130029236908301610a3a565b604084015261334f3660608301611ff9565b606084015260c0369101611ff9565b8151815460208401516040850151608091821b73ffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffff000000000000000000000000000000000000000000909416939093179290921791151560a01b74ff000000000000000000000000000000000000000016919091178355606084015193810151901b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000016921691909117600190910155565b9190601f811161343457505050565b6108b2926000526020600020906020601f840160051c83019310613460575b601f0160051c01906130cf565b9091508190613453565b919091825167ffffffffffffffff81116108ff576134928161348c8454612be8565b84613425565b6020601f82116001146134ec5781906130cb9394956000926134e1575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b0151905038806134af565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169061351f84600052602060002090565b9160005b81811061357957509583600195969710613542575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080613538565b9192602060018192868b015181550194019201613523565b6135f56135c06108b29597969467ffffffffffffffff60a0951684526101006020850152610100840190610389565b9660408301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b01906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b608081016136396114bb61051d836128e7565b6137fd575060208101906136da602061367f613657612349866128dd565b60801b7fffffffffffffffffffffffffffffffff000000000000000000000000000000001690565b6040517f2cbc26bb0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116600482015291829081906024820190565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610890576000916137de575b506137b45761373a613735836128dd565b6142ed565b613743826128dd565b9061375c6114bb60a0830193610a9b6106dc86866127cd565b6137745750509061376f6108b2926128dd565b614385565b61377e92506127cd565b9061183e6040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260048401612ba5565b7f53ad11d80000000000000000000000000000000000000000000000000000000060005260046000fd5b6137f7915060203d6020116108895761087b8183610958565b38613724565b61380961135e916128e7565b7f961c9a4f0000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff16600452602490565b60405190613858826108e3565b6000825260208201600081526020820151917fffffffff000000000000000000000000000000000000000000000000000000006028602483015160e01c92015193167fb148ea5f0000000000000000000000000000000000000000000000000000000081141580613902575b6138d5575063ffffffff1683525290565b7fa176027f0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b507f3047587c000000000000000000000000000000000000000000000000000000008114156138c4565b80516101188110613b86575060048101517f000000000000000000000000000000000000000000000000000000000000000063ffffffff811663ffffffff831603613b4d575050600881015190600c81015191608c82015191609081015193609482015160b88301519360f860d8850151940151916139af895163ffffffff1690565b63ffffffff811663ffffffff841603613b1357507f000000000000000000000000000000000000000000000000000000000000000063ffffffff811663ffffffff861603613ad957506107d063ffffffff891603613a9f576107d063ffffffff821603613a66575091613a289593916020979593613f3e565b910151808203613a36575050565b7f7be225b60000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b7f0389caa2000000000000000000000000000000000000000000000000000000006000526107d060045263ffffffff1660245260446000fd5b7f22e102a0000000000000000000000000000000000000000000000000000000006000526107d060045263ffffffff881660245260446000fd5b7f77e480260000000000000000000000000000000000000000000000000000000060005263ffffffff908116600452841660245260446000fd5b7fe366a1170000000000000000000000000000000000000000000000000000000060005263ffffffff908116600452821660245260446000fd5b7f960693cd0000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b7f758b22cc0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff600154163303613bd457565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b60409067ffffffffffffffff610a5594931681528160208201520190610389565b90805115611d82578051602082012067ffffffffffffffff831692836000526007602052613c54826005604060002001614c46565b15613cad575081613c9c7f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea93613c97613ca8946000526008602052604060002090565b61346a565b60405191829182611c6a565b0390a2565b905061183e6040519283927f393b8ad200000000000000000000000000000000000000000000000000000000845260048401613bfe565b67ffffffffffffffff166000818152600660205260409020549092919015613de65791613de360e092613daf85613d3b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b97614116565b846000526007602052613d52816040600020614436565b613d5b83614116565b846000526007602052613d75836002604060002001614436565b60405194855260208501906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60808301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565ba1565b827f1e670e4b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60808101613e276114bb61051d836128e7565b6137fd57506020810190613e45602061367f613657612349866128dd565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561089057600091613ec6575b506137b4576060613ebd6108b293613eb1613eac604086016128e7565b6146e4565b6112bf613735826128dd565b91013590614766565b613edf915060203d6020116108895761087b8183610958565b38613e8f565b949290939163ffffffff90604051958260208801981688526040870152166060850152608084015260a083015260c0820152600060e08201526107d06101008201526101008152613f3861012082610958565b51902090565b959263ffffffff8095929693604051978260208a019a168a526040890152166060870152608086015260a085015260c0840152600060e0840152166101008201526101008152613f3861012082610958565b602081519101517fffffffff00000000000000000000000000000000000000000000000000000000604051927fb148ea5f00000000000000000000000000000000000000000000000000000000602085015260e01b166024830152602882015260288152610a55604882610958565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161312857565b9190820391821161312857565b614041612d1c565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff82511690602083019163ffffffff8351164203428111613128576140a5906fffffffffffffffffffffffffffffffff60808701511690613115565b8101809111613128576140cb6fffffffffffffffffffffffffffffffff92918392614fc0565b161682524263ffffffff16905290565b6108b29092919260608101936fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b8051156141ba5760408101516fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff61417a61416560208501516fffffffffffffffffffffffffffffffff1690565b6fffffffffffffffffffffffffffffffff1690565b9116116141845750565b61183e906040519182917f8020d124000000000000000000000000000000000000000000000000000000008352600483016140db565b6fffffffffffffffffffffffffffffffff6141e860408301516fffffffffffffffffffffffffffffffff1690565b161580159061422f575b6141f95750565b61183e906040519182917fd68af9cc000000000000000000000000000000000000000000000000000000008352600483016140db565b5061425061416560208301516fffffffffffffffffffffffffffffffff1690565b15156141f2565b604051906005548083528260208101600560005260206000209260005b8181106142895750506108b292500383610958565b8454835260019485019487945060209093019201614274565b906040519182815491828252602082019060005260206000209260005b8181106142d45750506108b292500383610958565b84548352600194850194879450602090930192016142bf565b67ffffffffffffffff1661430e816000526006602052604060002054151590565b15614358575033600052600b6020526040600020541561432a57565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fa9902c7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b67ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c91169182600052600760205280614406600260406000200173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016928391614cb6565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101613ca8565b7f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1991614615612e089280546144876144816144788363ffffffff9060801c1690565b63ffffffff1690565b4261402c565b9081614621575b50506145cf60016144b260208601516fffffffffffffffffffffffffffffffff1690565b9261453d6145006141656fffffffffffffffffffffffffffffffff6144e785546fffffffffffffffffffffffffffffffff1690565b166fffffffffffffffffffffffffffffffff8816614fc0565b82906fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b61459061454a8751151590565b82547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016178255565b019182906fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b604083015181546fffffffffffffffffffffffffffffffff1660809190911b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b604051918291826140db565b614165614500916fffffffffffffffffffffffffffffffff61469561469c958261468e60018a0154928261468761468061466a876fffffffffffffffffffffffffffffffff1690565b996fffffffffffffffffffffffffffffffff1690565b9560801c90565b1690613115565b9116614b1b565b9116614fc0565b80547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178155388061448e565b7f000000000000000000000000000000000000000000000000000000000000000061470c5750565b73ffffffffffffffffffffffffffffffffffffffff16806000526003602052604060002054156147395750565b7fd0d259760000000000000000000000000000000000000000000000000000000060005260045260246000fd5b67ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da817894491169182600052600760205280614406604060002073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016928391614cb6565b8054821015612afc5760005260206000200190600090565b80548015614860577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061483182826147e4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008181526003602052604090205490811561496c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161312857600254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff840193841161312857838360009561492b9503614931575b50505061491a60026147fc565b600390600052602052604060002090565b55600190565b61491a61495d916149536149496149639560026147e4565b90549060031b1c90565b92839160026147e4565b90613093565b5538808061490d565b5050600090565b60008181526006602052604090205490811561496c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161312857600554927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff840193841161312857838360009561492b9503614a0f575b5050506149fe60056147fc565b600690600052602052604060002090565b6149fe61495d91614a27614949614a319560056147e4565b92839160056147e4565b553880806149f1565b6001810191806000528260205260406000205492831515600014614b12577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401848111613128578354937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff850194851161312857600095858361492b97614aca9503614ad9575b5050506147fc565b90600052602052604060002090565b614af961495d91614af0614949614b0995886147e4565b928391876147e4565b8590600052602052604060002090565b55388080614ac2565b50505050600090565b9190820180921161312857565b92614b339192613115565b810180911161312857610a5591614fc0565b805490680100000000000000008210156108ff5781614b6c9160016130cb940181556147e4565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b600081815260036020526040902054614bd657614bbf816002614b45565b600254906000526003602052604060002055600190565b50600090565b600081815260066020526040902054614bd657614bfa816005614b45565b600554906000526006602052604060002055600190565b6000818152600b6020526040902054614bd657614c2f81600a614b45565b600a5490600052600b602052604060002055600190565b600082815260018201602052604090205461496c5780614c6883600193614b45565b80549260005201602052604060002055600190565b8115614c87570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8054939290919060ff60a086901c16158015614ef1575b614eea57614cec6fffffffffffffffffffffffffffffffff8616614165565b9060018401958654614d26614481614478614d19614165856fffffffffffffffffffffffffffffffff1690565b9460801c63ffffffff1690565b80614e56575b5050838110614e0b5750828210614d8c57506108b2939450614d51916141659161402c565b6fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b90614dc361135e93614dbe614daf84614da96141658c5460801c90565b9361402c565b614db883613fff565b90614b1b565b614c7d565b7fd0c8d23a0000000000000000000000000000000000000000000000000000000060005260045260245273ffffffffffffffffffffffffffffffffffffffff16604452606490565b7f1a76572a00000000000000000000000000000000000000000000000000000000600052600452602483905273ffffffffffffffffffffffffffffffffffffffff1660445260646000fd5b828592939511614ec057614e70614165614e779460801c90565b9185614b28565b84547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178555913880614d2c565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050509050565b508115614ccd565b6000818152600b602052604090205490811561496c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161312857600a54927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff840193841161312857838361492b9460009603614f95575b505050614f84600a6147fc565b600b90600052602052604060002090565b614f8461495d91614fad614949614fb795600a6147e4565b928391600a6147e4565b55388080614f77565b9080821015614fcd575090565b90509056fea164736f6c634300081a000a" - -type USDCTokenPoolCCTPV2Contract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewUSDCTokenPoolCCTPV2Contract( - address common.Address, - backend bind.ContractBackend, -) (*USDCTokenPoolCCTPV2Contract, error) { - parsed, err := abi.JSON(strings.NewReader(USDCTokenPoolCCTPV2ABI)) - if err != nil { - return nil, err - } - return &USDCTokenPoolCCTPV2Contract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *USDCTokenPoolCCTPV2Contract) Address() common.Address { - return c.address -} - -func (c *USDCTokenPoolCCTPV2Contract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *USDCTokenPoolCCTPV2Contract) SetDomains(opts *bind.TransactOpts, args []DomainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDomains", args) -} - -func (c *USDCTokenPoolCCTPV2Contract) GetDomain(opts *bind.CallOpts, args uint64) (Domain, error) { - var out []any - err := c.contract.Call(opts, &out, "getDomain", args) - if err != nil { - var zero Domain - return zero, err - } - return *abi.ConvertType(out[0], new(Domain)).(*Domain), nil -} - -func (c *USDCTokenPoolCCTPV2Contract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *USDCTokenPoolCCTPV2Contract) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []ChainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) -} - -func (c *USDCTokenPoolCCTPV2Contract) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *USDCTokenPoolCCTPV2Contract) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *USDCTokenPoolCCTPV2Contract) TransferOwnership(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "transferOwnership", args) -} - -func (c *USDCTokenPoolCCTPV2Contract) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedChains") - if err != nil { - var zero []uint64 - return zero, err - } - return *abi.ConvertType(out[0], new([]uint64)).(*[]uint64), nil -} - -func (c *USDCTokenPoolCCTPV2Contract) GetRemoteToken(opts *bind.CallOpts, args uint64) ([]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteToken", args) - if err != nil { - var zero []byte - return zero, err - } - return *abi.ConvertType(out[0], new([]byte)).(*[]byte), nil -} - -func (c *USDCTokenPoolCCTPV2Contract) GetRemotePools(opts *bind.CallOpts, args uint64) ([][]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemotePools", args) - if err != nil { - var zero [][]byte - return zero, err - } - return *abi.ConvertType(out[0], new([][]byte)).(*[][]byte), nil -} - -func (c *USDCTokenPoolCCTPV2Contract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type ChainUpdate struct { - RemoteChainSelector uint64 - RemotePoolAddresses [][]byte - RemoteTokenAddress []byte - OutboundRateLimiterConfig Config - InboundRateLimiterConfig Config -} - -type Config struct { - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - -type Domain struct { - AllowedCaller [32]byte - MintRecipient [32]byte - DomainIdentifier uint32 - Enabled bool -} - -type DomainUpdate struct { - AllowedCaller [32]byte - MintRecipient [32]byte - DomainIdentifier uint32 - DestChainSelector uint64 - Enabled bool -} - type ApplyChainUpdatesArgs struct { - RemoteChainSelectorsToRemove []uint64 - ChainsToAdd []ChainUpdate + RemoteChainSelectorsToRemove []uint64 `json:"remoteChainSelectorsToRemove"` + ChainsToAdd []gobindings.TokenPoolChainUpdate `json:"chainsToAdd"` } type AddRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type RemoveRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type ConstructorArgs struct { - TokenMessenger common.Address - CctpMessageTransmitterProxy common.Address - Token common.Address - Allowlist []common.Address - RmnProxy common.Address - Router common.Address + TokenMessenger common.Address `json:"tokenMessenger"` + CctpMessageTransmitterProxy common.Address `json:"cctpMessageTransmitterProxy"` + Token common.Address `json:"token"` + Allowlist []common.Address `json:"allowlist"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "usdc-token-pool-cctp-v2:deploy", - Version: Version, - Description: "Deploys the USDCTokenPoolCCTPV2 contract", - ContractMetadata: &bind.MetaData{ - ABI: USDCTokenPoolCCTPV2ABI, - Bin: USDCTokenPoolCCTPV2Bin, - }, + Name: "usdc-token-pool-cctp-v2:deploy", + Version: Version, + Description: "Deploys the USDCTokenPoolCCTPV2 contract", + ContractMetadata: gobindings.USDCTokenPoolCCTPV2MetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(USDCTokenPoolCCTPV2Bin), + EVM: common.FromHex(gobindings.USDCTokenPoolCCTPV2MetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var SetDomains = contract.NewWrite(contract.WriteParams[[]DomainUpdate, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:set-domains", - Version: Version, - Description: "Calls setDomains on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, []DomainUpdate], - Validate: func([]DomainUpdate) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args []DomainUpdate, - ) (*types.Transaction, error) { - return c.SetDomains(opts, args) - }, -}) - -var GetDomain = contract.NewRead(contract.ReadParams[uint64, Domain, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:get-domain", - Version: Version, - Description: "Calls getDomain on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - CallContract: func(c *USDCTokenPoolCCTPV2Contract, opts *bind.CallOpts, args uint64) (Domain, error) { - return c.GetDomain(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var ApplyChainUpdates = contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:apply-chain-updates", - Version: Version, - Description: "Calls applyChainUpdates on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, ApplyChainUpdatesArgs], - Validate: func(ApplyChainUpdatesArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args ApplyChainUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) - }, -}) - -var AddRemotePool = contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:add-remote-pool", - Version: Version, - Description: "Calls addRemotePool on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, AddRemotePoolArgs], - Validate: func(AddRemotePoolArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args AddRemotePoolArgs, - ) (*types.Transaction, error) { - return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var RemoveRemotePool = contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:remove-remote-pool", - Version: Version, - Description: "Calls removeRemotePool on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, RemoveRemotePoolArgs], - Validate: func(RemoveRemotePoolArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args RemoveRemotePoolArgs, - ) (*types.Transaction, error) { - return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var TransferOwnership = contract.NewWrite(contract.WriteParams[common.Address, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:transfer-ownership", - Version: Version, - Description: "Calls transferOwnership on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolCCTPV2ABI, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolCCTPV2Contract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *USDCTokenPoolCCTPV2Contract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.TransferOwnership(opts, args) - }, -}) - -var GetSupportedChains = contract.NewRead(contract.ReadParams[struct{}, []uint64, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:get-supported-chains", - Version: Version, - Description: "Calls getSupportedChains on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - CallContract: func(c *USDCTokenPoolCCTPV2Contract, opts *bind.CallOpts, args struct{}) ([]uint64, error) { - return c.GetSupportedChains(opts) - }, -}) - -var GetRemoteToken = contract.NewRead(contract.ReadParams[uint64, []byte, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:get-remote-token", - Version: Version, - Description: "Calls getRemoteToken on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - CallContract: func(c *USDCTokenPoolCCTPV2Contract, opts *bind.CallOpts, args uint64) ([]byte, error) { - return c.GetRemoteToken(opts, args) - }, -}) - -var GetRemotePools = contract.NewRead(contract.ReadParams[uint64, [][]byte, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:get-remote-pools", - Version: Version, - Description: "Calls getRemotePools on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - CallContract: func(c *USDCTokenPoolCCTPV2Contract, opts *bind.CallOpts, args uint64) ([][]byte, error) { - return c.GetRemotePools(opts, args) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *USDCTokenPoolCCTPV2Contract]{ - Name: "usdc-token-pool-cctp-v2:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolCCTPV2Contract, - CallContract: func(c *USDCTokenPoolCCTPV2Contract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) +func NewReadGetDomain(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.USDCTokenPoolDomain, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.USDCTokenPoolDomain, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:get-domain", + Version: Version, + Description: "Calls getDomain on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, args uint64) (gobindings.USDCTokenPoolDomain, error) { + return c.GetDomain(opts, args) + }, + }) +} + +func NewWriteSetDomains(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.USDCTokenPoolDomainUpdate], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.USDCTokenPoolDomainUpdate, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:set-domains", + Version: Version, + Description: "Calls setDomains on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolCCTPV2MetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, caller common.Address, args []gobindings.USDCTokenPoolDomainUpdate) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolCCTPV2Interface, + opts *bind.TransactOpts, + args []gobindings.USDCTokenPoolDomainUpdate, + ) (*types.Transaction, error) { + return c.SetDomains(opts, args) + }, + }) +} + +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolCCTPV2MetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolCCTPV2Interface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} + +func NewReadGetAllAuthorizedCallers(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} + +func NewWriteApplyChainUpdates(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[ApplyChainUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:apply-chain-updates", + Version: Version, + Description: "Calls applyChainUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolCCTPV2MetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, caller common.Address, args ApplyChainUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolCCTPV2Interface, + opts *bind.TransactOpts, + args ApplyChainUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) + }, + }) +} + +func NewWriteAddRemotePool(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[AddRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:add-remote-pool", + Version: Version, + Description: "Calls addRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolCCTPV2MetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, caller common.Address, args AddRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolCCTPV2Interface, + opts *bind.TransactOpts, + args AddRemotePoolArgs, + ) (*types.Transaction, error) { + return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewWriteRemoveRemotePool(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[RemoveRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:remove-remote-pool", + Version: Version, + Description: "Calls removeRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolCCTPV2MetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, caller common.Address, args RemoveRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolCCTPV2Interface, + opts *bind.TransactOpts, + args RemoveRemotePoolArgs, + ) (*types.Transaction, error) { + return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.USDCTokenPoolCCTPV2Interface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.USDCTokenPoolCCTPV2Interface]{ + Name: "usdc-token-pool-cctp-v2:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolCCTPV2Interface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/adapters/authorizedcallers.go b/chains/evm/deployment/v2_0_0/adapters/authorizedcallers.go index f7187b6483..e22cc1057a 100644 --- a/chains/evm/deployment/v2_0_0/adapters/authorizedcallers.go +++ b/chains/evm/deployment/v2_0_0/adapters/authorizedcallers.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -14,6 +15,8 @@ import ( evmds "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + rmnops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/rmn" + rmnbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/rmn" api "github.com/smartcontractkit/chainlink-ccip/deployment/authorizedcallers" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" sequtil "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -42,11 +45,50 @@ const evmCallerLen = 20 type EVMAuthorizedCallersAdapter struct { addrCache map[string]common.Address getAllOp *cldf_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] + getAllFn func(b cldf_ops.Bundle, chain cldf_evm.Chain, addr common.Address) ([]common.Address, error) // execApply executes the contract-specific applyAuthorizedCallerUpdates operation // through the ops bundle so MCMS metadata is accurate. execApply func(b cldf_ops.Bundle, chain cldf_evm.Chain, addr common.Address, added, removed []common.Address) (sequtil.OnChainOutput, error) } +// NewRMNAuthorizedCallersAdapter registers an adapter for the v2.0 RMN contract using ops2 operations. +func NewRMNAuthorizedCallersAdapter() *EVMAuthorizedCallersAdapter { + return &EVMAuthorizedCallersAdapter{ + addrCache: make(map[string]common.Address), + getAllFn: func(b cldf_ops.Bundle, chain cldf_evm.Chain, addr common.Address) ([]common.Address, error) { + rmn, err := rmnbind.NewRMN(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("bind RMN at %s: %w", addr.Hex(), err) + } + report, err := cldf_ops.ExecuteOperation(b, rmnops.NewReadGetAllAuthorizedCallers(rmn), chain, ops2contract.FunctionInput[struct{}]{}) + if err != nil { + return nil, err + } + return report.Output, nil + }, + execApply: func(b cldf_ops.Bundle, chain cldf_evm.Chain, addr common.Address, added, removed []common.Address) (sequtil.OnChainOutput, error) { + rmn, err := rmnbind.NewRMN(addr, chain.Client) + if err != nil { + return sequtil.OnChainOutput{}, fmt.Errorf("bind RMN at %s: %w", addr.Hex(), err) + } + report, err := cldf_ops.ExecuteOperation(b, rmnops.NewWriteApplyAuthorizedCallerUpdates(rmn), chain, ops2contract.FunctionInput[rmnbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: rmnbind.AuthorizedCallersAuthorizedCallerArgs{ + AddedCallers: added, + RemovedCallers: removed, + }, + }) + if err != nil { + return sequtil.OnChainOutput{}, fmt.Errorf("applyAuthorizedCallerUpdates on %s: %w", addr.Hex(), err) + } + batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{writeOutputOps2ToLegacy(report.Output)}) + if err != nil { + return sequtil.OnChainOutput{}, fmt.Errorf("failed to create batch from writes: %w", err) + } + return sequtil.OnChainOutput{BatchOps: []mcms_types.BatchOperation{batch}}, nil + }, + } +} + // NewEVMAuthorizedCallersAdapter constructs an EVMAuthorizedCallersAdapter backed by // per-contract generated operations. applyOp must be the generated // applyAuthorizedCallerUpdates write operation; getAllOp the generated @@ -128,16 +170,26 @@ func (a *EVMAuthorizedCallersAdapter) GetAllAuthorizedCallers( return nil, fmt.Errorf("no EVM chain found for selector %d", selector) } readBundle := cldf_ops.NewBundle(e.GetContext, e.Logger, cldf_ops.NewMemoryReporter()) - report, err := cldf_ops.ExecuteOperation(readBundle, a.getAllOp, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: addr, - Args: struct{}{}, - }) - if err != nil { - return nil, fmt.Errorf("getAllAuthorizedCallers at %s on chain %d: %w", addr.Hex(), selector, err) + var addrs []common.Address + var readErr error + if a.getAllFn != nil { + addrs, readErr = a.getAllFn(readBundle, chain, addr) + } else { + report, readErr := cldf_ops.ExecuteOperation(readBundle, a.getAllOp, chain, contract.FunctionInput[struct{}]{ + ChainSelector: chain.Selector, + Address: addr, + Args: struct{}{}, + }) + if readErr != nil { + return nil, fmt.Errorf("getAllAuthorizedCallers at %s on chain %d: %w", addr.Hex(), selector, readErr) + } + addrs = report.Output + } + if readErr != nil { + return nil, fmt.Errorf("getAllAuthorizedCallers at %s on chain %d: %w", addr.Hex(), selector, readErr) } - callers := make([]api.Caller, len(report.Output)) - for i, c := range report.Output { + callers := make([]api.Caller, len(addrs)) + for i, c := range addrs { callers[i] = c.Bytes() } return callers, nil diff --git a/chains/evm/deployment/v2_0_0/adapters/authorizedcallers_test.go b/chains/evm/deployment/v2_0_0/adapters/authorizedcallers_test.go index 5486a6f7d2..95a0653007 100644 --- a/chains/evm/deployment/v2_0_0/adapters/authorizedcallers_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/authorizedcallers_test.go @@ -56,13 +56,7 @@ func TestAuthorizedCallersAdapter_OperatorFlow(t *testing.T) { e.DataStore = ds.Seal() // Initialize the adapter. - adapter := adapters.NewEVMAuthorizedCallersAdapter( - rmnops.ApplyAuthorizedCallerUpdates, - rmnops.GetAllAuthorizedCallers, - func(added, removed []common.Address) rmnops.AuthorizedCallerArgs { - return rmnops.AuthorizedCallerArgs{AddedCallers: added, RemovedCallers: removed} - }, - ) + adapter := adapters.NewRMNAuthorizedCallersAdapter() applyIn := api.ApplyInput{ ChainSelector: chainSelector, ContractType: rmnops.ContractType, @@ -200,13 +194,7 @@ func TestConfigureAuthorizedCallersChangeset_MultiTarget(t *testing.T) { // Register a second adapter for a stub type so validation resolves both entries. const secondType = "AuthorizedCallersV2" reg := api.GetAuthorizedCallersRegistry() - reg.RegisterAdapter("evm", secondType, rmnops.Version, adapters.NewEVMAuthorizedCallersAdapter( - rmnops.ApplyAuthorizedCallerUpdates, - rmnops.GetAllAuthorizedCallers, - func(added, removed []common.Address) rmnops.AuthorizedCallerArgs { - return rmnops.AuthorizedCallerArgs{AddedCallers: added, RemovedCallers: removed} - }, - )) + reg.RegisterAdapter("evm", secondType, rmnops.Version, adapters.NewRMNAuthorizedCallersAdapter()) // Insert a stub datastore ref for the second contract type. secondRef := datastore.AddressRef{ diff --git a/chains/evm/deployment/v2_0_0/adapters/cctp_chain_test.go b/chains/evm/deployment/v2_0_0/adapters/cctp_chain_test.go index af1c323377..3c9323ce83 100644 --- a/chains/evm/deployment/v2_0_0/adapters/cctp_chain_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/cctp_chain_test.go @@ -11,6 +11,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/burn_mint_erc20" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" @@ -19,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/burn_mint_with_lock_release_flag_token_pool" cctp_message_transmitter_proxy_v1_6_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2" + usdc_token_pool_cctp_v2_bindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool_cctp_v2" evm_adapters "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/adapters" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/cctp_through_ccv_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy" @@ -110,12 +112,14 @@ func setupCCTPTestEnvironment(t *testing.T, e *deployment.Environment, chainSele err = ds.Merge(e.DataStore) require.NoError(t, err) for _, addr := range chainReport.Output.Addresses { - err = ds.Addresses().Add(addr) - require.NoError(t, err) + if addErr := ds.Addresses().Add(addr); addErr != nil { + require.Contains(t, addErr.Error(), "already exists", "unexpected error adding address ref %s", addr.Type) + } + } + // Also add CREATE2Factory address when not already present from a prior setup on this datastore. + if addErr := ds.Addresses().Add(create2FactoryRef); addErr != nil { + require.Contains(t, addErr.Error(), "already exists", "unexpected error adding CREATE2Factory ref") } - // Also add CREATE2Factory address - err = ds.Addresses().Add(create2FactoryRef) - require.NoError(t, err) e.DataStore = ds.Seal() var routerAddr, rmnAddr, tokenAdminRegistryAddr common.Address @@ -195,16 +199,15 @@ func setupCCTPTestEnvironment(t *testing.T, e *deployment.Environment, chainSele require.NoError(t, err, "Failed to confirm MockE2EUSDCTokenMessenger V2 deployment") // Deploy and register required CCTPMessageTransmitterProxy v1.6.2 for CCTP V1 wiring. - cctpV1ProxyRef, err := contract_utils.MaybeDeployContract( + cctpV1ProxyRef, err := ops2contract.MaybeDeployContract( e.OperationsBundle, cctp_message_transmitter_proxy_v1_6_2.Deploy, chain, - contract_utils.DeployInput[cctp_message_transmitter_proxy_v1_6_2.ConstructorArgs]{ + ops2contract.DeployInput[cctp_message_transmitter_proxy_v1_6_2.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion( cctp_message_transmitter_proxy_v1_6_2.ContractType, *cctp_message_transmitter_proxy_v1_6_2.Version, ), - ChainSelector: chainSelector, Args: cctp_message_transmitter_proxy_v1_6_2.ConstructorArgs{ TokenMessenger: tokenMessengerV1Addr, }, @@ -616,7 +619,7 @@ func TestCCTPChainAdapter_HomeToNonHomeChain(t *testing.T) { require.Equal(t, homeCCTPTokenPoolAddr, homePools.CctpV2PoolWithCCV, "CCTP V2-with-CCV pool should match on home chain") // Check CCTP V2 token pool authorized callers on home chain (proxy must be authorized) - homeCCTPV2TokenPool, err := usdc_token_pool_cctp_v2.NewUSDCTokenPoolCCTPV2Contract(homeCCTPV2TokenPoolAddr, homeChain.Client) + homeCCTPV2TokenPool, err := usdc_token_pool_cctp_v2_bindings.NewUSDCTokenPoolCCTPV2(homeCCTPV2TokenPoolAddr, homeChain.Client) require.NoError(t, err, "Failed to instantiate CCTP V2 token pool contract on home chain") homeCCTPV2AuthorizedCallers, err := homeCCTPV2TokenPool.GetAllAuthorizedCallers(nil) require.NoError(t, err, "Failed to get authorized callers from CCTP V2 token pool on home chain") @@ -759,7 +762,7 @@ func TestCCTPChainAdapter_HomeToNonHomeChain(t *testing.T) { require.Equal(t, nonHomeSetup.Router, nonHomeVerifierRemoteChainConfig.RemoteChainConfig.Router, "CCTPVerifier remote chain config Router should match on non-home chain") // Check CCTP V2 token pool domain on non-home chain - nonHomeCCTPV2TokenPool, err := usdc_token_pool_cctp_v2.NewUSDCTokenPoolCCTPV2Contract(nonHomeCCTPV2TokenPoolAddr, nonHomeChain.Client) + nonHomeCCTPV2TokenPool, err := usdc_token_pool_cctp_v2_bindings.NewUSDCTokenPoolCCTPV2(nonHomeCCTPV2TokenPoolAddr, nonHomeChain.Client) require.NoError(t, err, "Failed to instantiate CCTP V2 token pool contract on non-home chain") nonHomeCCTPV2Domain, err := nonHomeCCTPV2TokenPool.GetDomain(nil, homeChainSelector) require.NoError(t, err, "Failed to get domain from CCTP V2 token pool on non-home chain") diff --git a/chains/evm/deployment/v2_0_0/adapters/chain_family.go b/chains/evm/deployment/v2_0_0/adapters/chain_family.go index 1e34de19cc..2c4002ea29 100644 --- a/chains/evm/deployment/v2_0_0/adapters/chain_family.go +++ b/chains/evm/deployment/v2_0_0/adapters/chain_family.go @@ -22,6 +22,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" seq_core "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -96,7 +97,7 @@ func (a *ChainFamilyAdapter) GetFQAddressDynamic(ds datastore.DataStore, chainSe chain := chains.EVMChains()[chainSelector] - onrampContract, err := onramp.NewOnRampContract(common.BytesToAddress(onRampAddr), chain.Client) + onrampContract, err := orbind.NewOnRamp(common.BytesToAddress(onRampAddr), chain.Client) if err != nil { return nil, fmt.Errorf("failed to create onramp contract instance for chain selector %d: %w", chainSelector, err) } diff --git a/chains/evm/deployment/v2_0_0/adapters/chain_family_test.go b/chains/evm/deployment/v2_0_0/adapters/chain_family_test.go index 879fbe6e5f..ba3a46fbc1 100644 --- a/chains/evm/deployment/v2_0_0/adapters/chain_family_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/chain_family_test.go @@ -95,6 +95,7 @@ func TestChainFamilyAdapter(t *testing.T) { // On each chain, deploy chain contracts ds := datastore.NewMemoryDataStore() for _, chainSel := range []uint64{chainA, chainB} { + e.OperationsBundle = testsetup.BundleWithFreshReporter(e.OperationsBundle) create2FactoryRef, err := contract_utils.MaybeDeployContract(e.OperationsBundle, create2_factory.Deploy, e.BlockChains.EVMChains()[chainSel], contract_utils.DeployInput[create2_factory.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(create2_factory.ContractType, *semver.MustParse("2.0.0")), ChainSelector: chainSel, diff --git a/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter.go b/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter.go index 5f135747d7..8dfefaae78 100644 --- a/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter.go +++ b/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter.go @@ -5,22 +5,21 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - upstream "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" - "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" rmnops1_5 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/rmn" offrampops_v160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" onrampops_v160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" seq1_6 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" + off160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" - "github.com/smartcontractkit/chainlink-deployments-framework/chain" - cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" ccvadapters "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" + "github.com/smartcontractkit/chainlink-deployments-framework/chain" + cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) type EVMDeployChainContractsAdapter struct{} @@ -180,11 +179,11 @@ func importConfigFromv1_6_0(b cldf_ops.Bundle, chain evm.Chain, input ccvadapter } } // directly fetch offRamp static config - offRampCfg16Rep, err := cldf_ops.ExecuteOperation(b, offrampops_v160.GetStaticConfig, chain, upstream.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(offRampAddr.Address), - Args: struct{}{}, - }) + offRamp, err := off160bind.NewOffRamp(common.HexToAddress(offRampAddr.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind OffRamp v1.6.0 for chain selector %d: %w", input.ChainSelector, err) + } + offRampCfg16Rep, err := cldf_ops.ExecuteOperation(b, offrampops_v160.NewReadGetStaticConfig(offRamp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return output, fmt.Errorf("failed to execute operation to get offRamp v1.6.0 static config for chain selector %d: %w", input.ChainSelector, err) } @@ -304,7 +303,7 @@ func convertExecutors(params []ccvadapters.ExecutorDeployParams) ([]sequences.Ex result = append(result, sequences.ExecutorParams{ Version: ep.Version, MaxCCVsPerMsg: ep.MaxCCVsPerMsg, - DynamicConfig: executor.DynamicConfig{ + DynamicConfig: execbind.ExecutorDynamicConfig{ FeeAggregator: feeAgg, AllowedFinalityConfig: ep.DynamicConfig.AllowedFinalityConfig.Raw(), CcvAllowlistEnabled: ep.DynamicConfig.CcvAllowlistEnabled, diff --git a/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter_test.go b/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter_test.go index e984c70936..cb596d356e 100644 --- a/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/deploy_chain_contracts_adapter_test.go @@ -16,6 +16,8 @@ import ( offrampops_v160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/offramp" onrampops_v160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" seq1_6 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" + off160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + or160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/finality" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -44,14 +46,14 @@ var ( Address: "0x6666666666666666666666666666666666666666", ChainSelector: 5009297550715157269, Metadata: seq1_6.OnRampImportConfigSequenceOutput{ - DestChainCfgs: map[uint64]onrampops_v160.GetDestChainConfigResult{}, - StaticConfig: onrampops_v160.StaticConfig{ + DestChainCfgs: map[uint64]or160bind.GetDestChainConfig{}, + StaticConfig: or160bind.OnRampStaticConfig{ ChainSelector: 5009297550715157269, RmnRemote: common.HexToAddress("0x8888888888888888888888888888888888888888"), NonceManager: common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), TokenAdminRegistry: common.HexToAddress("0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"), }, - DynamicConfig: onrampops_v160.DynamicConfig{ + DynamicConfig: or160bind.OnRampDynamicConfig{ FeeQuoter: common.HexToAddress("0x1111111111111111111111111111111111111111"), FeeAggregator: feeAggregatorAddress, AllowlistAdmin: common.Address{}, @@ -63,15 +65,15 @@ var ( Address: "0x7777777777777777777777777777777777777777", ChainSelector: 5009297550715157269, Metadata: seq1_6.OffRampImportConfigSequenceOutput{ - SourceChainCfgs: map[uint64]offrampops_v160.SourceChainConfig{}, - StaticConfig: offrampops_v160.StaticConfig{ + SourceChainCfgs: map[uint64]off160bind.OffRampSourceChainConfig{}, + StaticConfig: off160bind.OffRampStaticConfig{ ChainSelector: 5009297550715157269, GasForCallExactCheck: 6000, RmnRemote: common.HexToAddress("0x8888888888888888888888888888888888888888"), TokenAdminRegistry: common.HexToAddress("0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"), NonceManager: common.HexToAddress("0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), }, - DynamicConfig: offrampops_v160.DynamicConfig{}, + DynamicConfig: off160bind.OffRampDynamicConfig{}, }, }, } diff --git a/chains/evm/deployment/v2_0_0/adapters/executor_config_adapter.go b/chains/evm/deployment/v2_0_0/adapters/executor_config_adapter.go index 0791840465..6edb8d709f 100644 --- a/chains/evm/deployment/v2_0_0/adapters/executor_config_adapter.go +++ b/chains/evm/deployment/v2_0_0/adapters/executor_config_adapter.go @@ -5,10 +5,10 @@ import ( chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" execcontract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" offrampoperations "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" dsutil "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" diff --git a/chains/evm/deployment/v2_0_0/adapters/fastcurse.go b/chains/evm/deployment/v2_0_0/adapters/fastcurse.go index 3ecbd705d8..95d03b9df3 100644 --- a/chains/evm/deployment/v2_0_0/adapters/fastcurse.go +++ b/chains/evm/deployment/v2_0_0/adapters/fastcurse.go @@ -17,10 +17,11 @@ import ( evmds "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" rmnproxyops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" routerops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" - ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/rmn" + rmnops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/rmn" rmnsequences "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_0_0/rmn_proxy_contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" + rmnbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/rmn" api "github.com/smartcontractkit/chainlink-ccip/deployment/fastcurse" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -73,7 +74,7 @@ func (ca *CurseAdapter) IsSubjectCursedOnChain(e cldf.Environment, selector uint if !ok { return false, fmt.Errorf("no EVM chain found for selector %d", selector) } - rmnC, err := ops.NewRMNContract(rmnAddr, chain.Client) + rmnC, err := rmnbind.NewRMN(rmnAddr, chain.Client) if err != nil { return false, fmt.Errorf("failed to instantiate RMN contract at %s on chain %d: %w", rmnAddr.String(), chain.Selector, err) } @@ -123,7 +124,7 @@ func (ca *CurseAdapter) SelectorToSubject(selector uint64) api.Subject { func (ca *CurseAdapter) Curse() *cldf_ops.Sequence[api.CurseInput, sequences.OnChainOutput, cldf_chain.BlockChains] { return cldf_ops.NewSequence( "curse_rmn", - ops.Version, + rmnops.Version, "Cursing subjects with RMN", func(b cldf_ops.Bundle, chains cldf_chain.BlockChains, in api.CurseInput) (output sequences.OnChainOutput, err error) { chain, ok := chains.EVMChains()[in.ChainSelector] @@ -150,7 +151,7 @@ func (ca *CurseAdapter) Curse() *cldf_ops.Sequence[api.CurseInput, sequences.OnC func (ca *CurseAdapter) Uncurse() *cldf_ops.Sequence[api.CurseInput, sequences.OnChainOutput, cldf_chain.BlockChains] { return cldf_ops.NewSequence( "uncurse_rmn", - ops.Version, + rmnops.Version, "Uncursing subjects with RMN", func(b cldf_ops.Bundle, chains cldf_chain.BlockChains, in api.CurseInput) (output sequences.OnChainOutput, err error) { chain, ok := chains.EVMChains()[in.ChainSelector] @@ -189,8 +190,8 @@ func routerAddressOnChain(e cldf.Environment, selector uint64) (common.Address, func rmnAddressOnChain(e cldf.Environment, selector uint64) (common.Address, error) { rmnRef := datastore.AddressRef{ - Type: datastore.ContractType(ops.ContractType), - Version: ops.Version, + Type: datastore.ContractType(rmnops.ContractType), + Version: rmnops.Version, } rmnAddrRef, err := datastore_utils.FindAndFormatRef(e.DataStore, rmnRef, selector, evmds.ToEVMAddress) if err != nil { diff --git a/chains/evm/deployment/v2_0_0/adapters/fee_aggregator.go b/chains/evm/deployment/v2_0_0/adapters/fee_aggregator.go index 9fbd0600f1..ba7044fe7d 100644 --- a/chains/evm/deployment/v2_0_0/adapters/fee_aggregator.go +++ b/chains/evm/deployment/v2_0_0/adapters/fee_aggregator.go @@ -4,19 +4,23 @@ import ( "fmt" "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" executorops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" proxyops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/proxy" usdcproxyops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" + proxybind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/proxy" + utppbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/usdc_token_pool_proxy" "github.com/smartcontractkit/chainlink-ccip/deployment/fees" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -37,6 +41,18 @@ func NewFeeAggregatorAdapter() *FeeAggregatorAdapter { return &FeeAggregatorAdapter{} } +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) contract.WriteOutput { + var ei *contract.ExecInfo + if w.ExecInfo != nil { + ei = &contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + func (a *FeeAggregatorAdapter) GetFeeAggregator(e cldf.Environment, chainSelector uint64) (string, error) { chain, ok := e.BlockChains.EVMChains()[chainSelector] if !ok { @@ -58,17 +74,22 @@ func (a *FeeAggregatorAdapter) GetFeeAggregator(e cldf.Environment, chainSelecto } proxyAddr := common.HexToAddress(ref.Address) - proxyContract, err := proxyops.NewProxyContract(proxyAddr, chain.Client) + proxyContract, err := proxybind.NewProxy(proxyAddr, chain.Client) if err != nil { return "", fmt.Errorf("failed to instantiate Proxy at %s on chain %d: %w", proxyAddr.Hex(), chainSelector, err) } - feeAgg, err := proxyContract.GetFeeAggregator(&bind.CallOpts{Context: e.GetContext()}) + report, err := operations.ExecuteOperation( + e.OperationsBundle, + proxyops.NewReadGetFeeAggregator(proxyContract), + chain, + ops2contract.FunctionInput[struct{}]{}, + ) if err != nil { return "", fmt.Errorf("failed to read fee aggregator from Proxy at %s on chain %d: %w", proxyAddr.Hex(), chainSelector, err) } - return feeAgg.Hex(), nil + return report.Output.Hex(), nil } func (a *FeeAggregatorAdapter) SetFeeAggregator(e cldf.Environment) *operations.Sequence[fees.FeeAggregatorForChain, sequences.OnChainOutput, cldf_chain.BlockChains] { @@ -159,10 +180,30 @@ func setFeeAggregatorOnContract( switch ref.Type { case datastore.ContractType(proxyops.ContractType): - return setFeeAggregatorDirect(b, chain, addr, proxyops.SetFeeAggregator, newFeeAggregator) + proxyContract, err := proxybind.NewProxy(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("bind Proxy at %s: %w", addr.Hex(), err) + } + report, err := operations.ExecuteOperation(b, proxyops.NewWriteSetFeeAggregator(proxyContract), chain, ops2contract.FunctionInput[common.Address]{ + Args: newFeeAggregator, + }) + if err != nil { + return nil, err + } + return []contract.WriteOutput{writeOutputOps2ToLegacy(report.Output)}, nil case datastore.ContractType(usdcproxyops.ContractType): - return setFeeAggregatorDirect(b, chain, addr, usdcproxyops.SetFeeAggregator, newFeeAggregator) + usdcProxy, err := utppbind.NewUSDCTokenPoolProxy(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("bind USDCTokenPoolProxy at %s: %w", addr.Hex(), err) + } + report, err := operations.ExecuteOperation(b, usdcproxyops.NewWriteSetFeeAggregator(usdcProxy), chain, ops2contract.FunctionInput[common.Address]{ + Args: newFeeAggregator, + }) + if err != nil { + return nil, err + } + return []contract.WriteOutput{writeOutputOps2ToLegacy(report.Output)}, nil case datastore.ContractType(onrampops.ContractType): return setFeeAggregatorViaOnRampDynamicConfig(b, chain, addr, newFeeAggregator) @@ -175,40 +216,17 @@ func setFeeAggregatorOnContract( } } -func setFeeAggregatorDirect( +func setFeeAggregatorViaOnRampDynamicConfig( b operations.Bundle, chain cldf_evm.Chain, addr common.Address, - op *operations.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain], newFeeAggregator common.Address, ) ([]contract.WriteOutput, error) { - report, err := operations.ExecuteOperation( - b, op, chain, - contract.FunctionInput[common.Address]{ - ChainSelector: chain.Selector, - Address: addr, - Args: newFeeAggregator, - }, - ) + onRamp, err := orbind.NewOnRamp(addr, chain.Client) if err != nil { - return nil, err + return nil, fmt.Errorf("bind OnRamp at %s: %w", addr.Hex(), err) } - return []contract.WriteOutput{report.Output}, nil -} - -func setFeeAggregatorViaOnRampDynamicConfig( - b operations.Bundle, - chain cldf_evm.Chain, - addr common.Address, - newFeeAggregator common.Address, -) ([]contract.WriteOutput, error) { - readReport, err := operations.ExecuteOperation( - b, onrampops.GetDynamicConfig, chain, - contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: addr, - }, - ) + readReport, err := operations.ExecuteOperation(b, onrampops.NewReadGetDynamicConfig(onRamp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to read OnRamp DynamicConfig: %w", err) } @@ -216,18 +234,13 @@ func setFeeAggregatorViaOnRampDynamicConfig( cfg := readReport.Output cfg.FeeAggregator = newFeeAggregator - writeReport, err := operations.ExecuteOperation( - b, onrampops.SetDynamicConfig, chain, - contract.FunctionInput[onrampops.DynamicConfig]{ - ChainSelector: chain.Selector, - Address: addr, - Args: cfg, - }, - ) + writeReport, err := operations.ExecuteOperation(b, onrampops.NewWriteSetDynamicConfig(onRamp), chain, ops2contract.FunctionInput[orbind.OnRampDynamicConfig]{ + Args: cfg, + }) if err != nil { return nil, fmt.Errorf("failed to write OnRamp DynamicConfig: %w", err) } - return []contract.WriteOutput{writeReport.Output}, nil + return []contract.WriteOutput{writeOutputOps2ToLegacy(writeReport.Output)}, nil } func setFeeAggregatorViaExecutorDynamicConfig( @@ -236,13 +249,11 @@ func setFeeAggregatorViaExecutorDynamicConfig( addr common.Address, newFeeAggregator common.Address, ) ([]contract.WriteOutput, error) { - readReport, err := operations.ExecuteOperation( - b, executorops.GetDynamicConfig, chain, - contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: addr, - }, - ) + exec, err := execbind.NewExecutor(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("bind Executor at %s: %w", addr.Hex(), err) + } + readReport, err := operations.ExecuteOperation(b, executorops.NewReadGetDynamicConfig(exec), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to read Executor DynamicConfig: %w", err) } @@ -250,16 +261,11 @@ func setFeeAggregatorViaExecutorDynamicConfig( cfg := readReport.Output cfg.FeeAggregator = newFeeAggregator - writeReport, err := operations.ExecuteOperation( - b, executorops.SetDynamicConfig, chain, - contract.FunctionInput[executorops.DynamicConfig]{ - ChainSelector: chain.Selector, - Address: addr, - Args: cfg, - }, - ) + writeReport, err := operations.ExecuteOperation(b, executorops.NewWriteSetDynamicConfig(exec), chain, ops2contract.FunctionInput[execbind.ExecutorDynamicConfig]{ + Args: cfg, + }) if err != nil { return nil, fmt.Errorf("failed to write Executor DynamicConfig: %w", err) } - return []contract.WriteOutput{writeReport.Output}, nil + return []contract.WriteOutput{writeOutputOps2ToLegacy(writeReport.Output)}, nil } diff --git a/chains/evm/deployment/v2_0_0/adapters/fees.go b/chains/evm/deployment/v2_0_0/adapters/fees.go index 122e76f280..2b202037ca 100644 --- a/chains/evm/deployment/v2_0_0/adapters/fees.go +++ b/chains/evm/deployment/v2_0_0/adapters/fees.go @@ -11,6 +11,8 @@ import ( fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" evmseq "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/fees" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" "github.com/smartcontractkit/chainlink-ccip/deployment/utils" @@ -18,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -66,15 +69,15 @@ func (a *FeesAdapter) GetFeeContractRef(e cldf.Environment, onRampRef datastore. return datastore.AddressRef{}, fmt.Errorf("chain with selector %d not defined", src) } + onRamp, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return datastore.AddressRef{}, fmt.Errorf("failed to bind OnRamp at %s on chain selector %d: %w", onRampAddr.Hex(), src, err) + } report, err := operations.ExecuteOperation( e.OperationsBundle, - onramp.GetDynamicConfig, + onramp.NewReadGetDynamicConfig(onRamp), chain, - contract.FunctionInput[struct{}]{ - ChainSelector: src, - Address: onRampAddr, - Args: struct{}{}, - }, + ops2contract.FunctionInput[struct{}]{}, ) if err != nil { return datastore.AddressRef{}, fmt.Errorf("failed to execute GetDynamicConfig operation for OnRamp at %s on chain selector %d with dst %d: %w", onRampAddr.Hex(), src, dst, err) @@ -116,7 +119,7 @@ func (a *FeesAdapter) GetOnchainTokenTransferFeeConfig(e cldf.Environment, feeRe if err != nil { return fees.TokenTransferFeeArgs{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address for src %d and dst %d: %w", src, dst, err) } - fq, err := fqops.NewFeeQuoterContract(fqAddr, chain.Client) + fq, err := fqbind.NewFeeQuoter(fqAddr, chain.Client) if err != nil { return fees.TokenTransferFeeArgs{}, fmt.Errorf("failed to instantiate FeeQuoter contract at address %s on chain selector %d: %w", fqAddr.Hex(), src, err) } @@ -170,7 +173,7 @@ func (a *FeesAdapter) SetTokenTransferFee(e cldf.Environment, feeRef datastore.A if feeCfg == nil { val.TokensToUseDefaultFeeConfigs = append( val.TokensToUseDefaultFeeConfigs, - fqops.TokenTransferFeeConfigRemoveArgs{ + fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{ DestChainSelector: dst, Token: token, }, @@ -178,12 +181,12 @@ func (a *FeesAdapter) SetTokenTransferFee(e cldf.Environment, feeRef datastore.A } else { val.TokenTransferFeeConfigArgs = append( val.TokenTransferFeeConfigArgs, - fqops.TokenTransferFeeConfigArgs{ + fqbind.FeeQuoterTokenTransferFeeConfigArgs{ DestChainSelector: dst, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: token, - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fqbind.FeeQuoterTokenTransferFeeConfig{ DestBytesOverhead: feeCfg.DestBytesOverhead, DestGasOverhead: feeCfg.DestGasOverhead, FeeUSDCents: feeCfg.MinFeeUSDCents, @@ -240,7 +243,7 @@ func (a *FeesAdapter) GetOnchainDestChainConfig(e cldf.Environment, feeRef datas if err != nil { return lanes.FeeQuoterDestChainConfig{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address for src %d and dst %d: %w", src, dst, err) } - fq, err := fqops.NewFeeQuoterContract(fqAddr, chain.Client) + fq, err := fqbind.NewFeeQuoter(fqAddr, chain.Client) if err != nil { return lanes.FeeQuoterDestChainConfig{}, fmt.Errorf("failed to instantiate FeeQuoter contract at address %s on chain selector %d: %w", fqAddr.Hex(), src, err) } @@ -271,9 +274,9 @@ func (a *FeesAdapter) ApplyDestChainConfigUpdates(e cldf.Environment, feeRef dat return sequences.OnChainOutput{}, fmt.Errorf("failed to convert FeeQuoter address ref to EVM address: %w", err) } - args := map[uint64][]fqops.DestChainConfigArgs{} + args := map[uint64][]fqbind.FeeQuoterDestChainConfigArgs{} for dst, cfg := range input.Settings { - args[src] = append(args[src], fqops.DestChainConfigArgs{ + args[src] = append(args[src], fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: dst, DestChainConfig: evmseqV1_6_0.TranslateFQtoV2(cfg), }) @@ -284,20 +287,23 @@ func (a *FeesAdapter) ApplyDestChainConfigUpdates(e cldf.Environment, feeRef dat return sequences.OnChainOutput{}, fmt.Errorf("chain with selector %d not defined", src) } + fq, err := fqbind.NewFeeQuoter(fqAddr, evmChain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind FeeQuoter at %s: %w", fqAddr.Hex(), err) + } + writes := make([]contract.WriteOutput, 0, len(args)) - for selector, updates := range args { + for _, updates := range args { report, err := operations.ExecuteOperation( - b, fqops.ApplyDestChainConfigUpdates, evmChain, - contract.FunctionInput[[]fqops.DestChainConfigArgs]{ - ChainSelector: selector, - Address: fqAddr, - Args: updates, + b, fqops.NewWriteApplyDestChainConfigUpdates(fq), evmChain, + ops2contract.FunctionInput[[]fqbind.FeeQuoterDestChainConfigArgs]{ + Args: updates, }, ) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply dest chain config updates on FeeQuoter 2.0 for chain %d: %w", src, err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToLegacy(report.Output)) } var result sequences.OnChainOutput diff --git a/chains/evm/deployment/v2_0_0/adapters/init.go b/chains/evm/deployment/v2_0_0/adapters/init.go index d2701fee6f..ab7ee29ad3 100644 --- a/chains/evm/deployment/v2_0_0/adapters/init.go +++ b/chains/evm/deployment/v2_0_0/adapters/init.go @@ -4,7 +4,6 @@ import ( "strings" "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/common" chainsel "github.com/smartcontractkit/chain-selectors" burnfromminttokenpoolv2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_from_mint_token_pool" @@ -129,13 +128,7 @@ func init() { chainsel.FamilyEVM, rmnops.ContractType, rmnops.Version, - NewEVMAuthorizedCallersAdapter( - rmnops.ApplyAuthorizedCallerUpdates, - rmnops.GetAllAuthorizedCallers, - func(added, removed []common.Address) rmnops.AuthorizedCallerArgs { - return rmnops.AuthorizedCallerArgs{AddedCallers: added, RemovedCallers: removed} - }, - ), + NewRMNAuthorizedCallersAdapter(), ) } diff --git a/chains/evm/deployment/v2_0_0/adapters/lanemigrator.go b/chains/evm/deployment/v2_0_0/adapters/lanemigrator.go index 297d9ff6dc..32060ad129 100644 --- a/chains/evm/deployment/v2_0_0/adapters/lanemigrator.go +++ b/chains/evm/deployment/v2_0_0/adapters/lanemigrator.go @@ -15,9 +15,6 @@ import ( cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/committee_verifier" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" - seq1_7 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils" evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" @@ -27,11 +24,18 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" onrampops_v160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/committee_verifier" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" + seq1_7 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + or160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/changesets" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" offrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" @@ -185,11 +189,12 @@ func verifyExistingLaneVersion(e deployment.Environment, evmChain evm.Chain, cha } // get the fee quoter from onRamp - feeQuoterOut, err := cldf_ops.ExecuteOperation(e.OperationsBundle, onrampops_v160.GetDynamicConfig, - evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: onRampOnRouterOut.Output, - }) + onRamp160, err := or160bind.NewOnRamp(onRampOnRouterOut.Output, evmChain.Client) + if err != nil { + return fmt.Errorf("failed to bind OnRamp v1.6.0 at %s: %w", onRampOnRouterOut.Output.Hex(), err) + } + feeQuoterOut, err := cldf_ops.ExecuteOperation(e.OperationsBundle, onrampops_v160.NewReadGetDynamicConfig(onRamp160), + evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return fmt.Errorf("error fetching fee quoter from onRamp for chain %d and remote chain %d: %w", chainSelector, remoteChainSelector, err) } @@ -322,7 +327,15 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error finding feequoter address ref: %w", err) } - feeQuoterContract, err := fee_quoter.NewFeeQuoter(feequoterAddr, c.Client) + onRamp, err := orbind.NewOnRamp(onRampAddr, c.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OnRamp at %s: %w", onRampAddr.Hex(), err) + } + offRamp, err := offbind.NewOffRamp(offRampAddr, c.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind OffRamp at %s: %w", offRampAddr.Hex(), err) + } + feeQuoterContract, err := fqbind.NewFeeQuoter(feequoterAddr, c.Client) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error creating fee quoter contract instance: %w", err) } @@ -331,15 +344,12 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error formatting router address ref: %w", err) } - var onRampArgs []onrampops.DestChainConfigArgs - var offRampArgs []offrampops.SourceChainConfigArgs - var fqArgs []fqops.DestChainConfigArgs + var onRampArgs []orbind.OnRampDestChainConfigArgs + var offRampArgs []offbind.OffRampSourceChainConfigArgs + var fqArgs []fqbind.FeeQuoterDestChainConfigArgs for _, remoteChainSelector := range input.RemoteChainSelectors { - // get existing destChainConfig for the onRamp - existingDestChainCfgOut, err := cldf_ops.ExecuteOperation(b, onrampops.GetDestChainConfig, c, contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: remoteChainSelector, + existingDestChainCfgOut, err := cldf_ops.ExecuteOperation(b, onrampops.NewReadGetDestChainConfig(onRamp), c, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error fetching existing destChainConfig for onRamp: %w", err) @@ -353,10 +363,8 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU existingDestChainCfg.Router = routerAddr // get the sourceChainConfig for the offRamp - srcChainCfgOut, err := cldf_ops.ExecuteOperation(b, offrampops.GetSourceChainConfig, c, contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: offRampAddr, - Args: remoteChainSelector, + srcChainCfgOut, err := cldf_ops.ExecuteOperation(b, offrampops.NewReadGetSourceChainConfig(offRamp), c, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error fetching existing sourceChainConfig for offRamp: %w", err) @@ -364,7 +372,7 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU existingSrcChainCfg := srcChainCfgOut.Output // update router on offRamp for the remote c existingSrcChainCfg.Router = routerAddr - onRampArgs = append(onRampArgs, onrampops.DestChainConfigArgs{ + onRampArgs = append(onRampArgs, orbind.OnRampDestChainConfigArgs{ DestChainSelector: remoteChainSelector, Router: routerAddr, AddressBytesLength: existingDestChainCfg.AddressBytesLength, @@ -378,7 +386,7 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU OffRamp: existingDestChainCfg.OffRamp, }) - offRampArgs = append(offRampArgs, offrampops.SourceChainConfigArgs{ + offRampArgs = append(offRampArgs, offbind.OffRampSourceChainConfigArgs{ SourceChainSelector: remoteChainSelector, Router: routerAddr, IsEnabled: existingSrcChainCfg.IsEnabled, @@ -394,9 +402,9 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error fetching existing destChainConfig for fee quoter: %w", err) } - fqArgs = append(fqArgs, fqops.DestChainConfigArgs{ + fqArgs = append(fqArgs, fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: remoteChainSelector, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: dstChainCfg.IsEnabled, MaxDataBytes: DefaultMaxDataBytes, MaxPerMsgGasLimit: DefaultMaxPerMsgGasLimit, @@ -412,37 +420,29 @@ func (r *LaneMigrator) UpdateVersionWithRouter() *cldf_ops.Sequence[deploy.RampU }) } // set the destChainConfig with the updated router - writeOutputOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.ApplyDestChainConfigUpdates, c, contract.FunctionInput[[]onrampops.DestChainConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: onRampArgs, + writeOutputOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.NewWriteApplyDestChainConfigUpdates(onRamp), c, ops2contract.FunctionInput[[]orbind.OnRampDestChainConfigArgs]{ + Args: onRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error applying destChainConfig update to onRamp: %w", err) } - writes = append(writes, writeOutputOnRamp.Output) - // now set the sourceChainConfig with the updated router + writes = append(writes, writeOutputOps2ToLegacy(writeOutputOnRamp.Output)) writeOutputOffRamp, err := cldf_ops.ExecuteOperation( - b, offrampops.ApplySourceChainConfigUpdates, c, - contract.FunctionInput[[]offrampops.SourceChainConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: offRampAddr, - Args: offRampArgs, + b, offrampops.NewWriteApplySourceChainConfigUpdates(offRamp), c, + ops2contract.FunctionInput[[]offbind.OffRampSourceChainConfigArgs]{ + Args: offRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error applying sourceChainConfig update to offRamp: %w", err) } - writes = append(writes, writeOutputOffRamp.Output) - // update fq 2.0 to have defaultTxLimit set to 8M - fqDestChainUpdateRep, err := cldf_ops.ExecuteOperation(b, fqops.ApplyDestChainConfigUpdates, c, contract.FunctionInput[[]fqops.DestChainConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: feequoterAddr, - Args: fqArgs, + writes = append(writes, writeOutputOps2ToLegacy(writeOutputOffRamp.Output)) + fqDestChainUpdateRep, err := cldf_ops.ExecuteOperation(b, fqops.NewWriteApplyDestChainConfigUpdates(feeQuoterContract), c, ops2contract.FunctionInput[[]fqbind.FeeQuoterDestChainConfigArgs]{ + Args: fqArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("error applying destChainConfig update to fee quoter: %w", err) } - writes = append(writes, fqDestChainUpdateRep.Output) + writes = append(writes, writeOutputOps2ToLegacy(fqDestChainUpdateRep.Output)) batchOp, err := contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) diff --git a/chains/evm/deployment/v2_0_0/adapters/lanemigrator_test.go b/chains/evm/deployment/v2_0_0/adapters/lanemigrator_test.go index 99fe42614d..46e4812989 100644 --- a/chains/evm/deployment/v2_0_0/adapters/lanemigrator_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/lanemigrator_test.go @@ -16,6 +16,8 @@ import ( evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/changesets" @@ -51,6 +53,7 @@ func TestLaneMigrator(t *testing.T) { // On each chain, deploy chain contracts ds := datastore.NewMemoryDataStore() for _, chainSel := range []uint64{chainA, chainB} { + e.OperationsBundle = testsetup.BundleWithFreshReporter(e.OperationsBundle) create2FactoryRef, err := contract_utils.MaybeDeployContract(e.OperationsBundle, create2_factory.Deploy, e.BlockChains.EVMChains()[chainSel], contract_utils.DeployInput[create2_factory.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(create2_factory.ContractType, *semver.MustParse("2.0.0")), ChainSelector: chainSel, @@ -143,10 +146,10 @@ func TestLaneMigrator(t *testing.T) { Version: fee_quoter.Version, }, chainA, evm_datastore_utils.ToEVMAddress) require.NoError(t, err) - opOut, err := cldf_ops.ExecuteOperation(e.OperationsBundle, fee_quoter.GetDestChainConfig, evmChain1, contract_utils.FunctionInput[uint64]{ - ChainSelector: chainA, - Address: feeQuoterAddr, - Args: chainB, + fq, err := fqbind.NewFeeQuoter(feeQuoterAddr, evmChain1.Client) + require.NoError(t, err) + opOut, err := cldf_ops.ExecuteOperation(e.OperationsBundle, fee_quoter.NewReadGetDestChainConfig(fq), evmChain1, ops2contract.FunctionInput[uint64]{ + Args: chainB, }) require.NoError(t, err) destConfig := opOut.Output diff --git a/chains/evm/deployment/v2_0_0/adapters/lombard_chain.go b/chains/evm/deployment/v2_0_0/adapters/lombard_chain.go index 439140bcc9..e89e738618 100644 --- a/chains/evm/deployment/v2_0_0/adapters/lombard_chain.go +++ b/chains/evm/deployment/v2_0_0/adapters/lombard_chain.go @@ -4,11 +4,12 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" - evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + evm_tokens "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences/tokens" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" seq_core "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -64,10 +65,12 @@ func (c *LombardChainAdapter) RemoteTokenAddress(bundle operations.Bundle, ds da return nil, fmt.Errorf("failed to get token pool: %w", err) } - getTokenReport, err := operations.ExecuteOperation(bundle, token_pool.GetToken, chains.EVMChains()[selector], evm_contract.FunctionInput[struct{}]{ - ChainSelector: selector, - Address: common.HexToAddress(tokenPool.Address), - }) + chain := chains.EVMChains()[selector] + tp, err := evm_tokens.BindTokenPool(common.HexToAddress(tokenPool.Address), chain) + if err != nil { + return nil, fmt.Errorf("failed to bind token pool: %w", err) + } + getTokenReport, err := operations.ExecuteOperation(bundle, token_pool.NewReadGetToken(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to execute get token operation: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/adapters/token_verifier_config_adapter.go b/chains/evm/deployment/v2_0_0/adapters/token_verifier_config_adapter.go index 2db15cf6f2..c85a3744d6 100644 --- a/chains/evm/deployment/v2_0_0/adapters/token_verifier_config_adapter.go +++ b/chains/evm/deployment/v2_0_0/adapters/token_verifier_config_adapter.go @@ -3,10 +3,10 @@ package adapters import ( "fmt" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/cctp_verifier" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" dsutil "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" ccvadapters "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" diff --git a/chains/evm/deployment/v2_0_0/adapters/tokens.go b/chains/evm/deployment/v2_0_0/adapters/tokens.go index 64974c07a8..9ecbc9bd43 100644 --- a/chains/evm/deployment/v2_0_0/adapters/tokens.go +++ b/chains/evm/deployment/v2_0_0/adapters/tokens.go @@ -15,7 +15,9 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/token_pool" evm_tokens "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences/tokens" + tpbinding "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/token_pool" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" bnmOps "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/burn_mint_erc20" bnmDripOps "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/burn_mint_erc20_with_drip" @@ -232,10 +234,11 @@ func (t *TokenAdapter) DeployTokenPoolForToken() *cldf_ops.Sequence[tokens.Deplo configureInput.RouterAddress = resolved } if thresholdProvided { - hooksReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetAdvancedPoolHooks, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: poolAddr, - }) + tp, bindErr := evm_tokens.BindTokenPool(poolAddr, evmChain) + if bindErr != nil { + return sequences.OnChainOutput{}, bindErr + } + hooksReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetAdvancedPoolHooks(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to read advanced pool hooks address from existing token pool %s on chain %d: %w", poolAddr, input.ChainSelector, err) } @@ -345,10 +348,11 @@ func (t *TokenAdapter) DeriveTokenDecimals(e deployment.Environment, chainSelect if !ok { return 0, fmt.Errorf("chain with selector %d not found", chainSelector) } - getTokenDecimalsReport, err := cldf_ops.ExecuteOperation(e.OperationsBundle, token_pool.GetTokenDecimals, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: common.HexToAddress(poolRef.Address), - }) + tp, err := evm_tokens.BindTokenPool(common.HexToAddress(poolRef.Address), evmChain) + if err != nil { + return 0, err + } + getTokenDecimalsReport, err := cldf_ops.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetTokenDecimals(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err == nil { return getTokenDecimalsReport.Output, nil } @@ -356,10 +360,7 @@ func (t *TokenAdapter) DeriveTokenDecimals(e deployment.Environment, chainSelect tokenAddr := common.BytesToAddress(tokenBytes) if tokenAddr.Cmp(common.Address{}) == 0 { - getTokenReport, getTokErr := cldf_ops.ExecuteOperation(e.OperationsBundle, token_pool.GetToken, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: common.HexToAddress(poolRef.Address), - }) + getTokenReport, getTokErr := cldf_ops.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetToken(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if getTokErr != nil { return 0, fmt.Errorf("failed to get token decimals from token pool with address %s on %s: %w", poolRef.Address, evmChain, poolErr) } @@ -399,11 +400,11 @@ func (t *TokenAdapter) SetTokenPoolRateLimits() *cldf_ops.Sequence[tokens.TPRLRe return sequences.OnChainOutput{}, fmt.Errorf("token pool address for ref %+v is zero", input.TokenPoolRef) } - currentFinalityConfig, err := cldf_ops.ExecuteOperation(b, token_pool.GetAllowedFinalityConfig, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddr, - Args: struct{}{}, - }) + tp, err := evm_tokens.BindTokenPool(tokenPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + currentFinalityConfig, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetAllowedFinalityConfig(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get allowed finality config for token pool at %s on chain %d: %w", tokenPoolAddr.Hex(), input.ChainSelector, err) } @@ -412,10 +413,8 @@ func (t *TokenAdapter) SetTokenPoolRateLimits() *cldf_ops.Sequence[tokens.TPRLRe if !input.AllowedFinalityConfig.IsZero() { requestedFinalityConfig := input.AllowedFinalityConfig.Raw() if requestedFinalityConfig != currentFinalityConfig.Output { - _, err = cldf_ops.ExecuteOperation(b, token_pool.SetAllowedFinalityConfig, evmChain, contract.FunctionInput[[4]byte]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddr, - Args: requestedFinalityConfig, + _, err = cldf_ops.ExecuteOperation(b, token_pool.NewWriteSetAllowedFinalityConfig(tp), evmChain, ops2contract.FunctionInput[[4]byte]{ + Args: requestedFinalityConfig, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set allowed finality config on token pool at %s on chain %d: %w", tokenPoolAddr.Hex(), input.ChainSelector, err) @@ -424,16 +423,16 @@ func (t *TokenAdapter) SetTokenPoolRateLimits() *cldf_ops.Sequence[tokens.TPRLRe } } - args := []token_pool.RateLimitConfigArgs{ + args := []tpbinding.TokenPoolRateLimitConfigArgs{ { RemoteChainSelector: input.RemoteChainSelector, FastFinality: finalityConfig != finality.RawWaitForFinality, - OutboundRateLimiterConfig: token_pool.Config{ + OutboundRateLimiterConfig: tpbinding.RateLimiterConfig{ IsEnabled: input.OutboundRateLimiterConfig.IsEnabled, Capacity: input.OutboundRateLimiterConfig.Capacity, Rate: input.OutboundRateLimiterConfig.Rate, }, - InboundRateLimiterConfig: token_pool.Config{ + InboundRateLimiterConfig: tpbinding.RateLimiterConfig{ IsEnabled: input.InboundRateLimiterConfig.IsEnabled, Capacity: input.InboundRateLimiterConfig.Capacity, Rate: input.InboundRateLimiterConfig.Rate, @@ -441,16 +440,14 @@ func (t *TokenAdapter) SetTokenPoolRateLimits() *cldf_ops.Sequence[tokens.TPRLRe }, } - report, err := cldf_ops.ExecuteOperation(b, token_pool.SetRateLimitConfig, evmChain, contract.FunctionInput[[]token_pool.RateLimitConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddr, - Args: args, + report, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteSetRateLimitConfig(tp), evmChain, ops2contract.FunctionInput[[]tpbinding.TokenPoolRateLimitConfigArgs]{ + Args: args, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set rate limit config on pool %s: %w", tokenPoolAddr, err) } - batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{report.Output}) + batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{writeOutputOps2ToLegacy(report.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation: %w", err) } @@ -490,14 +487,16 @@ func (t *TokenAdapter) GetOnchainTokenTransferFeeConfig(e deployment.Environment return tokens.TokenTransferFeeConfig{}, errors.New("pool address cannot be the zero address") } + tp, err := evm_tokens.BindTokenPool(addr, chain) + if err != nil { + return tokens.TokenTransferFeeConfig{}, err + } report, err := cldf_ops.ExecuteOperation( e.OperationsBundle, - token_pool.GetTokenTransferFeeConfig, + token_pool.NewReadGetTokenTransferFeeConfig(tp), chain, - contract.FunctionInput[token_pool.GetTokenTransferFeeConfigArgs]{ - ChainSelector: src, - Address: addr, - Args: args, + ops2contract.FunctionInput[token_pool.GetTokenTransferFeeConfigArgs]{ + Args: args, }, ) if err != nil { @@ -522,12 +521,13 @@ func (t *TokenAdapter) GetOnchainTokenTransferFeeConfig(e deployment.Environment type poolOpsV200 struct{} func (p *poolOpsV200) GetToken(b cldf_ops.Bundle, ch evm.Chain, poolAddr common.Address) (common.Address, error) { + tp, err := evm_tokens.BindTokenPool(poolAddr, ch) + if err != nil { + return common.Address{}, err + } res, err := cldf_ops.ExecuteOperation(b, - token_pool.GetToken, ch, - contract.FunctionInput[struct{}]{ - ChainSelector: ch.Selector, - Address: poolAddr, - }, + token_pool.NewReadGetToken(tp), ch, + ops2contract.FunctionInput[struct{}]{}, ) if err != nil { return common.Address{}, fmt.Errorf("GetToken v2.0.0: %w", err) diff --git a/chains/evm/deployment/v2_0_0/adapters/tokens_test.go b/chains/evm/deployment/v2_0_0/adapters/tokens_test.go index 9949582772..b2f821ae57 100644 --- a/chains/evm/deployment/v2_0_0/adapters/tokens_test.go +++ b/chains/evm/deployment/v2_0_0/adapters/tokens_test.go @@ -12,6 +12,7 @@ import ( evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" bnm_drip_v1_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/burn_mint_erc20_with_drip" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/burn_mint_erc20_with_drip" @@ -323,25 +324,22 @@ func TestTokenAdapter(t *testing.T) { require.Equal(t, tokenPoolAddr, tokenConfigReport.Output.TokenPool, "Token pool address in registry should match deployed token pool address") require.Equal(t, evmChain.DeployerKey.From, tokenConfigReport.Output.Administrator, "Deployer should be the admin of the token in the registry") - chainSupportReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetSupportedChains, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: tokenPoolAddr, - }) + tp, err := tp_bindings.NewTokenPool(tokenPoolAddr, evmChain.Client) + require.NoError(t, err, "Failed to bind token pool") + supportedChains, err := tp.GetSupportedChains(&bind.CallOpts{Context: t.Context()}) require.NoError(t, err, "Failed to get supported chains from token pool") - require.Len(t, chainSupportReport.Output, 1, "There should be 1 supported remote chain in the token pool") + require.Len(t, supportedChains, 1, "There should be 1 supported remote chain in the token pool") var remoteChainSel uint64 if chainSel == chainA { remoteChainSel = chainB } else { remoteChainSel = chainA } - require.Equal(t, remoteChainSel, chainSupportReport.Output[0], "Remote chain in token pool should match expected") + require.Equal(t, remoteChainSel, supportedChains[0], "Remote chain in token pool should match expected") // GetCurrentRateLimiterState is only available in version 2.0.0+ if version.GreaterThan(semver.MustParse("1.6.9")) || version.Equal(semver.MustParse("2.0.0")) { - rateLimiterStateReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetCurrentRateLimiterState, evmChain, contract.FunctionInput[token_pool.GetCurrentRateLimiterStateArgs]{ - ChainSelector: chainSel, - Address: tokenPoolAddr, + rateLimiterStateReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetCurrentRateLimiterState(tp), evmChain, ops2contract.FunctionInput[token_pool.GetCurrentRateLimiterStateArgs]{ Args: token_pool.GetCurrentRateLimiterStateArgs{ RemoteChainSelector: remoteChainSel, }, @@ -501,18 +499,14 @@ func TestTokenExpansion(t *testing.T) { require.NoError(t, err, "Token pool should exist in datastore") // Verify token pool points to the correct token - getTokenReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetToken, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: poolAddr, - }) + tp, err := tp_bindings.NewTokenPool(poolAddr, evmChain.Client) require.NoError(t, err) - require.Equal(t, tokenAddr, getTokenReport.Output, "Token pool should point to the deployed token") + onChainToken, err := tp.GetToken(&bind.CallOpts{Context: t.Context()}) + require.NoError(t, err) + require.Equal(t, tokenAddr, onChainToken, "Token pool should point to the deployed token") // Verify token pool decimals - getDecimalsReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetTokenDecimals, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: poolAddr, - }) + getDecimalsReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetTokenDecimals(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) require.Equal(t, uint8(18), getDecimalsReport.Output, "Token pool decimals should match token decimals") @@ -653,12 +647,11 @@ func TestTokenExpansion_RouterRefReconcile(t *testing.T) { }, chainSel, evm_datastore_utils.ToEVMAddress) require.NoError(t, err) - readDynamicConfig := func(t *testing.T) token_pool.GetDynamicConfigResult { + tp, err := tp_bindings.NewTokenPool(poolAddr, evmChain.Client) + require.NoError(t, err) + readDynamicConfig := func(t *testing.T) tp_bindings.GetDynamicConfig { t.Helper() - report, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetDynamicConfig, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: poolAddr, - }) + report, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetDynamicConfig(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) return report.Output } @@ -793,10 +786,9 @@ func TestTokenExpansion_FreshDeployWithRouterRef(t *testing.T) { }, chainSel, evm_datastore_utils.ToEVMAddress) require.NoError(t, err) - cfgReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.GetDynamicConfig, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: poolAddr, - }) + tp, err := tp_bindings.NewTokenPool(poolAddr, evmChain.Client) + require.NoError(t, err) + cfgReport, err := operations.ExecuteOperation(e.OperationsBundle, token_pool.NewReadGetDynamicConfig(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) require.Equal(t, testRouter, cfgReport.Output.Router, "freshly-deployed pool should be wired to TestRouter when RouterRef points at it") } diff --git a/chains/evm/deployment/v2_0_0/adapters/verifier_config_adapter.go b/chains/evm/deployment/v2_0_0/adapters/verifier_config_adapter.go index f8b7d5a42f..54b8d07660 100644 --- a/chains/evm/deployment/v2_0_0/adapters/verifier_config_adapter.go +++ b/chains/evm/deployment/v2_0_0/adapters/verifier_config_adapter.go @@ -3,11 +3,11 @@ package adapters import ( "fmt" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/rmn_remote" dsutil "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" ccvadapters "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" diff --git a/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks/advanced_pool_hooks.go b/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks/advanced_pool_hooks.go index 548a8d21ae..e6c3593f28 100644 --- a/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks/advanced_pool_hooks.go +++ b/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks/advanced_pool_hooks.go @@ -5,415 +5,281 @@ package advanced_pool_hooks import ( "math/big" - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "AdvancedPoolHooks" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const AdvancedPoolHooksABI = `[{"type":"constructor","inputs":[{"name":"allowlist","type":"address[]","internalType":"address[]"},{"name":"thresholdAmountForAdditionalCCVs","type":"uint256","internalType":"uint256"},{"name":"policyEngine","type":"address","internalType":"address"},{"name":"authorizedCallers","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowListUpdates","inputs":[{"name":"removes","type":"address[]","internalType":"address[]"},{"name":"adds","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyCCVConfigUpdates","inputs":[{"name":"ccvConfigArgs","type":"tuple[]","internalType":"struct AdvancedPoolHooks.CCVConfigArg[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdOutboundCCVs","type":"address[]","internalType":"address[]"},{"name":"inboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdInboundCCVs","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"checkAllowList","inputs":[{"name":"sender","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllCCVConfigs","inputs":[],"outputs":[{"name":"","type":"tuple[]","internalType":"struct AdvancedPoolHooks.CCVConfigArg[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"outboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdOutboundCCVs","type":"address[]","internalType":"address[]"},{"name":"inboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdInboundCCVs","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"getAllowList","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowListEnabled","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getCCVConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct AdvancedPoolHooks.CCVConfig","components":[{"name":"outboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdOutboundCCVs","type":"address[]","internalType":"address[]"},{"name":"inboundCCVs","type":"address[]","internalType":"address[]"},{"name":"thresholdInboundCCVs","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"getPolicyEngine","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getThresholdAmount","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"postflightCheck","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"preflightCheck","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"},{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setPolicyEngine","inputs":[{"name":"newPolicyEngine","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setPolicyEngineAllowFailedDetach","inputs":[{"name":"newPolicyEngine","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setThresholdAmount","inputs":[{"name":"thresholdAmount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"AllowListAdd","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListRemove","inputs":[{"name":"sender","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"CCVConfigUpdated","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"outboundCCVs","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"thresholdOutboundCCVs","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"inboundCCVs","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"thresholdInboundCCVs","type":"address[]","indexed":false,"internalType":"address[]"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PolicyEngineAttached","inputs":[{"name":"policyEngine","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PolicyEngineDetachFailed","inputs":[{"name":"policyEngine","type":"address","indexed":true,"internalType":"address"},{"name":"reason","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"ThresholdAmountSet","inputs":[{"name":"thresholdAmount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AllowListNotEnabled","inputs":[]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"DuplicateCCVNotAllowed","inputs":[{"name":"ccvAddress","type":"address","internalType":"address"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustSpecifyUnderThresholdCCVsForThresholdCCVs","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PolicyEngineDetachReverted","inputs":[{"name":"oldPolicyEngine","type":"address","internalType":"address"},{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const AdvancedPoolHooksBin = "0x60a08060405234610344576132df803803809161001c8285610349565b83398101906080818303126103445780516001600160401b0381116103445782610047918301610380565b9060208101519061005a6040820161036c565b60608201519094906001600160401b0381116103445761007a9201610380565b91331561033357600180546001600160a01b0319163317905560405160209490926100a58685610349565b60008452600036813760408051959086016001600160401b0381118782101761031d576040528552838686015260005b845181101561013c576001906001600160a01b036100f382886103f0565b5116886100ff82610793565b61010c575b5050016100d5565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a13888610104565b5085935084519160005b83518110156101b7576001600160a01b0361016182866103f0565b51169081156101a6577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef878361019860019561071b565b50604051908152a101610146565b6342bcdf7f60e11b60005260046000fd5b50838581511515806080526101fa575b6101d4838560065561041a565b604051612ab79081610828823960805181818161026a015281816113590152611e1f0152f35b90916040519061020a8383610349565b6000825260003681376080511561030c5760005b8251811015610285576001906001600160a01b0361023c82866103f0565b51168561024882610628565b610255575b50500161021e565b7f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1878561024d565b5092905060005b8151811015610300576001906001600160a01b036102aa82856103f0565b511680156102fa57846102bc8261075a565b6102ca575b50505b0161028c565b7f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a186846102c1565b506102c4565b5050506101d4836101c7565b6335f4a7b360e01b60005260046000fd5b634e487b7160e01b600052604160045260246000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761031d57604052565b51906001600160a01b038216820361034457565b9080601f83011215610344578151916001600160401b03831161031d578260051b9060208201936103b46040519586610349565b845260208085019282010192831161034457602001905b8282106103d85750505090565b602080916103e58461036c565b8152019101906103cb565b80518210156104045760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b6007546001600160a01b0391821691600091168281146105cc57806104ca575b50600780546001600160a01b0319168317905581610479575b807f57d241970863a27bedbf58b705b45a0b267f76f9a3a7fd432e217a37e4173fac91a2565b813b156104bc57604051631100482d60e01b8152818160048183875af180156104bf576104a7575b50610453565b6104b2828092610349565b6104bc57386104a1565b80fd5b6040513d84823e3d90fd5b91829391933b156105c857604051628950d760e61b8152848160048183885af190816105b4575b506105ab5750503d156105a2573d6001600160401b03811161058e5760405190610525601f8201601f191660200183610349565b8152809260203d92013e5b60405190637bdda37360e11b82526004820152604060248201526044810182519283825260005b848110610579578380602085886000838284010152601f801991011601010390fd5b80602080928401015182828601015201610557565b634e487b7160e01b83526041600452602483fd5b60609150610530565b9150913861043a565b856105c191969296610349565b93386104f1565b8380fd5b505050565b80548210156104045760005260206000200190600090565b8054801561061257600019019061060082826105d1565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b60008181526005602052604090205480156106e95760001981018181116106d3576004546000198101919082116106d357818103610682575b50505061066e60046105e9565b600052600560205260006040812055600190565b6106bb6106936106a49360046105d1565b90549060031b1c92839260046105d1565b819391549060031b91821b91600019901b19161790565b90556000526005602052604060002055388080610661565b634e487b7160e01b600052601160045260246000fd5b5050600090565b8054906801000000000000000082101561031d57816106a4916001610717940181556105d1565b9055565b806000526003602052604060002054156000146107545761073d8160026106f0565b600254906000526003602052604060002055600190565b50600090565b806000526005602052604060002054156000146107545761077c8160046106f0565b600454906000526005602052604060002055600190565b60008181526003602052604090205480156106e95760001981018181116106d3576002546000198101919082116106d3578082036107ed575b5050506107d960026105e9565b600052600360205260006040812055600190565b61080f6107fe6106a49360026105d1565b90549060031b1c92839260026105d1565b905560005260036020526040600020553880806107cc56fe6080604052600436101561001257600080fd5b60003560e01c806306b859ef146115fa578063181f5a771461157d5780632451a627146114e85780634ef34bc0146114a157806354c8a4f3146112c75780636135b0851461128057806363711574146111fd57806368317312146111ab578063776d5add1461100557806379ba509714610f1c5780638da5cb5b14610eca57806391a2749a14610cd157806395984be914610a34578063961e2e7c146109ca578063a7cd63b714610925578063a8027c0f14610882578063ce07c7c814610841578063d966866b1461028f578063e0351e1314610234578063f2fde38b146101445763f72c071b1461010357600080fd5b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f576020600654604051908152f35b600080fd5b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5773ffffffffffffffffffffffffffffffffffffffff61019061168f565b6101986120ed565b1633811461020a57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760206040517f000000000000000000000000000000000000000000000000000000000000000015158152f35b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811161013f576102de90369060040161183d565b6102e66120ed565b6000905b8082106102f357005b6102fe828285611e9f565b359067ffffffffffffffff8216820361013f5761032961031f848387611e9f565b6020810190611edf565b6103436103398685899599611e9f565b6040810190611edf565b949061035d610353888787611e9f565b6060810190611edf565b61037561036b8a8989611e9f565b6080810190611edf565b93909861038c6103878d893691611949565b612514565b61039a610387368587611949565b8061080f575b846107ad575b6040519b6103b38d6118b8565b6103be368983611949565b8d528c8b6103cd368587611949565b602083019081526103f26103e236898b611949565b92604085019384528a3691611949565b606084015267ffffffffffffffff8a1660005260086020526040600020925180519067ffffffffffffffff821161067d5768010000000000000000821161067d578454828655808310610784575b5060200184600052602060002060005b83811061075a57505050506001839e9c9d9e0190519081519167ffffffffffffffff831161067d5768010000000000000000831161067d578154838355808410610729575b5060200190600052602060002060005b8381106106ff57505050506002820190519081519167ffffffffffffffff831161067d5768010000000000000000831161067d5781548383558084106106d6575b509e9f939495969798999a9b9c9d9e60200190600052602060002060005b8381106106ac575050505060036060919e9c9d9e019101519081519167ffffffffffffffff831161067d5768010000000000000000831161067d578154838355808410610654575b5060200190600052602060002060005b83811061062a57505050506105f5608095610605956105e77fece8a336aec3d0587372c99a62c7158c83d7419e28f8c519094cf44763b00e7d9a968c9a9660019f9e9d67ffffffffffffffff976105d99115801590610621575b15610610576105c6898c166129a1565b505b6040518d81529d8e9d8e0191611f33565b918b830360208d0152611f33565b9188830360408a0152611f33565b9285840360608701521696611f33565b0390a20190916102ea565b61061b898c1661282e565b506105c8565b508515156105b6565b600190602073ffffffffffffffffffffffffffffffffffffffff855116940193818401550161055c565b8260005283602060002091820191015b818110610671575061054c565b60008155600101610664565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600190602073ffffffffffffffffffffffffffffffffffffffff8551169401938184015501610504565b8260005283602060002091820191015b8181106106f357506104e6565b600081556001016106e6565b600190602073ffffffffffffffffffffffffffffffffffffffff85511694019381840155016104a5565b9d9f9e9d8260005283602060002091820191015b81811061074e57509f9d9e9f610495565b6000815560010161073d565b600190602073ffffffffffffffffffffffffffffffffffffffff8551169401938184015501610450565b8560005282602060002091820191015b8181106107a15750610440565b60008155600101610794565b82156107e5576107c161038736878d611949565b6107e06107cf368587611949565b6107da36888e611949565b906125de565b6103a6565b7f1d56c21d0000000000000000000000000000000000000000000000000000000060005260046000fd5b86156107e557610823610387368385611949565b61083c61083136898f611949565b6107da368486611949565b6103a0565b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5761088061087b61168f565b611e1d565b005b3461013f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811161013f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261013f576108f7611731565b506044359067ffffffffffffffff821161013f5761091c610880923690600401611760565b91600401611da8565b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760405180602060045491828152019060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9060005b8181106109b4576109b0856109a4818703826118f0565b6040519182918261178e565b0390f35b825484526020909301926001928301920161098d565b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f577f80dc2a1a49dda9f8bd85c1c376266e011db6448050b7bfd5c2f423e162c111456020600435610a276120ed565b80600655604051908152a1005b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f57600954610a6f81611931565b90610a7d60405192836118f0565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610aaa82611931565b0160005b818110610c985750506009549060005b818110610ba757836040518091602082016020835281518091526040830190602060408260051b8601019301916000905b828210610afe57505050500390f35b91936020610b97827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288519067ffffffffffffffff82511681526080610b86610b74610b628786015160a08987015260a086019061186e565b6040860151858203604087015261186e565b6060850151848203606086015261186e565b92015190608081840391015261186e565b9601920192018594939192610aef565b600083821015610c6b57908060208360096001955220016003610c4a604067ffffffffffffffff60009454169384815260086020522060405193610bea856118d4565b8452604051610c0481610bfd81856119bb565b03826118f0565b6020850152604051610c1c81610bfd818a86016119bb565b6040850152604051610c3581610bfd81600286016119bb565b6060850152610bfd60405180948193016119bb565b6080820152610c598287611d65565b52610c648186611d65565b5001610abe565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b602090604051610ca7816118d4565b60008152606083820152606060408201526060808201526060608082015282828701015201610aae565b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811161013f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261013f57604051906040820182811067ffffffffffffffff82111761067d57604052806004013567ffffffffffffffff811161013f57610d80906004369184010161199d565b825260248101359067ffffffffffffffff821161013f576004610da6923692010161199d565b60208201908152610db56120ed565b519060005b8251811015610e2d578073ffffffffffffffffffffffffffffffffffffffff610de560019386611d65565b5116610df0816129da565b610dfc575b5001610dba565b60207fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a184610df5565b505160005b81518110156108805773ffffffffffffffffffffffffffffffffffffffff610e5a8284611d65565b5116908115610ea0577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef602083610e92600195612968565b50604051908152a101610e32565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760005473ffffffffffffffffffffffffffffffffffffffff81163303610fdb577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811680910361013f57606080604051611058816118b8565b8181528160208201528160408201520152600052600860205261111860406000206109b0600361117a6040519361108e856118b8565b60405161109f81610bfd81856119bb565b85526111496040516110b881610bfd81600187016119bb565b602087019081526110f5604051936110de856110d781600285016119bb565b03866118f0565b604089019485526110d760405180988193016119bb565b606087019485526040519788976020895251608060208a015260a089019061186e565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe088830301604089015261186e565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086830301606087015261186e565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301608085015261186e565b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f57602073ffffffffffffffffffffffffffffffffffffffff60075416604051908152f35b3461013f5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811161013f576101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261013f5761088090611277611702565b50600401611bec565b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f576108806112ba61168f565b6112c26120ed565b612316565b3461013f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760043567ffffffffffffffff811161013f5761131690369060040161183d565b6024359067ffffffffffffffff821161013f5761134f61133d61135793369060040161183d565b9490926113486120ed565b3691611949565b923691611949565b7f0000000000000000000000000000000000000000000000000000000000000000156114775760005b82518110156113f3578073ffffffffffffffffffffffffffffffffffffffff6113ab60019386611d65565b51166113b681612722565b6113c2575b5001611380565b60207f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf756691604051908152a1846113bb565b5060005b8151811015610880578073ffffffffffffffffffffffffffffffffffffffff61142260019385611d65565b511680156114715761143381612929565b611440575b505b016113f7565b60207f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d891604051908152a183611438565b5061143a565b7f35f4a7b30000000000000000000000000000000000000000000000000000000060005260046000fd5b3461013f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f576108806114db61168f565b6114e36120ed565b612138565b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5760405180602060025491828152019060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b818110611567576109b0856109a4818703826118f0565b8254845260209093019260019283019201611550565b3461013f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f576109b060408051906115be81836118f0565b601782527f416476616e636564506f6f6c486f6f6b7320322e302e300000000000000000006020830152519182916020835260208301906117de565b3461013f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013f5761163161168f565b5060243567ffffffffffffffff8116810361013f5761164e6116d3565b5060843567ffffffffffffffff811161013f5761166f903690600401611760565b505060a43590600282101561013f576109b0916109a49160443590611a0b565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361013f57565b359073ffffffffffffffffffffffffffffffffffffffff8216820361013f57565b606435907fffffffff000000000000000000000000000000000000000000000000000000008216820361013f57565b604435907fffffffff000000000000000000000000000000000000000000000000000000008216820361013f57565b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361013f57565b9181601f8401121561013f5782359167ffffffffffffffff831161013f576020838186019501011161013f57565b602060408183019282815284518094520192019060005b8181106117b25750505090565b825173ffffffffffffffffffffffffffffffffffffffff168452602093840193909201916001016117a5565b919082519283825260005b8481106118285750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b806020809284010151828286010152016117e9565b9181601f8401121561013f5782359167ffffffffffffffff831161013f576020808501948460051b01011161013f57565b906020808351928381520192019060005b81811061188c5750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161187f565b6080810190811067ffffffffffffffff82111761067d57604052565b60a0810190811067ffffffffffffffff82111761067d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761067d57604052565b67ffffffffffffffff811161067d5760051b60200190565b92919061195581611931565b9361196360405195866118f0565b602085838152019160051b810192831161013f57905b82821061198557505050565b60208091611992846116b2565b815201910190611979565b9080601f8301121561013f578160206119b893359101611949565b90565b906020825491828152019160005260206000209060005b8181106119df5750505090565b825473ffffffffffffffffffffffffffffffffffffffff168452602090930192600192830192016119d2565b67ffffffffffffffff1660005260086020526040600020916002811015611a7457600114611a59576119b891600160405191611a5283611a4b81846119bb565b03846118f0565b0190611fbe565b6119b891600360405191611a5283611a4b81600285016119bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b67ffffffffffffffff811161067d57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b919091611ae981611aa3565b611af660405191826118f0565b8093828252826004011161013f5781816000936004602080950137010152565b929192611b2282611aa3565b91611b3060405193846118f0565b82948184528183011161013f578281602093846000960137010152565b906119b891602081527fffffffff00000000000000000000000000000000000000000000000000000000825116602082015273ffffffffffffffffffffffffffffffffffffffff60208301511660408201526060611bb9604084015160808385015260a08401906117de565b9201519060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828503019101526117de565b611bf46124d0565b6007549073ffffffffffffffffffffffffffffffffffffffff60009216908115611d605736600411611d585760e0810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611d5c570180359067ffffffffffffffff8211611d5c576020018136038113611d5c57611ce69060405192611c82846118b8565b7fffffffff000000000000000000000000000000000000000000000000000000008635168452336020850152611cda367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601611add565b60408501523691611b16565b6060820152813b15611d5857611d2e839283926040519485809481937fc2098e0800000000000000000000000000000000000000000000000000000000835260048301611b4d565b03925af18015611d4d57611d40575050565b81611d4a916118f0565b50565b6040513d84823e3d90fd5b8280fd5b8380fd5b505050565b8051821015611d795760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91611db16124d0565b6040600093013573ffffffffffffffffffffffffffffffffffffffff81168103611d5c57611dde90611e1d565b73ffffffffffffffffffffffffffffffffffffffff60075416918215611e175736600411611d5c57611ce69060405192611c82846118b8565b50505050565b7f0000000000000000000000000000000000000000000000000000000000000000611e455750565b73ffffffffffffffffffffffffffffffffffffffff1680600052600560205260406000205415611e725750565b7fd0d259760000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9190811015611d795760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff618136030182121561013f570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013f570180359067ffffffffffffffff821161013f57602001918160051b3603831361013f57565b9160209082815201919060005b818110611f4d5750505090565b90919260208060019273ffffffffffffffffffffffffffffffffffffffff611f74886116b2565b168152019401929101611f40565b91908201809211611f8f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9160065480151591826120e2575b5050611fd6575090565b90611ff1611fea92604051938480926119bb565b03836118f0565b815180611ffe5750905090565b612009908251611f82565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061204d61203786611931565b9561204560405197886118f0565b808752611931565b0136602086013760005b8251811015612095578073ffffffffffffffffffffffffffffffffffffffff61208260019386611d65565b511661208e8288611d65565b5201612057565b509160005b8151811015611d60578073ffffffffffffffffffffffffffffffffffffffff6120c560019385611d65565b51166120db6120d5838751611f82565b88611d65565b520161209a565b101590503880611fcc565b73ffffffffffffffffffffffffffffffffffffffff60015416330361210e57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b60075473ffffffffffffffffffffffffffffffffffffffff8060009216921691808314611d60578061221e575b50817fffffffffffffffffffffffff00000000000000000000000000000000000000006007541617600755816121bc575b807f57d241970863a27bedbf58b705b45a0b267f76f9a3a7fd432e217a37e4173fac91a2565b813b1561221b576040517f1100482d000000000000000000000000000000000000000000000000000000008152818160048183875af18015611d4d57612203575b50612196565b8161220d916118f0565b8060001261221b57386121fd565b80fd5b803b15612312576040517f225435c0000000000000000000000000000000000000000000000000000000008152828160048183865af190816122fe575b506122f8573d156122cc577f5c3a3f63e48796286c8d14b455ed70b560ab62290af416cbe00f3f18afcbd4cd6122c23d9361229585611aa3565b946122a360405196876118f0565b85523d81602087013e5b936040519182916020835260208301906117de565b0390a25b38612165565b7f5c3a3f63e48796286c8d14b455ed70b560ab62290af416cbe00f3f18afcbd4cd6122c26060936122ad565b506122c6565b8361230b919492946118f0565b913861225b565b5080fd5b600073ffffffffffffffffffffffffffffffffffffffff8060075416921691808314611d6057806123f3575b50817fffffffffffffffffffffffff000000000000000000000000000000000000000060075416176007558161239857807f57d241970863a27bedbf58b705b45a0b267f76f9a3a7fd432e217a37e4173fac91a2565b813b1561221b576040517f1100482d000000000000000000000000000000000000000000000000000000008152818160048183875af18015611d4d576123de5750612196565b6123e98280926118f0565b61221b57386121fd565b91829391933b15611d5c576040517f225435c0000000000000000000000000000000000000000000000000000000008152848160048183885af190816124bc575b506124b35750503d156124aa573d61244b81611aa3565b9061245960405192836118f0565b8152809260203d92013e5b6124a66040519283927ff7bb46e600000000000000000000000000000000000000000000000000000000845260048401526040602484015260448301906117de565b0390fd5b60609150612464565b91509138612342565b856124c9919692966118f0565b9338612434565b336000526003602052604060002054156124e657565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b805160005b81811061252557505050565b60018101808211611f8f575b8281106125415750600101612519565b73ffffffffffffffffffffffffffffffffffffffff6125608386611d65565b511673ffffffffffffffffffffffffffffffffffffffff6125818387611d65565b51161461259057600101612531565b73ffffffffffffffffffffffffffffffffffffffff6125af8386611d65565b51167fa1726e400000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9081519080519060005b8381106125f6575050505050565b60005b83811061260957506001016125e8565b73ffffffffffffffffffffffffffffffffffffffff6126288388611d65565b511673ffffffffffffffffffffffffffffffffffffffff6126498386611d65565b511614612658576001016125f9565b73ffffffffffffffffffffffffffffffffffffffff6125af8388611d65565b8054821015611d795760005260206000200190600090565b805480156126f3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906126c48282612677565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000818152600560205260409020548015612827577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111611f8f57600454907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211611f8f578181036127b8575b5050506127a4600461268f565b600052600560205260006040812055600190565b61280f6127c96127da936004612677565b90549060031b1c9283926004612677565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526005602052604060002055388080612797565b5050600090565b6000818152600a60205260409020548015612827577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111611f8f57600954907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211611f8f578181036128c4575b5050506128b0600961268f565b600052600a60205260006040812055600190565b6128e66128d56127da936009612677565b90549060031b1c9283926009612677565b9055600052600a6020526040600020553880806128a3565b8054906801000000000000000082101561067d57816127da91600161292594018155612677565b9055565b806000526005602052604060002054156000146129625761294b8160046128fe565b600454906000526005602052604060002055600190565b50600090565b806000526003602052604060002054156000146129625761298a8160026128fe565b600254906000526003602052604060002055600190565b80600052600a60205260406000205415600014612962576129c38160096128fe565b60095490600052600a602052604060002055600190565b6000818152600360205260409020548015612827577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111611f8f57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211611f8f57808203612a70575b505050612a5c600261268f565b600052600360205260006040812055600190565b612a92612a816127da936002612677565b90549060031b1c9283926002612677565b90556000526003602052604060002055388080612a4f56fea164736f6c634300081a000a" - -type AdvancedPoolHooksContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewAdvancedPoolHooksContract( - address common.Address, - backend bind.ContractBackend, -) (*AdvancedPoolHooksContract, error) { - parsed, err := abi.JSON(strings.NewReader(AdvancedPoolHooksABI)) - if err != nil { - return nil, err - } - return &AdvancedPoolHooksContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *AdvancedPoolHooksContract) Address() common.Address { - return c.address -} - -func (c *AdvancedPoolHooksContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *AdvancedPoolHooksContract) ApplyCCVConfigUpdates(opts *bind.TransactOpts, args []CCVConfigArg) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyCCVConfigUpdates", args) -} - -func (c *AdvancedPoolHooksContract) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowListUpdates", removes, adds) -} - -func (c *AdvancedPoolHooksContract) SetThresholdAmount(opts *bind.TransactOpts, args *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "setThresholdAmount", args) -} - -func (c *AdvancedPoolHooksContract) SetPolicyEngine(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setPolicyEngine", args) +type ApplyAllowListUpdatesArgs struct { + Removes []common.Address `json:"removes"` + Adds []common.Address `json:"adds"` } -func (c *AdvancedPoolHooksContract) SetPolicyEngineAllowFailedDetach(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setPolicyEngineAllowFailedDetach", args) +type GetRequiredCCVsArgs struct { + Arg0 common.Address `json:"arg0"` + RemoteChainSelector uint64 `json:"remoteChainSelector"` + Amount *big.Int `json:"amount"` + Arg3 [4]byte `json:"arg3"` + Arg4 []byte `json:"arg4"` + Direction uint8 `json:"direction"` } -func (c *AdvancedPoolHooksContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) +type ConstructorArgs struct { + Allowlist []common.Address `json:"allowlist"` + ThresholdAmountForAdditionalCCVs *big.Int `json:"thresholdAmountForAdditionalCCVs"` + PolicyEngine common.Address `json:"policyEngine"` + AuthorizedCallers []common.Address `json:"authorizedCallers"` } -func (c *AdvancedPoolHooksContract) GetAllowListEnabled(opts *bind.CallOpts) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowListEnabled") - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} +var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ + Name: "advanced-pool-hooks:deploy", + Version: Version, + Description: "Deploys the AdvancedPoolHooks contract", + ContractMetadata: gobindings.AdvancedPoolHooksMetaData, + BytecodeByTypeAndVersion: map[string]contract.Bytecode{ + cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { + EVM: common.FromHex(gobindings.AdvancedPoolHooksMetaData.Bin), + }, + }, +}) -func (c *AdvancedPoolHooksContract) GetAllowList(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowList") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil +func NewWriteApplyCCVConfigUpdates(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.AdvancedPoolHooksCCVConfigArg], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.AdvancedPoolHooksCCVConfigArg, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:apply-ccv-config-updates", + Version: Version, + Description: "Calls applyCCVConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.AdvancedPoolHooksCCVConfigArg) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args []gobindings.AdvancedPoolHooksCCVConfigArg, + ) (*types.Transaction, error) { + return c.ApplyCCVConfigUpdates(opts, args) + }, + }) } -func (c *AdvancedPoolHooksContract) GetThresholdAmount(opts *bind.CallOpts) (*big.Int, error) { - var out []any - err := c.contract.Call(opts, &out, "getThresholdAmount") - if err != nil { - var zero *big.Int - return zero, err - } - return *abi.ConvertType(out[0], new(*big.Int)).(**big.Int), nil +func NewWriteApplyAllowListUpdates(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[ApplyAllowListUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyAllowListUpdatesArgs, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:apply-allow-list-updates", + Version: Version, + Description: "Calls applyAllowListUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args ApplyAllowListUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args ApplyAllowListUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowListUpdates(opts, args.Removes, args.Adds) + }, + }) } -func (c *AdvancedPoolHooksContract) GetPolicyEngine(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getPolicyEngine") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil +func NewWriteSetThresholdAmount(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[*big.Int], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[*big.Int, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:set-threshold-amount", + Version: Version, + Description: "Calls setThresholdAmount on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args *big.Int) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args *big.Int, + ) (*types.Transaction, error) { + return c.SetThresholdAmount(opts, args) + }, + }) } -func (c *AdvancedPoolHooksContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil +func NewWriteSetPolicyEngine(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:set-policy-engine", + Version: Version, + Description: "Calls setPolicyEngine on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetPolicyEngine(opts, args) + }, + }) } -func (c *AdvancedPoolHooksContract) GetAllCCVConfigs(opts *bind.CallOpts) ([]CCVConfigArg, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllCCVConfigs") - if err != nil { - var zero []CCVConfigArg - return zero, err - } - return *abi.ConvertType(out[0], new([]CCVConfigArg)).(*[]CCVConfigArg), nil +func NewWriteSetPolicyEngineAllowFailedDetach(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:set-policy-engine-allow-failed-detach", + Version: Version, + Description: "Calls setPolicyEngineAllowFailedDetach on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetPolicyEngineAllowFailedDetach(opts, args) + }, + }) } -func (c *AdvancedPoolHooksContract) GetCCVConfig(opts *bind.CallOpts, args uint64) (CCVConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getCCVConfig", args) - if err != nil { - var zero CCVConfig - return zero, err - } - return *abi.ConvertType(out[0], new(CCVConfig)).(*CCVConfig), nil +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.AdvancedPoolHooksMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.AdvancedPoolHooksInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) } -func (c *AdvancedPoolHooksContract) GetRequiredCCVs(opts *bind.CallOpts, arg0 common.Address, remoteChainSelector uint64, amount *big.Int, arg3 [4]byte, arg4 []byte, direction uint8) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRequiredCCVs", arg0, remoteChainSelector, amount, arg3, arg4, direction) - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil +func NewReadGetAllowListEnabled(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, bool, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-allow-list-enabled", + Version: Version, + Description: "Calls getAllowListEnabled on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) (bool, error) { + return c.GetAllowListEnabled(opts) + }, + }) } -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address +func NewReadGetAllowList(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-allow-list", + Version: Version, + Description: "Calls getAllowList on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllowList(opts) + }, + }) } -type CCVConfig struct { - OutboundCCVs []common.Address - ThresholdOutboundCCVs []common.Address - InboundCCVs []common.Address - ThresholdInboundCCVs []common.Address +func NewReadGetThresholdAmount(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], *big.Int, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, *big.Int, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-threshold-amount", + Version: Version, + Description: "Calls getThresholdAmount on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) (*big.Int, error) { + return c.GetThresholdAmount(opts) + }, + }) } -type CCVConfigArg struct { - RemoteChainSelector uint64 - OutboundCCVs []common.Address - ThresholdOutboundCCVs []common.Address - InboundCCVs []common.Address - ThresholdInboundCCVs []common.Address +func NewReadGetPolicyEngine(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-policy-engine", + Version: Version, + Description: "Calls getPolicyEngine on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetPolicyEngine(opts) + }, + }) } -type ApplyAllowListUpdatesArgs struct { - Removes []common.Address - Adds []common.Address +func NewReadGetAllAuthorizedCallers(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) } -type GetRequiredCCVsArgs struct { - Arg0 common.Address - RemoteChainSelector uint64 - Amount *big.Int - Arg3 [4]byte - Arg4 []byte - Direction uint8 +func NewReadGetAllCCVConfigs(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []gobindings.AdvancedPoolHooksCCVConfigArg, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []gobindings.AdvancedPoolHooksCCVConfigArg, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-all-ccv-configs", + Version: Version, + Description: "Calls getAllCCVConfigs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args struct{}) ([]gobindings.AdvancedPoolHooksCCVConfigArg, error) { + return c.GetAllCCVConfigs(opts) + }, + }) } -type ConstructorArgs struct { - Allowlist []common.Address - ThresholdAmountForAdditionalCCVs *big.Int - PolicyEngine common.Address - AuthorizedCallers []common.Address +func NewReadGetCCVConfig(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.AdvancedPoolHooksCCVConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.AdvancedPoolHooksCCVConfig, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-ccv-config", + Version: Version, + Description: "Calls getCCVConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args uint64) (gobindings.AdvancedPoolHooksCCVConfig, error) { + return c.GetCCVConfig(opts, args) + }, + }) } -var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "advanced-pool-hooks:deploy", - Version: Version, - Description: "Deploys the AdvancedPoolHooks contract", - ContractMetadata: &bind.MetaData{ - ABI: AdvancedPoolHooksABI, - Bin: AdvancedPoolHooksBin, - }, - BytecodeByTypeAndVersion: map[string]contract.Bytecode{ - cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(AdvancedPoolHooksBin), +func NewReadGetRequiredCCVs(c gobindings.AdvancedPoolHooksInterface) *cld_ops.Operation[contract.FunctionInput[GetRequiredCCVsArgs], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetRequiredCCVsArgs, []common.Address, gobindings.AdvancedPoolHooksInterface]{ + Name: "advanced-pool-hooks:get-required-cc-vs", + Version: Version, + Description: "Calls getRequiredCCVs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.AdvancedPoolHooksInterface, opts *bind.CallOpts, args GetRequiredCCVsArgs) ([]common.Address, error) { + return c.GetRequiredCCVs(opts, args.Arg0, args.RemoteChainSelector, args.Amount, args.Arg3, args.Arg4, args.Direction) }, - }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyCCVConfigUpdates = contract.NewWrite(contract.WriteParams[[]CCVConfigArg, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:apply-ccv-config-updates", - Version: Version, - Description: "Calls applyCCVConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, []CCVConfigArg], - Validate: func([]CCVConfigArg) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args []CCVConfigArg, - ) (*types.Transaction, error) { - return c.ApplyCCVConfigUpdates(opts, args) - }, -}) - -var ApplyAllowListUpdates = contract.NewWrite(contract.WriteParams[ApplyAllowListUpdatesArgs, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:apply-allow-list-updates", - Version: Version, - Description: "Calls applyAllowListUpdates on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, ApplyAllowListUpdatesArgs], - Validate: func(ApplyAllowListUpdatesArgs) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args ApplyAllowListUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowListUpdates(opts, args.Removes, args.Adds) - }, -}) - -var SetThresholdAmount = contract.NewWrite(contract.WriteParams[*big.Int, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:set-threshold-amount", - Version: Version, - Description: "Calls setThresholdAmount on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, *big.Int], - Validate: func(*big.Int) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args *big.Int, - ) (*types.Transaction, error) { - return c.SetThresholdAmount(opts, args) - }, -}) - -var SetPolicyEngine = contract.NewWrite(contract.WriteParams[common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:set-policy-engine", - Version: Version, - Description: "Calls setPolicyEngine on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetPolicyEngine(opts, args) - }, -}) - -var SetPolicyEngineAllowFailedDetach = contract.NewWrite(contract.WriteParams[common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:set-policy-engine-allow-failed-detach", - Version: Version, - Description: "Calls setPolicyEngineAllowFailedDetach on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetPolicyEngineAllowFailedDetach(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: AdvancedPoolHooksABI, - NewContract: NewAdvancedPoolHooksContract, - IsAllowedCaller: contract.OnlyOwner[*AdvancedPoolHooksContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *AdvancedPoolHooksContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var GetAllowListEnabled = contract.NewRead(contract.ReadParams[struct{}, bool, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-allow-list-enabled", - Version: Version, - Description: "Calls getAllowListEnabled on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) (bool, error) { - return c.GetAllowListEnabled(opts) - }, -}) - -var GetAllowList = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-allow-list", - Version: Version, - Description: "Calls getAllowList on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllowList(opts) - }, -}) - -var GetThresholdAmount = contract.NewRead(contract.ReadParams[struct{}, *big.Int, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-threshold-amount", - Version: Version, - Description: "Calls getThresholdAmount on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) (*big.Int, error) { - return c.GetThresholdAmount(opts) - }, -}) - -var GetPolicyEngine = contract.NewRead(contract.ReadParams[struct{}, common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-policy-engine", - Version: Version, - Description: "Calls getPolicyEngine on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetPolicyEngine(opts) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) - -var GetAllCCVConfigs = contract.NewRead(contract.ReadParams[struct{}, []CCVConfigArg, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-all-ccv-configs", - Version: Version, - Description: "Calls getAllCCVConfigs on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args struct{}) ([]CCVConfigArg, error) { - return c.GetAllCCVConfigs(opts) - }, -}) - -var GetCCVConfig = contract.NewRead(contract.ReadParams[uint64, CCVConfig, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-ccv-config", - Version: Version, - Description: "Calls getCCVConfig on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args uint64) (CCVConfig, error) { - return c.GetCCVConfig(opts, args) - }, -}) - -var GetRequiredCCVs = contract.NewRead(contract.ReadParams[GetRequiredCCVsArgs, []common.Address, *AdvancedPoolHooksContract]{ - Name: "advanced-pool-hooks:get-required-cc-vs", - Version: Version, - Description: "Calls getRequiredCCVs on the contract", - ContractType: ContractType, - NewContract: NewAdvancedPoolHooksContract, - CallContract: func(c *AdvancedPoolHooksContract, opts *bind.CallOpts, args GetRequiredCCVsArgs) ([]common.Address, error) { - return c.GetRequiredCCVs(opts, args.Arg0, args.RemoteChainSelector, args.Amount, args.Arg3, args.Arg4, args.Direction) - }, -}) + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks_extractor/advanced_pool_hooks_extractor.go b/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks_extractor/advanced_pool_hooks_extractor.go index e5e0300946..4d78bc91cf 100644 --- a/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks_extractor/advanced_pool_hooks_extractor.go +++ b/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks_extractor/advanced_pool_hooks_extractor.go @@ -3,74 +3,27 @@ package advanced_pool_hooks_extractor import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks_extractor" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "AdvancedPoolHooksExtractor" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const AdvancedPoolHooksExtractorABI = `[{"type":"function","name":"PARAM_AMOUNT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_AMOUNT_POST_FEE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_FROM","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_REMOTE_CHAIN_SELECTOR","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_REQUESTED_FINALITY","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_SOURCE_DENOMINATED_AMOUNT","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_SOURCE_POOL_ADDRESS","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_SOURCE_POOL_DATA","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_TO","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"PARAM_TOKEN","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"extract","inputs":[{"name":"payload","type":"tuple","internalType":"struct IPolicyEngine.Payload","components":[{"name":"selector","type":"bytes4","internalType":"bytes4"},{"name":"sender","type":"address","internalType":"address"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"context","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple[]","internalType":"struct IPolicyEngine.Parameter[]","components":[{"name":"name","type":"bytes32","internalType":"bytes32"},{"name":"value","type":"bytes","internalType":"bytes"}]}],"stateMutability":"pure"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"error","name":"UnsupportedSelector","inputs":[{"name":"selector","type":"bytes4","internalType":"bytes4"}]}]` -const AdvancedPoolHooksExtractorBin = "0x6080806040523460155761130b908161001b8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c8063181f5a771461052c5780632eb866711461041f57806333c05ead146103c65780638572e6f81461036d5780638709a94a146103145780638a893fd5146102bb578063a4b616f314610262578063be2719ea14610209578063c26cd1ee146101b0578063dac0d49614610157578063e0d169c0146100fe5763e4528bf7146100a057600080fd5b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f0d2d49551f0c0301537208b1e18ac6b2eaad1a8e62061a2579a6123e92cf51378152f35b600080fd5b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f9a6c1917fcf35001153b9951e537209ccb8ebcc5be8c133daa6285a42081b0c48152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f0d172009e3817c908f5f9657cc7c6d88fd284af3f37b66446e02da140dc3da818152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517fcaed9fe748826c17a6bbf34cda465187a44e04fe0ef52519bc6b07e8fd57121b8152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d88152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517fe32332318510df2a33cbbddd86b6f0111e2fb7e55391c4925c5fadaeca9fb4298152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f0c548cc8fd8090ef28614d6a1c6269108d2b4c6d3e100ebab8ebba82671a5d398152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f89c4783cb6cc307f98e95f2d5d5d8647bdb3d4bdd087209374f187b38e0988958152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f1b56e27094b67facb247d55c7c05912fc4cbffd28f63f412fcdd194991f8db488152f35b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760206040517f9b9b0454cadcb5884dd3faa6ba975da4d2459aa3f11d31291a25a8358f84946d8152f35b346100f95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f95760043567ffffffffffffffff81116100f95760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126100f957610498906004016106c5565b6040518091602082016020835281518091526040830190602060408260051b8601019301916000905b8282106104d057505050500390f35b9193602061051c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186526040838a518051845201519181858201520190610639565b96019201920185949391926104c1565b346100f95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100f9576105a9604080519061056d81836105f8565b602082527f416476616e636564506f6f6c486f6f6b73457874726163746f7220322e302e30602083015251918291602083526020830190610639565b0390f35b6040810190811067ffffffffffffffff8211176105c957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105c957604052565b919082519283825260005b8481106106835750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201610644565b357fffffffff00000000000000000000000000000000000000000000000000000000811681036100f95790565b9060607fa8027c0f000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000061071385610698565b1614610ce557507f63711574000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000061076584610698565b16146107c3577fffffffff0000000000000000000000000000000000000000000000000000000061079583610698565b7fa519a14f000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b908060406107d2920190611117565b8101906060818303126100f957803567ffffffffffffffff81116100f957810191610100838203126100f95760405192610100840184811067ffffffffffffffff8211176105c957604052803567ffffffffffffffff81116100f9578261083a918301611168565b8452610848602082016111dd565b926020850193845261085c604083016111f2565b906040860191825260608601946060840135865261087c608085016111f2565b916080880192835260a085013567ffffffffffffffff81116100f957866108a4918701611168565b9460a0890195865260c081013567ffffffffffffffff81116100f957876108cc918301611168565b9660c08a0197885260e082013567ffffffffffffffff81116100f9576108f29201611168565b60e089015261090360408201611213565b9360405198610140610915818c6105f8565b60098b527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b818110610cbf5750509173ffffffffffffffffffffffffffffffffffffffff8095949267ffffffffffffffff945160405190610979826105ad565b7f45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8825260208201526109aa8d611240565b526109b48c611240565b505116604051906020820152602081526109cf6040826105f8565b604051906109dc826105ad565b7f1b56e27094b67facb247d55c7c05912fc4cbffd28f63f412fcdd194991f8db4882526020820152610a0d8b61127c565b52610a178a61127c565b506020604051910135602082015260208152610a346040826105f8565b60405190610a41826105ad565b7f89c4783cb6cc307f98e95f2d5d5d8647bdb3d4bdd087209374f187b38e09889582526020820152610a728a61128c565b52610a7c8961128c565b50511660405190602082015260208152610a976040826105f8565b60405190610aa4826105ad565b7f0d2d49551f0c0301537208b1e18ac6b2eaad1a8e62061a2579a6123e92cf513782526020820152610ad58861129c565b52610adf8761129c565b50511660405190602082015260208152610afa6040826105f8565b60405190610b07826105ad565b7f9b9b0454cadcb5884dd3faa6ba975da4d2459aa3f11d31291a25a8358f84946d82526020820152610b38866112ac565b52610b42856112ac565b507fffffffff000000000000000000000000000000000000000000000000000000006040519116602082015260208152610b7d6040826105f8565b60405190610b8a826105ad565b7f9a6c1917fcf35001153b9951e537209ccb8ebcc5be8c133daa6285a42081b0c482526020820152610bbb856112bc565b52610bc5846112bc565b505160405190610bd4826105ad565b7fe32332318510df2a33cbbddd86b6f0111e2fb7e55391c4925c5fadaeca9fb42982526020820152610c05846112cc565b52610c0f836112cc565b505160405190610c1e826105ad565b7f0d172009e3817c908f5f9657cc7c6d88fd284af3f37b66446e02da140dc3da8182526020820152610c4f836112dc565b52610c59826112dc565b505160405190602082015260208152610c736040826105f8565b60405190610c80826105ad565b7fcaed9fe748826c17a6bbf34cda465187a44e04fe0ef52519bc6b07e8fd57121b82526020820152610cb1826112ed565b52610cbb816112ed565b5090565b808c6020809360405192610cd2846105ad565b600084526060838501520101520161093e565b91806040610cf4920190611117565b81016080828203126100f957813567ffffffffffffffff81116100f95782019160a0838303126100f9576040519060a0820182811067ffffffffffffffff8211176105c957604052833567ffffffffffffffff81116100f95783610d59918601611168565b8252610d67602085016111dd565b9060208301918252610d7b604086016111f2565b9460408401958652610d986080898601928a8101358452016111f2565b9360808101948552610dac60208401611213565b9560408401359067ffffffffffffffff82116100f957610dcd918501611168565b5060405196610100610ddf818a6105f8565b600789527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00160005b8181106110f35750509173ffffffffffffffffffffffffffffffffffffffff96979899918767ffffffffffffffff969594511660405190602082015260208152610e536040826105f8565b60405190610e60826105ad565b7f45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d882526020820152610e918b611240565b52610e9b8a611240565b505160405190610eaa826105ad565b7f1b56e27094b67facb247d55c7c05912fc4cbffd28f63f412fcdd194991f8db4882526020820152610edb8a61127c565b52610ee58961127c565b505160405190602082015260208152610eff6040826105f8565b60405190610f0c826105ad565b7f89c4783cb6cc307f98e95f2d5d5d8647bdb3d4bdd087209374f187b38e09889582526020820152610f3d8961128c565b52610f478861128c565b50604051910135602082015260208152610f626040826105f8565b60405190610f6f826105ad565b7f0c548cc8fd8090ef28614d6a1c6269108d2b4c6d3e100ebab8ebba82671a5d3982526020820152610fa08761129c565b52610faa8661129c565b50511660405190602082015260208152610fc56040826105f8565b60405190610fd2826105ad565b7f0d2d49551f0c0301537208b1e18ac6b2eaad1a8e62061a2579a6123e92cf513782526020820152611003856112ac565b5261100d846112ac565b505116604051906020820152602081526110286040826105f8565b60405190611035826105ad565b7f9b9b0454cadcb5884dd3faa6ba975da4d2459aa3f11d31291a25a8358f84946d82526020820152611066836112bc565b52611070826112bc565b507fffffffff0000000000000000000000000000000000000000000000000000000060405191166020820152602081526110ab6040826105f8565b604051906110b8826105ad565b7f9a6c1917fcf35001153b9951e537209ccb8ebcc5be8c133daa6285a42081b0c4825260208201526110e9826112cc565b52610cbb816112cc565b602090604051611102816105ad565b600081528d8382015282828d01015201610e08565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156100f9570180359067ffffffffffffffff82116100f9576020019181360383136100f957565b81601f820112156100f95780359067ffffffffffffffff82116105c957604051926111bb601f84017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016602001856105f8565b828452602083830101116100f957816000926020809301838601378301015290565b359067ffffffffffffffff821682036100f957565b359073ffffffffffffffffffffffffffffffffffffffff821682036100f957565b35907fffffffff00000000000000000000000000000000000000000000000000000000821682036100f957565b80511561124d5760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80516001101561124d5760400190565b80516002101561124d5760600190565b80516003101561124d5760800190565b80516004101561124d5760a00190565b80516005101561124d5760c00190565b80516006101561124d5760e00190565b80516007101561124d576101000190565b80516008101561124d57610120019056fea164736f6c634300081a000a" - -type AdvancedPoolHooksExtractorContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewAdvancedPoolHooksExtractorContract( - address common.Address, - backend bind.ContractBackend, -) (*AdvancedPoolHooksExtractorContract, error) { - parsed, err := abi.JSON(strings.NewReader(AdvancedPoolHooksExtractorABI)) - if err != nil { - return nil, err - } - return &AdvancedPoolHooksExtractorContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *AdvancedPoolHooksExtractorContract) Address() common.Address { - return c.address -} - -func (c *AdvancedPoolHooksExtractorContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs = struct{} var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "advanced-pool-hooks-extractor:deploy", - Version: Version, - Description: "Deploys the AdvancedPoolHooksExtractor contract", - ContractMetadata: &bind.MetaData{ - ABI: AdvancedPoolHooksExtractorABI, - Bin: AdvancedPoolHooksExtractorBin, - }, + Name: "advanced-pool-hooks-extractor:deploy", + Version: Version, + Description: "Deploys the AdvancedPoolHooksExtractor contract", + ContractMetadata: gobindings.AdvancedPoolHooksExtractorMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(AdvancedPoolHooksExtractorBin), + EVM: common.FromHex(gobindings.AdvancedPoolHooksExtractorMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go b/chains/evm/deployment/v2_0_0/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go index cbb3cb4473..bbe2fadafe 100644 --- a/chains/evm/deployment/v2_0_0/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/burn_from_mint_token_pool/burn_from_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_from_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_from_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnFromMintTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnFromMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnFromMintTokenPoolBin = "0x60e080604052346102aa5760a081615ee1803803809161001f82856102fb565b8339810103126102aa5780516001600160a01b03811691908290036102aa5761004a60208201610334565b61005660408301610342565b9061006f608061006860608601610342565b9401610342565b9233156102ea57600180546001600160a01b03191633179055841580156102d9575b80156102c8575b6102b7578460805260c052308403610220575b60a052600380546001600160a01b039283166001600160a01b0319918216179091556002805493909216921691909117905560405163095ea7b360e01b60208083019182523060248401526000196044808501919091528352906000906101136064856102fb565b83519082865af16000513d82610204575b5050156101bf575b604051615b2390816103be823960805181818161023e01528181610491015281816122700152818161244801528181612ab501528181612cb0015281816131a20152818161374f01526137a9015260a05181818161361501528181614928015281816149720152614ebc015260c0518181816102d9015281816113f50152818161230a01528181612b50015261323d0152f35b6101fd916101f860405163095ea7b360e01b602082015230602482015260006044820152604481526101f26064826102fb565b82610356565b610356565b388061012c565b9091506102185750813b15155b3880610124565b600114610211565b60405163313ce56760e01b8152602081600481885afa60009181610276575b5061024b575b506100ab565b60ff1660ff821681810361025f5750610245565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116102af575b81610292602093836102fb565b810103126102aa576102a390610334565b903861023f565b600080fd5b3d9150610285565b630a64406560e11b60005260046000fd5b506001600160a01b03811615610098565b506001600160a01b03841615610091565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761031e57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff821682036102aa57565b51906001600160a01b03821682036102aa57565b906000602091828151910182855af1156103b1576000513d6103a857506001600160a01b0381163b155b6103875750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b60011415610380565b6040513d6000823e3d90fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146139ca5750806306b859ef146138e5578063181f5a77146138845780631826b1e7146137cd57806321df0da71461377c578063240028e8146137185780632422ac451461363957806324f65ee7146135fb5780632cab0fb61461310757806337a3210d146130d35780633907753714612a0a5780634c5ef0ed146129c357806362ddd3c41461293c5780637437ff9f146128ee57806379ba5097146128275780638926f54f146127e15780638da5cb5b146127ad5780639a4575b9146121f7578063a42a7b8b14612090578063acfecf9114611f98578063ae39a25714611e0d578063b6cfa3b714611d52578063b794658014611d1a578063bfeffd3f14611c6e578063c4bffe2b14611b43578063c7230a601461189d578063dc04fa1f14611419578063dc0bd971146113c8578063dcbd41bc146111c4578063e8a1da1714610ae8578063ea6396db146109aa578063ec6ae7a714610967578063f2fde38b146108985763fbc801a71461019757600080fd5b346105db5760606003193601126105db576004359067ffffffffffffffff82116105db578160040160a060031984360301126105e9576101d5613afc565b9060443567ffffffffffffffff811161070f57906101fa610217923690600401613c27565b92906102046145e4565b5061020f8584615120565b933691613da1565b92608486019361022685614571565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361084e57602487019677ffffffffffffffff0000000000000000000000000000000061028c89614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c157889161081f575b506107f75767ffffffffffffffff61032089614592565b16610338816000526007602052604060002054151590565b156107cc57602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156107c1578890610770575b73ffffffffffffffffffffffffffffffffffffffff9150163303610744576064810135936103c78686613f88565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561072257610423907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614a7c565b61043f816104308a614571565b6104398d614592565b90615408565b73ffffffffffffffffffffffffffffffffffffffff6003541693846105ed575b5050505050509061046f91613f88565b9161047984614592565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105e9576040517f79cc6790000000000000000000000000000000000000000000000000000000008152306004820152602481018590529082908290604490829084905af180156105de576105c6575b6105bc8461058b61058688877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61054c61054685614592565b93614571565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a2614592565b614755565b90610594614eb5565b604051926105a184613d0c565b83526020830152604051928392604084526040840190613e69565b9060208301520390f35b6105d1828092613d60565b6105db5780610504565b80fd5b6040513d84823e3d90fd5b5080fd5b843b1561071e578994928b9694928692604051988997889687957fa8027c0f00000000000000000000000000000000000000000000000000000000875260048701608090528061063c91615372565b6084880160a0905261012488019061065392613fb6565b9261065d90613c12565b67ffffffffffffffff1660a487015260440161067890613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660c48601528d8c60e48701526106a390613bc3565b73ffffffffffffffffffffffffffffffffffffffff1661010486015260248501528381036003190160448501526106d991613c55565b90606483015203925af18015610713579085916106fa575b8080808061045f565b8161070491613d60565b61070f5783386106f1565b8380fd5b6040513d87823e3d90fd5b8980fd5b5061073f816107308a614571565b6107398d614592565b906153c2565b61043f565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d6020116107b9575b8161078a60209383613d60565b810103126107b5576107b073ffffffffffffffffffffffffffffffffffffffff91613f95565b610399565b8780fd5b3d915061077d565b6040513d8a823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b610841915060203d602011610847575b6108398183613d60565b810190614be8565b38610309565b503d61082f565b60248673ffffffffffffffffffffffffffffffffffffffff61086f88614571565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346105db5760206003193601126105db5773ffffffffffffffffffffffffffffffffffffffff6108c7613b5a565b6108cf614c00565b1633811461093f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346105db57806003193601126105db5760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346105db5760806003193601126105db576109c4613b5a565b506109cd613be4565b6109d5613b2b565b5060643567ffffffffffffffff8111610ae4579167ffffffffffffffff604092610a0560e0953690600401613c27565b50508260c08551610a1581613d44565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610a4d82613d44565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e957610b1a903690600401613e93565b9060243567ffffffffffffffff811161070f5790610b3d84923690600401613e93565b939091610b48614c00565b83905b8282106110055750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015611001578060051b83013585811215610ffd57830161012081360312610ffd5760405194610baf86613d28565b610bb882613c12565b8652602082013567ffffffffffffffff81116105e95782019436601f870112156105e957853595610be887613ef5565b96610bf66040519889613d60565b80885260208089019160051b83010190368211610ffd5760208301905b828210610fca575050505060208701958652604083013567ffffffffffffffff8111610ae457610c469036908501613e06565b9160408801928352610c70610c5e3660608701614801565b9460608a0195865260c0369101614801565b956080890196875283515115610fa257610c9467ffffffffffffffff8a51166157a5565b15610f6b5767ffffffffffffffff8951168252600860205260408220610cbb865182614ef0565b610cc9885160028301614ef0565b6004855191019080519067ffffffffffffffff8211610f3e57610cec8354614640565b601f8111610f03575b50602090601f8311600114610e6457610d439291869183610e59575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610d7d5790610d77600192610d708367ffffffffffffffff8f5116926145fd565b5190614c4b565b01610d48565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e4b67ffffffffffffffff6001979694985116925193519151610e17610de260405196879687526101006020880152610100870190613c55565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610b7e565b015190508e80610d11565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610eeb5750908460019594939210610eb4575b505050811b019055610d46565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610ea7565b92936020600181928786015181550195019301610e91565b610f2e9084875260208720601f850160051c81019160208610610f34575b601f0160051c019061489d565b8d610cf5565b9091508190610f21565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111610ff957602091610fee8392833691890101613e06565b815201910190610c13565b8680fd5b8480fd5b8380f35b9267ffffffffffffffff6110276110228486889a9699979a6147d4565b614592565b1691611032836154db565b1561119857828452600860205261104e60056040862001615478565b94845b865181101561108757600190858752600860205261108060056040892001611079838b6145fd565b5190615671565b5001611051565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110c38154614640565b80611157575b5050500180549088815581611139575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610b4b565b885260208820908101905b818110156110d957888155600101611144565b601f811160011461116d5750555b888a806110c9565b8183526020832061118891601f01861c81019060010161489d565b8082528160208120915555611165565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346105db5760206003193601126105db5760043567ffffffffffffffff81116105e9576111f6903690600401613ec4565b73ffffffffffffffffffffffffffffffffffffffff600a5416331415806113a6575b61137a57825b818110611229578380f35b611234818385614777565b67ffffffffffffffff61124682614592565b169061125f826000526007602052604060002054151590565b1561134e57907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e08361130e6112e8602060019897018b6112a082614787565b156113155787905260046020526112c760408d206112c13660408801614801565b90614ef0565b868c5260056020526112e360408d206112c13660a08801614801565b614787565b9160405192151583526113016020840160408301614859565b60a0608084019101614859565ba20161121e565b60026040828a6112e3945260086020526113378282206112c136858c01614801565b8a8152600860205220016112c13660a08801614801565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611218565b50346105db57806003193601126105db57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e95761144b903690600401613ec4565b60243567ffffffffffffffff811161070f5761146b903690600401613e93565b919092611476614c00565b845b8281106114e257505050825b81811061148f578380f35b8067ffffffffffffffff6114a961102260019486886147d4565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a201611484565b67ffffffffffffffff6114f9611022838686614777565b16611511816000526007602052604060002054151590565b1561187257611521828585614777565b602081019060e081019061153482614787565b156118465760a0810161271061ffff61154c83614794565b1610156118375760c082019161271061ffff61156785614794565b1610156117ff5763ffffffff61157c866147a3565b16156117d357858c52600b60205260408c20611597866147a3565b63ffffffff169080549060408401916115af836147a3565b60201b67ffffffff00000000169360608601946115cb866147a3565b60401b6bffffffff00000000000000001696608001966115ea886147a3565b60601b6fffffffff00000000000000000000000016916116098a614794565b60801b71ffff00000000000000000000000000000000169361162a8c614794565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556116dd87614787565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661172e906147b4565b63ffffffff16875261173f906147b4565b63ffffffff166020870152611753906147b4565b63ffffffff166040860152611767906147b4565b63ffffffff16606085015261177b906147c5565b61ffff16608084015261178d906147c5565b61ffff1660a083015261179f90613cb4565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a2600101611478565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61180e86614794565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61180e602493614794565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e9576118cf903690600401613e93565b906118d8613ba0565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611b21575b611af55773ffffffffffffffffffffffffffffffffffffffff8316908115611acd57845b81811061192a578580f35b73ffffffffffffffffffffffffffffffffffffffff61195261194d8385886147d4565b614571565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa9081156107c1578891611a9a575b50806119a7575b505060010161191f565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a9190611a08606482613d60565b519082865af115611a8f5787513d611a865750813b155b611a5a5790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a3903861199d565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611a1f565b6040513d89823e3d90fd5b905060203d8111611ac6575b611ab08183613d60565b602082600092810103126105db57505138611996565b503d611aa6565b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c54163314156118fb565b50346105db57806003193601126105db57604051906006548083528260208101600684526020842092845b818110611c55575050611b8392500383613d60565b8151611ba7611b9182613ef5565b91611b9f6040519384613d60565b808352613ef5565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611c06578067ffffffffffffffff611bf3600193886145fd565b5116611bff82866145fd565b5201611bd4565b50925090604051928392602084019060208552518091526040840192915b818110611c32575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611c24565b8454835260019485019487945060209093019201611b6e565b50346105db5760206003193601126105db5760043573ffffffffffffffffffffffffffffffffffffffff81168091036105e957611ca9614c00565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b50346105db5760206003193601126105db57611d4e611d3a610586613bfb565b604051918291602083526020830190613c55565b0390f35b50346105db5760206003193601126105db577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611d8f613ac8565b611d97614c00565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346105db5760606003193601126105db57611e27613b5a565b90611e30613ba0565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361070f57611e5a614c00565b73ffffffffffffffffffffffffffffffffffffffff82168015611f705794611f6a917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346105db5767ffffffffffffffff611fb036613e24565b929091611fbb614c00565b1691611fd4836000526007602052604060002054151590565b1561119857828452600860205261200360056040862001611ff6368486613da1565b6020815191012090615671565b1561204857907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691612042604051928392602084526020840191613fb6565b0390a280f35b8261208c836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613fb6565b0390fd5b50346105db5760206003193601126105db5767ffffffffffffffff6120b3613bfb565b16815260086020526120ca60056040832001615478565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061210f6120f983613ef5565b926121076040519485613d60565b808452613ef5565b01835b8181106121e6575050825b82518110156121635780612133600192856145fd565b518552600960205261214760408620614693565b61215182856145fd565b5261215c81846145fd565b500161211d565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061219b57505050500390f35b919360206121d6827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613c55565b960192019201859493919261218c565b806060602080938601015201612112565b50346105db5760206003193601126105db5760043567ffffffffffffffff81116105e957806004019060a06003198236030112610ae4576122366145e4565b506040516020936122478583613d60565b808252608483019161225883614571565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361278c57602484019477ffffffffffffffff000000000000000000000000000000006122be87614592565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561271157849161276f575b506127475767ffffffffffffffff61235187614592565b16612369816000526007602052604060002054151590565b1561271c578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156127115784906126c9575b73ffffffffffffffffffffffffffffffffffffffff915016330361269d57606485013594612403866123fa87614571565b6107398a614592565b73ffffffffffffffffffffffffffffffffffffffff600354169182612580575b5050505061243084614592565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105e9576040517f79cc6790000000000000000000000000000000000000000000000000000000008152306004820152602481018590529082908290604490829084905af180156105de5761256b575b8561253b61058687877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8961057e6125046124fe87614592565b92614571565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b90612544614eb5565b6040519261255184613d0c565b835281830152611d4e604051928284938452830190613e69565b612576828092613d60565b6105db57806124bb565b823b15610ffd57918791858094604051968795869485937fa8027c0f0000000000000000000000000000000000000000000000000000000085526004850160809052806125cc91615372565b6084860160a090526101248601906125e392613fb6565b916125ed90613c12565b67ffffffffffffffff1660a485015260440161260890613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e48401526126328b613bc3565b73ffffffffffffffffffffffffffffffffffffffff1661010484015283602484015282810360031901604484015261266991613c55565b8a606483015203925af180156105de57908291612688575b8080612423565b8161269291613d60565b6105db578038612681565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d831161270a575b6126df8183613d60565b8101031261070f5761270573ffffffffffffffffffffffffffffffffffffffff91613f95565b6123c9565b503d6126d5565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6127869150883d8a11610847576108398183613d60565b3861233a565b5073ffffffffffffffffffffffffffffffffffffffff61086f602493614571565b50346105db57806003193601126105db57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346105db5760206003193601126105db57602061281d67ffffffffffffffff612809613bfb565b166000526007602052604060002054151590565b6040519015158152f35b50346105db57806003193601126105db57805473ffffffffffffffffffffffffffffffffffffffff811633036128c6577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346105db57806003193601126105db57600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346105db5761294b36613e24565b61295793929193614c00565b67ffffffffffffffff8216612979816000526007602052604060002054151590565b156129985750612995929361298f913691613da1565b90614c4b565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346105db5760406003193601126105db576129dd613bfb565b906024359067ffffffffffffffff82116105db57602061281d84612a043660048701613e06565b906145a7565b50346105db5760206003193601126105db576004359067ffffffffffffffff82116105db57816004019061010060031984360301126105db5780604051612a5081613cc1565b5280604051612a5e81613cc1565b52606483013560c4840193612a8e612a88612a83612a7c8888614520565b3691613da1565b6148b4565b8361496f565b936084820195612a9d87614571565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036130b257602483019377ffffffffffffffff00000000000000000000000000000000612b0386614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a8f578791613093575b5061306b5767ffffffffffffffff612b9786614592565b16612baf816000526007602052604060002054151590565b1561304057602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611a8f578791613021575b5015612ff557612c2685614592565b92612c3c60a4860194612a04612a7c8785614520565b15612fae57612c5d88612c4e8b614571565b612c5789614592565b90615289565b73ffffffffffffffffffffffffffffffffffffffff600354169283612de0575b505050505060440191612c8f83614571565b612c9883614592565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b15610ae4576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481018690529082908290604490829084905af180156105de57612dcb575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612d97612d916105467ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc097614592565b96614571565b816040519716875233898801521660408601528560608601521692a260405190612dc082613cc1565b815260405190518152f35b612dd6828092613d60565b6105db5780612d3c565b833b156107b557878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612e308780615372565b60648a0161010090526101648a0190612e4892613fb6565b94612e5290613c12565b67ffffffffffffffff166084890152604401612e6d90613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c4870152612e9690613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660e4860152612ebb9084615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612ef09291613fb6565b90612efb9083615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612f309291613fb6565b9060e48a01612f3e91615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612f739291613fb6565b8b602483015282604483015203925af1801561271157908491612f99575b808080612c7d565b81612fa391613d60565b610ae4578238612f91565b83612fb891614520565b61208c6040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613fb6565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b61303a915060203d602011610847576108398183613d60565b38612c17565b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6130ac915060203d602011610847576108398183613d60565b38612b80565b60248573ffffffffffffffffffffffffffffffffffffffff61086f8a614571565b50346105db57806003193601126105db57602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346105db5760406003193601126105db576004359067ffffffffffffffff82116105db57816004019061010060031984360301126105db57613148613afc565b918160405161315681613cc1565b5260648401359360c481019361317b613175612a83612a7c8887614520565b8761496f565b94608483019661318a88614571565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036135da57602484019477ffffffffffffffff000000000000000000000000000000006131f087614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c15788916135bb575b506107f75767ffffffffffffffff61328487614592565b1661329c816000526007602052604060002054151590565b156107cc57602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156107c157889161359c575b50156107445761331386614592565b9361332960a4870195612a04612a7c8886614520565b15613592577fffffffff000000000000000000000000000000000000000000000000000000001690811561357757613373896133648c614571565b61336d8a614592565b90615302565b73ffffffffffffffffffffffffffffffffffffffff6003541693846133a6575b50505050505060440191612c8f83614571565b843b1561357357868995938c959387938b6040519a8b998a9889977f6371157400000000000000000000000000000000000000000000000000000000895260048901606090526133f68780615372565b60648b0161010090526101648b019061340e92613fb6565b9461341890613c12565b67ffffffffffffffff1660848a015260440161343390613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660a489015260c488015261345c90613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660e48701526134819084615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526134b69291613fb6565b906134c19083615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101248701526134f69291613fb6565b9060e48b0161350491615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c858403016101448601526135399291613fb6565b908c6024840152604483015203925af180156127115761355e575b8080808080613393565b9261356c8160449395613d60565b9290613554565b8880fd5b61358d896135848c614571565b612c578a614592565b613373565b612fb88583614520565b6135b5915060203d602011610847576108398183613d60565b38613304565b6135d4915060203d602011610847576108398183613d60565b3861326d565b60248673ffffffffffffffffffffffffffffffffffffffff61086f8b614571565b50346105db57806003193601126105db57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760406003193601126105db57613653613bfb565b6024359182151583036105db57610140613716613670858561449d565b6136c660409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346105db5760206003193601126105db57602090613735613b5a565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346105db57806003193601126105db57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760c06003193601126105db576137e7613b5a565b506137f0613be4565b6137f8613b7d565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036105db5760a4359067ffffffffffffffff82116105db5760a063ffffffff8061ffff61385d88886138563660048b01613c27565b50506142ed565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346105db57806003193601126105db5750611d4e6040516138a7604082613d60565b601b81527f4275726e46726f6d4d696e74546f6b656e506f6f6c20322e302e3000000000006020820152604051918291602083526020830190613c55565b50346105db5760c06003193601126105db576138ff613b5a565b613907613be4565b906064357fffffffff000000000000000000000000000000000000000000000000000000008116810361070f5760843567ffffffffffffffff8111610ffd57613954903690600401613c27565b9160a435936002851015610ff95761396f9560443591613ff5565b90604051918291602083016020845282518091526020604085019301915b81811061399b575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161398d565b9050346105e95760206003193601126105e9576020907fffffffff00000000000000000000000000000000000000000000000000000000613a09613ac8565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613a9e575b8115613a74575b8115613a4a575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613a43565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613a3c565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613a35565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6024359067ffffffffffffffff82168203613af757565b6004359067ffffffffffffffff82168203613af757565b359067ffffffffffffffff82168203613af757565b9181601f84011215613af75782359167ffffffffffffffff8311613af75760208381860195010111613af757565b919082519283825260005b848110613c9f5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613c60565b35908115158203613af757565b6020810190811067ffffffffffffffff821117613cdd57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613cdd57604052565b60a0810190811067ffffffffffffffff821117613cdd57604052565b60e0810190811067ffffffffffffffff821117613cdd57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613cdd57604052565b92919267ffffffffffffffff8211613cdd5760405191613de9601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613d60565b829481845281830111613af7578281602093846000960137010152565b9080601f83011215613af757816020613e2193359101613da1565b90565b906040600319830112613af75760043567ffffffffffffffff81168103613af757916024359067ffffffffffffffff8211613af757613e6591600401613c27565b9091565b613e21916020613e828351604084526040840190613c55565b920151906020818403910152613c55565b9181601f84011215613af75782359167ffffffffffffffff8311613af7576020808501948460051b010111613af757565b9181601f84011215613af75782359167ffffffffffffffff8311613af7576020808501948460081b010111613af757565b67ffffffffffffffff8111613cdd5760051b60200190565b81810292918115918404141715613f2057565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613f59570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613f2057565b519073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff600354169586156142cb578097600287101561429c5773ffffffffffffffffffffffffffffffffffffffff98614156957fffffffff0000000000000000000000000000000000000000000000000000000093896142725767ffffffffffffffff8216600052600b6020526040600020906040519161408d83613d44565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c161515918291015261421e575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613fb6565b928180600095869560a483015203915afa91821561421157819261417957505090565b9091503d8083833e61418b8183613d60565b810190602081830312610ae45780519067ffffffffffffffff821161070f570181601f82011215610ae4578051906141c282613ef5565b936141d06040519586613d60565b82855260208086019360051b8301019384116105db5750602001905b8282106141f95750505090565b6020809161420684613f95565b8152019101906141ec565b50604051903d90823e3d90fd5b92935067ffffffffffffffff928587161561425a575061271061424961ffff61425094511683613f0d565b0490613f88565b915b9038806140f7565b61426c92506142496127109183613f0d565b91614252565b67ffffffffffffffff91925061429690614290612a8336898b613da1565b9061496f565b91614105565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516142e1602082613d60565b60008152600036813790565b67ffffffffffffffff9092919261432b7fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614a7c565b16600052600b60205260406000206040519061434682613d44565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526143f3577fffffffff00000000000000000000000000000000000000000000000000000000166143e857505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b6040519061441982613d28565b60006080838281528260208201528260408201528260608201520152565b9060405161444481613d28565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff916144af61440c565b506144b861440c565b506144ec57166000526008602052604060002090613e216144e060026144e56144e086614437565b614b63565b9401614437565b16908160005260046020526145076144e06040600020614437565b916000526005602052613e216144e06040600020614437565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613af7570180359067ffffffffffffffff8211613af757602001918136038313613af757565b3573ffffffffffffffffffffffffffffffffffffffff81168103613af75790565b3567ffffffffffffffff81168103613af75790565b9067ffffffffffffffff613e2192166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b604051906145f182613d0c565b60606020838281520152565b80518210156146115760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c92168015614689575b602083101461465a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161464f565b90604051918260008254926146a784614640565b808452936001811690811561471557506001146146ce575b506146cc92500383613d60565b565b90506000929192526020600020906000915b8183106146f95750509060206146cc92820101386146bf565b60209193508060019154838589010152019101909184926146e0565b602093506146cc9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386146bf565b67ffffffffffffffff166000526008602052613e216004604060002001614693565b91908110156146115760081b0190565b358015158103613af75790565b3561ffff81168103613af75790565b3563ffffffff81168103613af75790565b359063ffffffff82168203613af757565b359061ffff82168203613af757565b91908110156146115760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613af757565b9190826060910312613af7576040516060810181811067ffffffffffffffff821117613cdd57604052604061485481839561483b81613cb4565b8552614849602082016147e4565b6020860152016147e4565b910152565b6fffffffffffffffffffffffffffffffff6148976040809361487a81613cb4565b151586528361488b602083016147e4565b166020870152016147e4565b16910152565b8181106148a8575050565b6000815560010161489d565b80518015614924576020036148e6578051602082810191830183900312613af757519060ff82116148e6575060ff1690565b61208c906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613c55565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613f2057565b60ff16604d8111613f2057600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614a7557828411614a4b57906149b49161494a565b91604d60ff8416118015614a12575b6149dc575050906149d6613e219261495e565b90613f0d565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614a1c8361495e565b8015613f59577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0484116149c3565b614a549161494a565b91604d60ff8416116149dc57505090614a6f613e219261495e565b90613f4f565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614b5e57614aaf816151ae565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614b5e5761ffff8360e01c168015918215614b4d575b5050614af9575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614aef565b505050565b614b6b61440c565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614bc86020850193614bc2614bb563ffffffff87511642613f88565b8560808901511690613f0d565b906151a1565b80821015614be157505b16825263ffffffff4216905290565b9050614bd2565b90816020910312613af757518015158103613af75790565b73ffffffffffffffffffffffffffffffffffffffff600154163303614c2157565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614e8b5767ffffffffffffffff81516020830120921691826000526008602052614c80816005604060002001615805565b15614e475760005260096020526040600020815167ffffffffffffffff8111613cdd57614cad8254614640565b601f8111614e15575b506020601f8211600114614d4f5791614d29827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614d3f95600091614d44575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613c55565b0390a2565b905084015138614cf8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614dfd575092614d3f9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614dc6575b5050811b019055611d3a565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614dba565b9192602060018192868a015181550194019201614d7f565b614e4190836000526020600020601f840160051c81019160208510610f3457601f0160051c019061489d565b38614cb6565b509061208c6040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613c55565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613e21604082613d60565b815191929115615072576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff6020850151161061500f576146cc91925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615070604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408401511615801590615101575b6150a0576146cc9192614f33565b606483615070604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615092565b906127109167ffffffffffffffff61513a60208301614592565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561518b57606061ffff615187935460901c16910135613f0d565b0490565b606061ffff615187935460801c16910135613f0d565b91908201809211613f2057565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115615285577dffff0000000000000000000000000000000000000000000000000000000081161561527c5760ff60015b169060f01c80615246575b506001036152195750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b60108110615257575061520e565b6001811b821661526a575b600101615249565b9160018101809111613f205791615262565b60ff6000615203565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9216928360005260086020526152d28183600260406000200161585a565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614d3f565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156153675750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f9918360005260056020526152d28183604060002061585a565b906146cc9350615289565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613af757016020813591019167ffffffffffffffff8211613af7578136038313613af757565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449216928360005260086020526152d28183604060002061585a565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c161561546d5750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e918360005260046020526152d28183604060002061585a565b906146cc93506153c2565b906040519182815491828252602082019060005260206000209260005b8181106154aa5750506146cc92500383613d60565b8454835260019485019487945060209093019201615495565b80548210156146115760005260206000200190600090565b600081815260076020526040902054801561566a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f2057600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f20578181036155fb575b50505060065480156155cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016155898160066154c3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61565261560c61561d9360066154c3565b90549060031b1c92839260066154c3565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526007602052604060002055388080615550565b5050600090565b906001820191816000528260205260406000205480151560001461579c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f20578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f2057818103615765575b505050805480156155cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061572682826154c3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61578561577561561d93866154c3565b90549060031b1c928392866154c3565b9055600052836020526040600020553880806156ee565b50505050600090565b806000526007602052604060002054156000146157ff5760065468010000000000000000811015613cdd576157e661561d82600185940160065560066154c3565b9055600654906000526007602052604060002055600190565b50600090565b600082815260018201602052604090205461566a5780549068010000000000000000821015613cdd578261584361561d8460018096018555846154c3565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615b0e575b615b08576fffffffffffffffffffffffffffffffff821691600185019081546158b263ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613f88565b9081615a6a575b5050848110615a1e57508383106159135750506158e86fffffffffffffffffffffffffffffffff928392613f88565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c9283156159b2578161592b91613f88565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613f205761597961597e9273ffffffffffffffffffffffffffffffffffffffff966151a1565b613f4f565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615ade57615a8592614bc29160801c90613f0d565b80841015615ad95750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806158b9565b615a90565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561586d56fea164736f6c634300081a000a" - -type BurnFromMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnFromMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnFromMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnFromMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnFromMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnFromMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnFromMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-from-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnFromMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnFromMintTokenPoolABI, - Bin: BurnFromMintTokenPoolBin, - }, + Name: "burn-from-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnFromMintTokenPool contract", + ContractMetadata: gobindings.BurnFromMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnFromMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnFromMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/burn_mint_token_pool/burn_mint_token_pool.go b/chains/evm/deployment/v2_0_0/operations/burn_mint_token_pool/burn_mint_token_pool.go index b9ace70b51..ec71f23ad8 100644 --- a/chains/evm/deployment/v2_0_0/operations/burn_mint_token_pool/burn_mint_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/burn_mint_token_pool/burn_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnMintTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnMintTokenPoolBin = "0x60e080604052346101f65760a081615db2803803809161001f8285610247565b8339810103126101f65780516001600160a01b038116908190036101f65761004960208301610280565b6100556040840161028e565b9161006e60806100676060870161028e565b950161028e565b93331561023657600180546001600160a01b0319163317905581158015610225575b8015610214575b610203578160805260c052308103610170575b5060a052600380546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055604051615b0f90816102a3823960805181818161023e01528181610491015281816122660152818161243e01528181612aa101528181612c9c0152818161318e0152818161373b0152613795015260a051818181613601015281816149140152818161495e0152614ea8015260c0518181816102d9015281816113eb0152818161230001528181612b3c01526132290152f35b60206004916040519283809263313ce56760e01b82525afa600091816101c2575b50156100aa5760ff1660ff82168181036101ab57506100aa565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116101fb575b816101de60209383610247565b810103126101f6576101ef90610280565b9038610191565b600080fd5b3d91506101d1565b630a64406560e11b60005260046000fd5b506001600160a01b03811615610097565b506001600160a01b03851615610090565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761026a57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff821682036101f657565b51906001600160a01b03821682036101f65756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146139b65750806306b859ef146138d1578063181f5a77146138705780631826b1e7146137b957806321df0da714613768578063240028e8146137045780632422ac451461362557806324f65ee7146135e75780632cab0fb6146130f357806337a3210d146130bf57806339077537146129f65780634c5ef0ed146129af57806362ddd3c4146129285780637437ff9f146128da57806379ba5097146128135780638926f54f146127cd5780638da5cb5b146127995780639a4575b9146121ed578063a42a7b8b14612086578063acfecf9114611f8e578063ae39a25714611e03578063b6cfa3b714611d48578063b794658014611d10578063bfeffd3f14611c64578063c4bffe2b14611b39578063c7230a6014611893578063dc04fa1f1461140f578063dc0bd971146113be578063dcbd41bc146111ba578063e8a1da1714610ade578063ea6396db146109a0578063ec6ae7a71461095d578063f2fde38b1461088e5763fbc801a71461019757600080fd5b346105d15760606003193601126105d1576004359067ffffffffffffffff82116105d1578160040160a060031984360301126105df576101d5613ae8565b9060443567ffffffffffffffff811161070557906101fa610217923690600401613c13565b92906102046145d0565b5061020f858461510c565b933691613d8d565b9260848601936102268561455d565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361084457602487019677ffffffffffffffff0000000000000000000000000000000061028c8961457e565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107b7578891610815575b506107ed5767ffffffffffffffff6103208961457e565b16610338816000526007602052604060002054151590565b156107c257602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156107b7578890610766575b73ffffffffffffffffffffffffffffffffffffffff915016330361073a576064810135936103c78686613f74565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561071857610423907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614a68565b61043f816104308a61455d565b6104398d61457e565b906153f4565b73ffffffffffffffffffffffffffffffffffffffff6003541693846105e3575b5050505050509061046f91613f74565b916104798461457e565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105df578180916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528960048401525af180156105d4576105bc575b6105b28461058161057c88877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61054261053c8561457e565b9361455d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a261457e565b614741565b9061058a614ea1565b6040519261059784613cf8565b83526020830152604051928392604084526040840190613e55565b9060208301520390f35b6105c7828092613d4c565b6105d157806104fa565b80fd5b6040513d84823e3d90fd5b5080fd5b843b15610714578994928b9694928692604051988997889687957fa8027c0f0000000000000000000000000000000000000000000000000000000087526004870160809052806106329161535e565b6084880160a0905261012488019061064992613fa2565b9261065390613bfe565b67ffffffffffffffff1660a487015260440161066e90613baf565b73ffffffffffffffffffffffffffffffffffffffff1660c48601528d8c60e487015261069990613baf565b73ffffffffffffffffffffffffffffffffffffffff1661010486015260248501528381036003190160448501526106cf91613c41565b90606483015203925af18015610709579085916106f0575b8080808061045f565b816106fa91613d4c565b6107055783386106e7565b8380fd5b6040513d87823e3d90fd5b8980fd5b50610735816107268a61455d565b61072f8d61457e565b906153ae565b61043f565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d6020116107af575b8161078060209383613d4c565b810103126107ab576107a673ffffffffffffffffffffffffffffffffffffffff91613f81565b610399565b8780fd5b3d9150610773565b6040513d8a823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b610837915060203d60201161083d575b61082f8183613d4c565b810190614bd4565b38610309565b503d610825565b60248673ffffffffffffffffffffffffffffffffffffffff6108658861455d565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346105d15760206003193601126105d15773ffffffffffffffffffffffffffffffffffffffff6108bd613b46565b6108c5614bec565b1633811461093557807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346105d157806003193601126105d15760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346105d15760806003193601126105d1576109ba613b46565b506109c3613bd0565b6109cb613b17565b5060643567ffffffffffffffff8111610ada579167ffffffffffffffff6040926109fb60e0953690600401613c13565b50508260c08551610a0b81613d30565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610a4382613d30565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346105d15760406003193601126105d15760043567ffffffffffffffff81116105df57610b10903690600401613e7f565b9060243567ffffffffffffffff81116107055790610b3384923690600401613e7f565b939091610b3e614bec565b83905b828210610ffb5750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015610ff7578060051b83013585811215610ff357830161012081360312610ff35760405194610ba586613d14565b610bae82613bfe565b8652602082013567ffffffffffffffff81116105df5782019436601f870112156105df57853595610bde87613ee1565b96610bec6040519889613d4c565b80885260208089019160051b83010190368211610ff35760208301905b828210610fc0575050505060208701958652604083013567ffffffffffffffff8111610ada57610c3c9036908501613df2565b9160408801928352610c66610c5436606087016147ed565b9460608a0195865260c03691016147ed565b956080890196875283515115610f9857610c8a67ffffffffffffffff8a5116615791565b15610f615767ffffffffffffffff8951168252600860205260408220610cb1865182614edc565b610cbf885160028301614edc565b6004855191019080519067ffffffffffffffff8211610f3457610ce2835461462c565b601f8111610ef9575b50602090601f8311600114610e5a57610d399291869183610e4f575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610d735790610d6d600192610d668367ffffffffffffffff8f5116926145e9565b5190614c37565b01610d3e565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e4167ffffffffffffffff6001979694985116925193519151610e0d610dd860405196879687526101006020880152610100870190613c41565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610b74565b015190508e80610d07565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610ee15750908460019594939210610eaa575b505050811b019055610d3c565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610e9d565b92936020600181928786015181550195019301610e87565b610f249084875260208720601f850160051c81019160208610610f2a575b601f0160051c0190614889565b8d610ceb565b9091508190610f17565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111610fef57602091610fe48392833691890101613df2565b815201910190610c09565b8680fd5b8480fd5b8380f35b9267ffffffffffffffff61101d6110188486889a9699979a6147c0565b61457e565b1691611028836154c7565b1561118e57828452600860205261104460056040862001615464565b94845b865181101561107d5760019085875260086020526110766005604089200161106f838b6145e9565b519061565d565b5001611047565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110b9815461462c565b8061114d575b505050018054908881558161112f575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610b41565b885260208820908101905b818110156110cf5788815560010161113a565b601f81116001146111635750555b888a806110bf565b8183526020832061117e91601f01861c810190600101614889565b808252816020812091555561115b565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346105d15760206003193601126105d15760043567ffffffffffffffff81116105df576111ec903690600401613eb0565b73ffffffffffffffffffffffffffffffffffffffff600a54163314158061139c575b61137057825b81811061121f578380f35b61122a818385614763565b67ffffffffffffffff61123c8261457e565b1690611255826000526007602052604060002054151590565b1561134457907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e0836113046112de602060019897018b61129682614773565b1561130b5787905260046020526112bd60408d206112b736604088016147ed565b90614edc565b868c5260056020526112d960408d206112b73660a088016147ed565b614773565b9160405192151583526112f76020840160408301614845565b60a0608084019101614845565ba201611214565b60026040828a6112d99452600860205261132d8282206112b736858c016147ed565b8a8152600860205220016112b73660a088016147ed565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff6001541633141561120e565b50346105d157806003193601126105d157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105d15760406003193601126105d15760043567ffffffffffffffff81116105df57611441903690600401613eb0565b60243567ffffffffffffffff811161070557611461903690600401613e7f565b91909261146c614bec565b845b8281106114d857505050825b818110611485578380f35b8067ffffffffffffffff61149f61101860019486886147c0565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a20161147a565b67ffffffffffffffff6114ef611018838686614763565b16611507816000526007602052604060002054151590565b1561186857611517828585614763565b602081019060e081019061152a82614773565b1561183c5760a0810161271061ffff61154283614780565b16101561182d5760c082019161271061ffff61155d85614780565b1610156117f55763ffffffff6115728661478f565b16156117c957858c52600b60205260408c2061158d8661478f565b63ffffffff169080549060408401916115a58361478f565b60201b67ffffffff00000000169360608601946115c18661478f565b60401b6bffffffff00000000000000001696608001966115e08861478f565b60601b6fffffffff00000000000000000000000016916115ff8a614780565b60801b71ffff0000000000000000000000000000000016936116208c614780565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556116d387614773565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff00000000000000000000000000000000000000001617905560405196611724906147a0565b63ffffffff168752611735906147a0565b63ffffffff166020870152611749906147a0565b63ffffffff16604086015261175d906147a0565b63ffffffff166060850152611771906147b1565b61ffff166080840152611783906147b1565b61ffff1660a083015261179590613ca0565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a260010161146e565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61180486614780565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff611804602493614780565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346105d15760406003193601126105d15760043567ffffffffffffffff81116105df576118c5903690600401613e7f565b906118ce613b8c565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611b17575b611aeb5773ffffffffffffffffffffffffffffffffffffffff8316908115611ac357845b818110611920578580f35b73ffffffffffffffffffffffffffffffffffffffff6119486119438385886147c0565b61455d565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa9081156107b7578891611a90575b508061199d575b5050600101611915565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a91906119fe606482613d4c565b519082865af115611a855787513d611a7c5750813b155b611a505790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a39038611993565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611a15565b6040513d89823e3d90fd5b905060203d8111611abc575b611aa68183613d4c565b602082600092810103126105d15750513861198c565b503d611a9c565b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c54163314156118f1565b50346105d157806003193601126105d157604051906006548083528260208101600684526020842092845b818110611c4b575050611b7992500383613d4c565b8151611b9d611b8782613ee1565b91611b956040519384613d4c565b808352613ee1565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611bfc578067ffffffffffffffff611be9600193886145e9565b5116611bf582866145e9565b5201611bca565b50925090604051928392602084019060208552518091526040840192915b818110611c28575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611c1a565b8454835260019485019487945060209093019201611b64565b50346105d15760206003193601126105d15760043573ffffffffffffffffffffffffffffffffffffffff81168091036105df57611c9f614bec565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b50346105d15760206003193601126105d157611d44611d3061057c613be7565b604051918291602083526020830190613c41565b0390f35b50346105d15760206003193601126105d1577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611d85613ab4565b611d8d614bec565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346105d15760606003193601126105d157611e1d613b46565b90611e26613b8c565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361070557611e50614bec565b73ffffffffffffffffffffffffffffffffffffffff82168015611f665794611f60917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346105d15767ffffffffffffffff611fa636613e10565b929091611fb1614bec565b1691611fca836000526007602052604060002054151590565b1561118e578284526008602052611ff960056040862001611fec368486613d8d565b602081519101209061565d565b1561203e57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691612038604051928392602084526020840191613fa2565b0390a280f35b82612082836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613fa2565b0390fd5b50346105d15760206003193601126105d15767ffffffffffffffff6120a9613be7565b16815260086020526120c060056040832001615464565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06121056120ef83613ee1565b926120fd6040519485613d4c565b808452613ee1565b01835b8181106121dc575050825b82518110156121595780612129600192856145e9565b518552600960205261213d6040862061467f565b61214782856145e9565b5261215281846145e9565b5001612113565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061219157505050500390f35b919360206121cc827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613c41565b9601920192018594939192612182565b806060602080938601015201612108565b50346105d15760206003193601126105d15760043567ffffffffffffffff81116105df57806004019060a06003198236030112610ada5761222c6145d0565b5060405160209361223d8583613d4c565b808252608483019161224e8361455d565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361277857602484019477ffffffffffffffff000000000000000000000000000000006122b48761457e565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156126fd57849161275b575b506127335767ffffffffffffffff6123478761457e565b1661235f816000526007602052604060002054151590565b15612708578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156126fd5784906126b5575b73ffffffffffffffffffffffffffffffffffffffff9150163303612689576064850135946123f9866123f08761455d565b61072f8a61457e565b73ffffffffffffffffffffffffffffffffffffffff60035416918261256c575b505050506124268461457e565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105df578180916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528960048401525af180156105d457612557575b8561252761057c87877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff896105746124f06124ea8761457e565b9261455d565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b90612530614ea1565b6040519261253d84613cf8565b835281830152611d44604051928284938452830190613e55565b612562828092613d4c565b6105d157806124a7565b823b15610ff357918791858094604051968795869485937fa8027c0f0000000000000000000000000000000000000000000000000000000085526004850160809052806125b89161535e565b6084860160a090526101248601906125cf92613fa2565b916125d990613bfe565b67ffffffffffffffff1660a48501526044016125f490613baf565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e484015261261e8b613baf565b73ffffffffffffffffffffffffffffffffffffffff1661010484015283602484015282810360031901604484015261265591613c41565b8a606483015203925af180156105d457908291612674575b8080612419565b8161267e91613d4c565b6105d157803861266d565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d83116126f6575b6126cb8183613d4c565b81010312610705576126f173ffffffffffffffffffffffffffffffffffffffff91613f81565b6123bf565b503d6126c1565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6127729150883d8a1161083d5761082f8183613d4c565b38612330565b5073ffffffffffffffffffffffffffffffffffffffff61086560249361455d565b50346105d157806003193601126105d157602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346105d15760206003193601126105d157602061280967ffffffffffffffff6127f5613be7565b166000526007602052604060002054151590565b6040519015158152f35b50346105d157806003193601126105d157805473ffffffffffffffffffffffffffffffffffffffff811633036128b2577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346105d157806003193601126105d157600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346105d15761293736613e10565b61294393929193614bec565b67ffffffffffffffff8216612965816000526007602052604060002054151590565b156129845750612981929361297b913691613d8d565b90614c37565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346105d15760406003193601126105d1576129c9613be7565b906024359067ffffffffffffffff82116105d1576020612809846129f03660048701613df2565b90614593565b50346105d15760206003193601126105d1576004359067ffffffffffffffff82116105d157816004019061010060031984360301126105d15780604051612a3c81613cad565b5280604051612a4a81613cad565b52606483013560c4840193612a7a612a74612a6f612a68888861450c565b3691613d8d565b6148a0565b8361495b565b936084820195612a898761455d565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361309e57602483019377ffffffffffffffff00000000000000000000000000000000612aef8661457e565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a8557879161307f575b506130575767ffffffffffffffff612b838661457e565b16612b9b816000526007602052604060002054151590565b1561302c57602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611a8557879161300d575b5015612fe157612c128561457e565b92612c2860a48601946129f0612a68878561450c565b15612f9a57612c4988612c3a8b61455d565b612c438961457e565b90615275565b73ffffffffffffffffffffffffffffffffffffffff600354169283612dcc575b505050505060440191612c7b8361455d565b612c848361457e565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b15610ada576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481018690529082908290604490829084905af180156105d457612db7575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612d83612d7d61053c7ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09761457e565b9661455d565b816040519716875233898801521660408601528560608601521692a260405190612dac82613cad565b815260405190518152f35b612dc2828092613d4c565b6105d15780612d28565b833b156107ab57878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612e1c878061535e565b60648a0161010090526101648a0190612e3492613fa2565b94612e3e90613bfe565b67ffffffffffffffff166084890152604401612e5990613baf565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c4870152612e8290613baf565b73ffffffffffffffffffffffffffffffffffffffff1660e4860152612ea7908461535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612edc9291613fa2565b90612ee7908361535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612f1c9291613fa2565b9060e48a01612f2a9161535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612f5f9291613fa2565b8b602483015282604483015203925af180156126fd57908491612f85575b808080612c69565b81612f8f91613d4c565b610ada578238612f7d565b83612fa49161450c565b6120826040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613fa2565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b613026915060203d60201161083d5761082f8183613d4c565b38612c03565b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b613098915060203d60201161083d5761082f8183613d4c565b38612b6c565b60248573ffffffffffffffffffffffffffffffffffffffff6108658a61455d565b50346105d157806003193601126105d157602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346105d15760406003193601126105d1576004359067ffffffffffffffff82116105d157816004019061010060031984360301126105d157613134613ae8565b918160405161314281613cad565b5260648401359360c4810193613167613161612a6f612a68888761450c565b8761495b565b9460848301966131768861455d565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036135c657602484019477ffffffffffffffff000000000000000000000000000000006131dc8761457e565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107b75788916135a7575b506107ed5767ffffffffffffffff6132708761457e565b16613288816000526007602052604060002054151590565b156107c257602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156107b7578891613588575b501561073a576132ff8661457e565b9361331560a48701956129f0612a68888661450c565b1561357e577fffffffff00000000000000000000000000000000000000000000000000000000169081156135635761335f896133508c61455d565b6133598a61457e565b906152ee565b73ffffffffffffffffffffffffffffffffffffffff600354169384613392575b50505050505060440191612c7b8361455d565b843b1561355f57868995938c959387938b6040519a8b998a9889977f6371157400000000000000000000000000000000000000000000000000000000895260048901606090526133e2878061535e565b60648b0161010090526101648b01906133fa92613fa2565b9461340490613bfe565b67ffffffffffffffff1660848a015260440161341f90613baf565b73ffffffffffffffffffffffffffffffffffffffff1660a489015260c488015261344890613baf565b73ffffffffffffffffffffffffffffffffffffffff1660e487015261346d908461535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526134a29291613fa2565b906134ad908361535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101248701526134e29291613fa2565b9060e48b016134f09161535e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c858403016101448601526135259291613fa2565b908c6024840152604483015203925af180156126fd5761354a575b808080808061337f565b926135588160449395613d4c565b9290613540565b8880fd5b613579896135708c61455d565b612c438a61457e565b61335f565b612fa4858361450c565b6135a1915060203d60201161083d5761082f8183613d4c565b386132f0565b6135c0915060203d60201161083d5761082f8183613d4c565b38613259565b60248673ffffffffffffffffffffffffffffffffffffffff6108658b61455d565b50346105d157806003193601126105d157602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105d15760406003193601126105d15761363f613be7565b6024359182151583036105d15761014061370261365c8585614489565b6136b260409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346105d15760206003193601126105d157602090613721613b46565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346105d157806003193601126105d157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105d15760c06003193601126105d1576137d3613b46565b506137dc613bd0565b6137e4613b69565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036105d15760a4359067ffffffffffffffff82116105d15760a063ffffffff8061ffff61384988886138423660048b01613c13565b50506142d9565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346105d157806003193601126105d15750611d44604051613893604082613d4c565b601781527f4275726e4d696e74546f6b656e506f6f6c20322e302e300000000000000000006020820152604051918291602083526020830190613c41565b50346105d15760c06003193601126105d1576138eb613b46565b6138f3613bd0565b906064357fffffffff00000000000000000000000000000000000000000000000000000000811681036107055760843567ffffffffffffffff8111610ff357613940903690600401613c13565b9160a435936002851015610fef5761395b9560443591613fe1565b90604051918291602083016020845282518091526020604085019301915b818110613987575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101613979565b9050346105df5760206003193601126105df576020907fffffffff000000000000000000000000000000000000000000000000000000006139f5613ab4565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613a8a575b8115613a60575b8115613a36575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613a2f565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613a28565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613a21565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613ae357565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613ae357565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613ae357565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613ae357565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613ae357565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613ae357565b359073ffffffffffffffffffffffffffffffffffffffff82168203613ae357565b6024359067ffffffffffffffff82168203613ae357565b6004359067ffffffffffffffff82168203613ae357565b359067ffffffffffffffff82168203613ae357565b9181601f84011215613ae35782359167ffffffffffffffff8311613ae35760208381860195010111613ae357565b919082519283825260005b848110613c8b5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613c4c565b35908115158203613ae357565b6020810190811067ffffffffffffffff821117613cc957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613cc957604052565b60a0810190811067ffffffffffffffff821117613cc957604052565b60e0810190811067ffffffffffffffff821117613cc957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613cc957604052565b92919267ffffffffffffffff8211613cc95760405191613dd5601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613d4c565b829481845281830111613ae3578281602093846000960137010152565b9080601f83011215613ae357816020613e0d93359101613d8d565b90565b906040600319830112613ae35760043567ffffffffffffffff81168103613ae357916024359067ffffffffffffffff8211613ae357613e5191600401613c13565b9091565b613e0d916020613e6e8351604084526040840190613c41565b920151906020818403910152613c41565b9181601f84011215613ae35782359167ffffffffffffffff8311613ae3576020808501948460051b010111613ae357565b9181601f84011215613ae35782359167ffffffffffffffff8311613ae3576020808501948460081b010111613ae357565b67ffffffffffffffff8111613cc95760051b60200190565b81810292918115918404141715613f0c57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613f45570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613f0c57565b519073ffffffffffffffffffffffffffffffffffffffff82168203613ae357565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff600354169586156142b757809760028710156142885773ffffffffffffffffffffffffffffffffffffffff98614142957fffffffff00000000000000000000000000000000000000000000000000000000938961425e5767ffffffffffffffff8216600052600b6020526040600020906040519161407983613d30565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c161515918291015261420a575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613fa2565b928180600095869560a483015203915afa9182156141fd57819261416557505090565b9091503d8083833e6141778183613d4c565b810190602081830312610ada5780519067ffffffffffffffff8211610705570181601f82011215610ada578051906141ae82613ee1565b936141bc6040519586613d4c565b82855260208086019360051b8301019384116105d15750602001905b8282106141e55750505090565b602080916141f284613f81565b8152019101906141d8565b50604051903d90823e3d90fd5b92935067ffffffffffffffff9285871615614246575061271061423561ffff61423c94511683613ef9565b0490613f74565b915b9038806140e3565b61425892506142356127109183613ef9565b9161423e565b67ffffffffffffffff9192506142829061427c612a6f36898b613d8d565b9061495b565b916140f1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516142cd602082613d4c565b60008152600036813790565b67ffffffffffffffff909291926143177fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614a68565b16600052600b60205260406000206040519061433282613d30565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526143df577fffffffff00000000000000000000000000000000000000000000000000000000166143d457505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b6040519061440582613d14565b60006080838281528260208201528260408201528260608201520152565b9060405161443081613d14565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161449b6143f8565b506144a46143f8565b506144d857166000526008602052604060002090613e0d6144cc60026144d16144cc86614423565b614b4f565b9401614423565b16908160005260046020526144f36144cc6040600020614423565b916000526005602052613e0d6144cc6040600020614423565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613ae3570180359067ffffffffffffffff8211613ae357602001918136038313613ae357565b3573ffffffffffffffffffffffffffffffffffffffff81168103613ae35790565b3567ffffffffffffffff81168103613ae35790565b9067ffffffffffffffff613e0d92166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b604051906145dd82613cf8565b60606020838281520152565b80518210156145fd5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c92168015614675575b602083101461464657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161463b565b90604051918260008254926146938461462c565b808452936001811690811561470157506001146146ba575b506146b892500383613d4c565b565b90506000929192526020600020906000915b8183106146e55750509060206146b892820101386146ab565b60209193508060019154838589010152019101909184926146cc565b602093506146b89592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386146ab565b67ffffffffffffffff166000526008602052613e0d600460406000200161467f565b91908110156145fd5760081b0190565b358015158103613ae35790565b3561ffff81168103613ae35790565b3563ffffffff81168103613ae35790565b359063ffffffff82168203613ae357565b359061ffff82168203613ae357565b91908110156145fd5760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613ae357565b9190826060910312613ae3576040516060810181811067ffffffffffffffff821117613cc957604052604061484081839561482781613ca0565b8552614835602082016147d0565b6020860152016147d0565b910152565b6fffffffffffffffffffffffffffffffff6148836040809361486681613ca0565b1515865283614877602083016147d0565b166020870152016147d0565b16910152565b818110614894575050565b60008155600101614889565b80518015614910576020036148d2578051602082810191830183900312613ae357519060ff82116148d2575060ff1690565b612082906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613c41565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613f0c57565b60ff16604d8111613f0c57600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614a6157828411614a3757906149a091614936565b91604d60ff84161180156149fe575b6149c8575050906149c2613e0d9261494a565b90613ef9565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614a088361494a565b8015613f45577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0484116149af565b614a4091614936565b91604d60ff8416116149c857505090614a5b613e0d9261494a565b90613f3b565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614b4a57614a9b8161519a565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614b4a5761ffff8360e01c168015918215614b39575b5050614ae5575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614adb565b505050565b614b576143f8565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614bb46020850193614bae614ba163ffffffff87511642613f74565b8560808901511690613ef9565b9061518d565b80821015614bcd57505b16825263ffffffff4216905290565b9050614bbe565b90816020910312613ae357518015158103613ae35790565b73ffffffffffffffffffffffffffffffffffffffff600154163303614c0d57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614e775767ffffffffffffffff81516020830120921691826000526008602052614c6c8160056040600020016157f1565b15614e335760005260096020526040600020815167ffffffffffffffff8111613cc957614c99825461462c565b601f8111614e01575b506020601f8211600114614d3b5791614d15827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614d2b95600091614d30575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613c41565b0390a2565b905084015138614ce4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614de9575092614d2b9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614db2575b5050811b019055611d30565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614da6565b9192602060018192868a015181550194019201614d6b565b614e2d90836000526020600020601f840160051c81019160208510610f2a57601f0160051c0190614889565b38614ca2565b50906120826040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613c41565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613e0d604082613d4c565b81519192911561505e576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff60208501511610614ffb576146b891925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b60648361505c604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604084015116158015906150ed575b61508c576146b89192614f1f565b60648361505c604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff602084015116151561507e565b906127109167ffffffffffffffff6151266020830161457e565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561517757606061ffff615173935460901c16910135613ef9565b0490565b606061ffff615173935460801c16910135613ef9565b91908201809211613f0c57565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115615271577dffff000000000000000000000000000000000000000000000000000000008116156152685760ff60015b169060f01c80615232575b506001036152055750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b6010811061524357506151fa565b6001811b8216615256575b600101615235565b9160018101809111613f0c579161524e565b60ff60006151ef565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9216928360005260086020526152be81836002604060002001615846565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614d2b565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156153535750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f9918360005260056020526152be81836040600020615846565b906146b89350615275565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613ae357016020813591019167ffffffffffffffff8211613ae3578136038313613ae357565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449216928360005260086020526152be81836040600020615846565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c16156154595750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e918360005260046020526152be81836040600020615846565b906146b893506153ae565b906040519182815491828252602082019060005260206000209260005b8181106154965750506146b892500383613d4c565b8454835260019485019487945060209093019201615481565b80548210156145fd5760005260206000200190600090565b6000818152600760205260409020548015615656577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f0c57600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f0c578181036155e7575b50505060065480156155b8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016155758160066154af565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61563e6155f86156099360066154af565b90549060031b1c92839260066154af565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055600052600760205260406000205538808061553c565b5050600090565b9060018201918160005282602052604060002054801515600014615788577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f0c578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f0c57818103615751575b505050805480156155b8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061571282826154af565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61577161576161560993866154af565b90549060031b1c928392866154af565b9055600052836020526040600020553880806156da565b50505050600090565b806000526007602052604060002054156000146157eb5760065468010000000000000000811015613cc9576157d261560982600185940160065560066154af565b9055600654906000526007602052604060002055600190565b50600090565b60008281526001820160205260409020546156565780549068010000000000000000821015613cc9578261582f6156098460018096018555846154af565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615afa575b615af4576fffffffffffffffffffffffffffffffff8216916001850190815461589e63ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613f74565b9081615a56575b5050848110615a0a57508383106158ff5750506158d46fffffffffffffffffffffffffffffffff928392613f74565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c92831561599e578161591791613f74565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613f0c5761596561596a9273ffffffffffffffffffffffffffffffffffffffff9661518d565b613f3b565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615aca57615a7192614bae9160801c90613ef9565b80841015615ac55750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806158a5565b615a7c565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561585956fea164736f6c634300081a000a" - -type BurnMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnMintTokenPoolABI, - Bin: BurnMintTokenPoolBin, - }, + Name: "burn-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnMintTokenPool contract", + ContractMetadata: gobindings.BurnMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go b/chains/evm/deployment/v2_0_0/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go index d568990019..4ea2a480f1 100644 --- a/chains/evm/deployment/v2_0_0/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go @@ -3,80 +3,33 @@ package burn_mint_with_lock_release_flag_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_mint_with_lock_release_flag_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnMintWithLockReleaseFlagTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnMintWithLockReleaseFlagTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"out","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"out","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnMintWithLockReleaseFlagTokenPoolBin = "0x60e080604052346101f65760a081615ea2803803809161001f8285610247565b8339810103126101f65780516001600160a01b038116908190036101f65761004960208301610280565b6100556040840161028e565b9161006e60806100676060870161028e565b950161028e565b93331561023657600180546001600160a01b0319163317905581158015610225575b8015610214575b610203578160805260c052308103610170575b5060a052600380546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055604051615bff90816102a382396080518181816102470152818161049a015281816122b40152818161248c01528181612afe01528181612cff015281816131ce01528181613800015261385a015260a0518181816136c6015281816149b3015281816149fd01526153e9015260c0518181816102e2015281816114300152818161234e01528181612b9901526132690152f35b60206004916040519283809263313ce56760e01b82525afa600091816101c2575b50156100aa5760ff1660ff82168181036101ab57506100aa565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116101fb575b816101de60209383610247565b810103126101f6576101ef90610280565b9038610191565b600080fd5b3d91506101d1565b630a64406560e11b60005260046000fd5b506001600160a01b03811615610097565b506001600160a01b03851615610090565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761026a57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff821682036101f657565b51906001600160a01b03821682036101f65756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714613aa15750806306b859ef146139bc578063181f5a77146139355780631826b1e71461387e57806321df0da71461382d578063240028e8146137c95780632422ac45146136ea57806324f65ee7146136ac5780632cab0fb61461315357806337a3210d1461311f5780633907753714612a7e5780634c5ef0ed14612a3757806362ddd3c4146129b05780637437ff9f1461296257806379ba50971461289b5780638926f54f146128555780638da5cb5b146128215780639a4575b914612232578063a42a7b8b146120cb578063acfecf9114611fd3578063ae39a25714611e48578063b6cfa3b714611d8d578063b794658014611d55578063bfeffd3f14611ca9578063c4bffe2b14611b7e578063c7230a60146118d8578063dc04fa1f14611454578063dc0bd97114611403578063dcbd41bc146111ff578063e8a1da1714610b23578063ea6396db146109e5578063ec6ae7a7146109a2578063f2fde38b146108d35763fbc801a71461019757600080fd5b34610616576060600319360112610616576004359067ffffffffffffffff8211610616578160040160a06003198436030112610624576101d5613bd3565b9060443567ffffffffffffffff811161074a57906101fa610220923690600401613cfe565b929061020461466f565b5061020d61466f565b5061021885846157ff565b933691613e78565b92608486019361022f856145fc565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361088957602487019677ffffffffffffffff000000000000000000000000000000006102958961461d565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107fc57889161085a575b506108325767ffffffffffffffff6103298961461d565b16610341816000526007602052604060002054151590565b1561080757602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156107fc5788906107ab575b73ffffffffffffffffffffffffffffffffffffffff915016330361077f576064810135936103d0868661405f565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561075d5761042c907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614b07565b610448816104398a6145fc565b6104428d61461d565b90615b82565b73ffffffffffffffffffffffffffffffffffffffff600354169384610628575b505050505050906104789161405f565b916104828461461d565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610624578180916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528960048401525af1801561061957610601575b6105f78461058a61058588877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61054b6105458561461d565b936145fc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a261461d565b6147e0565b906105936153e2565b604051926105a084613de3565b835260208301908152604051907ffa7c07de000000000000000000000000000000000000000000000000000000006020830152602082526105e2604083613e37565b52604051928392604084526040840190613f40565b9060208301520390f35b61060c828092613e37565b6106165780610503565b80fd5b6040513d84823e3d90fd5b5080fd5b843b15610759578994928b9694928692604051988997889687957fa8027c0f00000000000000000000000000000000000000000000000000000000875260048701608090528061067791615392565b6084880160a0905261012488019061068e9261408d565b9261069890613ce9565b67ffffffffffffffff1660a48701526044016106b390613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660c48601528d8c60e48701526106de90613c9a565b73ffffffffffffffffffffffffffffffffffffffff16610104860152602485015283810360031901604485015261071491613d2c565b90606483015203925af1801561074e57908591610735575b80808080610468565b8161073f91613e37565b61074a57833861072c565b8380fd5b6040513d87823e3d90fd5b8980fd5b5061077a8161076b8a6145fc565b6107748d61461d565b90615b3c565b610448565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d6020116107f4575b816107c560209383613e37565b810103126107f0576107eb73ffffffffffffffffffffffffffffffffffffffff9161406c565b6103a2565b8780fd5b3d91506107b8565b6040513d8a823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b61087c915060203d602011610882575b6108748183613e37565b810190614c73565b38610312565b503d61086a565b60248673ffffffffffffffffffffffffffffffffffffffff6108aa886145fc565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346106165760206003193601126106165773ffffffffffffffffffffffffffffffffffffffff610902613c31565b61090a614cdc565b1633811461097a57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b503461061657806003193601126106165760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b5034610616576080600319360112610616576109ff613c31565b50610a08613cbb565b610a10613c02565b5060643567ffffffffffffffff8111610b1f579167ffffffffffffffff604092610a4060e0953690600401613cfe565b50508260c08551610a5081613e1b565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610a8882613e1b565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346106165760406003193601126106165760043567ffffffffffffffff811161062457610b55903690600401613f6a565b9060243567ffffffffffffffff811161074a5790610b7884923690600401613f6a565b939091610b83614cdc565b83905b8282106110405750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b8181101561103c578060051b83013585811215611038578301610120813603126110385760405194610bea86613dff565b610bf382613ce9565b8652602082013567ffffffffffffffff81116106245782019436601f8701121561062457853595610c2387613fcc565b96610c316040519889613e37565b80885260208089019160051b830101903682116110385760208301905b828210611005575050505060208701958652604083013567ffffffffffffffff8111610b1f57610c819036908501613edd565b9160408801928352610cab610c99366060870161488c565b9460608a0195865260c036910161488c565b956080890196875283515115610fdd57610ccf67ffffffffffffffff8a511661574a565b15610fa65767ffffffffffffffff8951168252600860205260408220610cf6865182614f91565b610d04885160028301614f91565b6004855191019080519067ffffffffffffffff8211610f7957610d2783546146cb565b601f8111610f3e575b50602090601f8311600114610e9f57610d7e9291869183610e94575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610db85790610db2600192610dab8367ffffffffffffffff8f511692614688565b5190614d27565b01610d83565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e8667ffffffffffffffff6001979694985116925193519151610e52610e1d60405196879687526101006020880152610100870190613d2c565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610bb9565b015190508e80610d4c565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610f265750908460019594939210610eef575b505050811b019055610d81565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610ee2565b92936020600181928786015181550195019301610ecc565b610f699084875260208720601f850160051c81019160208610610f6f575b601f0160051c0190614928565b8d610d30565b9091508190610f5c565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111611034576020916110298392833691890101613edd565b815201910190610c4e565b8680fd5b8480fd5b8380f35b9267ffffffffffffffff61106261105d8486889a9699979a61485f565b61461d565b169161106d83615480565b156111d35782845260086020526110896005604086200161541d565b94845b86518110156110c25760019085875260086020526110bb600560408920016110b4838b614688565b5190615616565b500161108c565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110fe81546146cb565b80611192575b5050500180549088815581611174575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610b86565b885260208820908101905b818110156111145788815560010161117f565b601f81116001146111a85750555b888a80611104565b818352602083206111c391601f01861c810190600101614928565b80825281602081209155556111a0565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346106165760206003193601126106165760043567ffffffffffffffff811161062457611231903690600401613f9b565b73ffffffffffffffffffffffffffffffffffffffff600a5416331415806113e1575b6113b557825b818110611264578380f35b61126f818385614802565b67ffffffffffffffff6112818261461d565b169061129a826000526007602052604060002054151590565b1561138957907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e083611349611323602060019897018b6112db82614812565b1561135057879052600460205261130260408d206112fc366040880161488c565b90614f91565b868c52600560205261131e60408d206112fc3660a0880161488c565b614812565b91604051921515835261133c60208401604083016148e4565b60a06080840191016148e4565ba201611259565b60026040828a61131e945260086020526113728282206112fc36858c0161488c565b8a8152600860205220016112fc3660a0880161488c565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611253565b5034610616578060031936011261061657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106165760406003193601126106165760043567ffffffffffffffff811161062457611486903690600401613f9b565b60243567ffffffffffffffff811161074a576114a6903690600401613f6a565b9190926114b1614cdc565b845b82811061151d57505050825b8181106114ca578380f35b8067ffffffffffffffff6114e461105d600194868861485f565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a2016114bf565b67ffffffffffffffff61153461105d838686614802565b1661154c816000526007602052604060002054151590565b156118ad5761155c828585614802565b602081019060e081019061156f82614812565b156118815760a0810161271061ffff6115878361481f565b1610156118725760c082019161271061ffff6115a28561481f565b16101561183a5763ffffffff6115b78661482e565b161561180e57858c52600b60205260408c206115d28661482e565b63ffffffff169080549060408401916115ea8361482e565b60201b67ffffffff00000000169360608601946116068661482e565b60401b6bffffffff00000000000000001696608001966116258861482e565b60601b6fffffffff00000000000000000000000016916116448a61481f565b60801b71ffff0000000000000000000000000000000016936116658c61481f565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff16171717815561171887614812565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016179055604051966117699061483f565b63ffffffff16875261177a9061483f565b63ffffffff16602087015261178e9061483f565b63ffffffff1660408601526117a29061483f565b63ffffffff1660608501526117b690614850565b61ffff1660808401526117c890614850565b61ffff1660a08301526117da90613d8b565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a26001016114b3565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff6118498661481f565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61184960249361481f565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346106165760406003193601126106165760043567ffffffffffffffff81116106245761190a903690600401613f6a565b90611913613c77565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611b5c575b611b305773ffffffffffffffffffffffffffffffffffffffff8316908115611b0857845b818110611965578580f35b73ffffffffffffffffffffffffffffffffffffffff61198d61198883858861485f565b6145fc565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa9081156107fc578891611ad5575b50806119e2575b505060010161195a565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a9190611a43606482613e37565b519082865af115611aca5787513d611ac15750813b155b611a955790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a390386119d8565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611a5a565b6040513d89823e3d90fd5b905060203d8111611b01575b611aeb8183613e37565b60208260009281010312610616575051386119d1565b503d611ae1565b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c5416331415611936565b5034610616578060031936011261061657604051906006548083528260208101600684526020842092845b818110611c90575050611bbe92500383613e37565b8151611be2611bcc82613fcc565b91611bda6040519384613e37565b808352613fcc565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611c41578067ffffffffffffffff611c2e60019388614688565b5116611c3a8286614688565b5201611c0f565b50925090604051928392602084019060208552518091526040840192915b818110611c6d575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611c5f565b8454835260019485019487945060209093019201611ba9565b50346106165760206003193601126106165760043573ffffffffffffffffffffffffffffffffffffffff811680910361062457611ce4614cdc565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b503461061657602060031936011261061657611d89611d75610585613cd2565b604051918291602083526020830190613d2c565b0390f35b5034610616576020600319360112610616577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611dca613b9f565b611dd2614cdc565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b503461061657606060031936011261061657611e62613c31565b90611e6b613c77565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361074a57611e95614cdc565b73ffffffffffffffffffffffffffffffffffffffff82168015611fab5794611fa5917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346106165767ffffffffffffffff611feb36613efb565b929091611ff6614cdc565b169161200f836000526007602052604060002054151590565b156111d357828452600860205261203e60056040862001612031368486613e78565b6020815191012090615616565b1561208357907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769161207d60405192839260208452602084019161408d565b0390a280f35b826120c7836040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485015260406024850152604484019161408d565b0390fd5b50346106165760206003193601126106165767ffffffffffffffff6120ee613cd2565b16815260086020526121056005604083200161541d565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061214a61213483613fcc565b926121426040519485613e37565b808452613fcc565b01835b818110612221575050825b825181101561219e578061216e60019285614688565b51855260096020526121826040862061471e565b61218c8285614688565b526121978184614688565b5001612158565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106121d657505050500390f35b91936020612211827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613d2c565b96019201920185949391926121c7565b80606060208093860101520161214d565b50346106165760206003193601126106165760043567ffffffffffffffff811161062457806004019060a06003198236030112610b1f5761227161466f565b5061227a61466f565b5060405160209361228b8583613e37565b808252608483019161229c836145fc565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361280057602484019477ffffffffffffffff000000000000000000000000000000006123028761461d565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156127855784916127e3575b506127bb5767ffffffffffffffff6123958761461d565b166123ad816000526007602052604060002054151590565b15612790578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa801561278557849061273d575b73ffffffffffffffffffffffffffffffffffffffff9150163303612711576064850135946124478661243e876145fc565b6107748a61461d565b73ffffffffffffffffffffffffffffffffffffffff6003541691826125f4575b505050506124748461461d565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610624578180916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528960048401525af18015610619576125df575b8561257561058587877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8961057d61253e6125388761461d565b926145fc565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b9061257e6153e2565b6040519261258b84613de3565b8352818301908152604051907ffa7c07de00000000000000000000000000000000000000000000000000000000838301528282526125ca604083613e37565b52611d89604051928284938452830190613f40565b6125ea828092613e37565b61061657806124f5565b823b1561103857918791858094604051968795869485937fa8027c0f00000000000000000000000000000000000000000000000000000000855260048501608090528061264091615392565b6084860160a090526101248601906126579261408d565b9161266190613ce9565b67ffffffffffffffff1660a485015260440161267c90613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e48401526126a68b613c9a565b73ffffffffffffffffffffffffffffffffffffffff166101048401528360248401528281036003190160448401526126dd91613d2c565b8a606483015203925af18015610619579082916126fc575b8080612467565b8161270691613e37565b6106165780386126f5565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d831161277e575b6127538183613e37565b8101031261074a5761277973ffffffffffffffffffffffffffffffffffffffff9161406c565b61240d565b503d612749565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6127fa9150883d8a11610882576108748183613e37565b3861237e565b5073ffffffffffffffffffffffffffffffffffffffff6108aa6024936145fc565b5034610616578060031936011261061657602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461061657602060031936011261061657602061289167ffffffffffffffff61287d613cd2565b166000526007602052604060002054151590565b6040519015158152f35b5034610616578060031936011261061657805473ffffffffffffffffffffffffffffffffffffffff8116330361293a577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b5034610616578060031936011261061657600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b5034610616576129bf36613efb565b6129cb93929193614cdc565b67ffffffffffffffff82166129ed816000526007602052604060002054151590565b15612a0c5750612a099293612a03913691613e78565b90614d27565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b503461061657604060031936011261061657612a51613cd2565b906024359067ffffffffffffffff821161061657602061289184612a783660048701613edd565b90614632565b50346106165760206003193601126106165760043567ffffffffffffffff811161062457806004019161010060031983360301126106165780604051612ac381613d98565b5280604051612ad181613d98565b526064820135916084810193612ae6856145fc565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036130fe57602482019477ffffffffffffffff00000000000000000000000000000000612b4c8761461d565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561074e5785916130df575b506130b75767ffffffffffffffff612be08761461d565b16612bf8816000526007602052604060002054151590565b1561308c57602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa90811561074e57859161306d575b501561304157612c6f8661461d565b612c8b60a4850191612a78612c848487614c8b565b3691613e78565b15612ffa57612cac86612c9d846145fc565b612ca68a61461d565b906152a9565b73ffffffffffffffffffffffffffffffffffffffff600354169182612e1f575b5050505060440192612cdd846145fc565b91612ce78261461d565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692833b15610624576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91909116600482015260248101859052818160448183885af1801561061957612e0a575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612dd86125387ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09661461d565b60405196875233898801521660408601528560608601521692a260405190612dff82613d98565b815260405190518152f35b612e15828092613e37565b6106165780612d86565b823b15612ff657918791868094604051968795869485937f637115740000000000000000000000000000000000000000000000000000000085526004850160609052612e6b8480615392565b606487016101009052610164870190612e839261408d565b92612e8d90613ce9565b67ffffffffffffffff166084860152612ea860448d01613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660a48601528d60c4860152612ed290613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660e4850152612ef79083615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610104860152612f2c929161408d565b612f3960c48b0183615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612f6e929161408d565b9060e48a01612f7c91615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612fb1929161408d565b8a602483015282604483015203925af18015612feb57908391612fd6575b8080612ccc565b81612fe091613e37565b610624578138612fcf565b6040513d85823e3d90fd5b8580fd5b6130049083614c8b565b6120c76040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161408d565b6024847f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b613086915060203d602011610882576108748183613e37565b38612c60565b7fa9902c7e000000000000000000000000000000000000000000000000000000008552600452602484fd5b6004847f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6130f8915060203d602011610882576108748183613e37565b38612bc9565b60248373ffffffffffffffffffffffffffffffffffffffff6108aa886145fc565b5034610616578060031936011261061657602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346106165760406003193601126106165760043567ffffffffffffffff8111610624578060040191610100600319833603011261061657613193613bd3565b91816040516131a181613d98565b5260648101359260848201946131b6866145fc565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361368b57602483019577ffffffffffffffff0000000000000000000000000000000061321c8861461d565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561360e57869161366c575b506136445767ffffffffffffffff6132b08861461d565b166132c8816000526007602052604060002054151590565b1561361957602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa90811561360e5786916135ef575b50156135c35761333f8761461d565b9261335560a4860194612a78612c848787614c8b565b156135b9577fffffffff0000000000000000000000000000000000000000000000000000000016801561359e5761339e8761338f846145fc565b6133988b61461d565b90615322565b73ffffffffffffffffffffffffffffffffffffffff6003541692836133d0575b505050505060440192612cdd846145fc565b833b15611034579186888195938b9795604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d6134208680615392565b60648a0161010090526101648a01906134389261408d565b9461344290613ce9565b67ffffffffffffffff16608489015260440161345d90613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c487015261348690613c9a565b73ffffffffffffffffffffffffffffffffffffffff1660e48601526134ab9083615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101048701526134e0929161408d565b6134ed60c48c0183615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610124870152613522929161408d565b9060e48b0161353091615392565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610144860152613565929161408d565b908b6024840152604483015203925af18015612feb57613589575b808080806133be565b916135978160449394613e37565b9190613580565b6135b4876135ab846145fc565b612ca68b61461d565b61339e565b6130048484614c8b565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b613608915060203d602011610882576108748183613e37565b38613330565b6040513d88823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b613685915060203d602011610882576108748183613e37565b38613299565b60248473ffffffffffffffffffffffffffffffffffffffff6108aa896145fc565b5034610616578060031936011261061657602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461061657604060031936011261061657613704613cd2565b602435918215158303610616576101406137c76137218585614579565b61377760409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b5034610616576020600319360112610616576020906137e6613c31565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b5034610616578060031936011261061657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106165760c060031936011261061657613898613c31565b506138a1613cbb565b6138a9613c54565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036106165760a4359067ffffffffffffffff82116106165760a063ffffffff8061ffff61390e88886139073660048b01613cfe565b50506143c9565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b503461061657806003193601126106165750611d89604051613958606082613e37565b602a81527f4275726e4d696e74576974684c6f636b52656c65617365466c6167546f6b656e60208201527f506f6f6c20322e302e30000000000000000000000000000000000000000000006040820152604051918291602083526020830190613d2c565b50346106165760c0600319360112610616576139d6613c31565b6139de613cbb565b906064357fffffffff000000000000000000000000000000000000000000000000000000008116810361074a5760843567ffffffffffffffff811161103857613a2b903690600401613cfe565b9160a43593600285101561103457613a4695604435916140cc565b90604051918291602083016020845282518091526020604085019301915b818110613a72575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101613a64565b905034610624576020600319360112610624576020907fffffffff00000000000000000000000000000000000000000000000000000000613ae0613b9f565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613b75575b8115613b4b575b8115613b21575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613b1a565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613b13565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613b0c565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613bce57565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613bce57565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613bce57565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613bce57565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613bce57565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613bce57565b359073ffffffffffffffffffffffffffffffffffffffff82168203613bce57565b6024359067ffffffffffffffff82168203613bce57565b6004359067ffffffffffffffff82168203613bce57565b359067ffffffffffffffff82168203613bce57565b9181601f84011215613bce5782359167ffffffffffffffff8311613bce5760208381860195010111613bce57565b919082519283825260005b848110613d765750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613d37565b35908115158203613bce57565b6020810190811067ffffffffffffffff821117613db457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613db457604052565b60a0810190811067ffffffffffffffff821117613db457604052565b60e0810190811067ffffffffffffffff821117613db457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613db457604052565b92919267ffffffffffffffff8211613db45760405191613ec0601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613e37565b829481845281830111613bce578281602093846000960137010152565b9080601f83011215613bce57816020613ef893359101613e78565b90565b906040600319830112613bce5760043567ffffffffffffffff81168103613bce57916024359067ffffffffffffffff8211613bce57613f3c91600401613cfe565b9091565b613ef8916020613f598351604084526040840190613d2c565b920151906020818403910152613d2c565b9181601f84011215613bce5782359167ffffffffffffffff8311613bce576020808501948460051b010111613bce57565b9181601f84011215613bce5782359167ffffffffffffffff8311613bce576020808501948460081b010111613bce57565b67ffffffffffffffff8111613db45760051b60200190565b81810292918115918404141715613ff757565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115614030570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613ff757565b519073ffffffffffffffffffffffffffffffffffffffff82168203613bce57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff600354169586156143a757809760028710156143785773ffffffffffffffffffffffffffffffffffffffff9861422d957fffffffff0000000000000000000000000000000000000000000000000000000093896143495767ffffffffffffffff8216600052600b6020526040600020906040519161416483613e1b565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c16151591829101526142f5575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c484019161408d565b928180600095869560a483015203915afa9182156142e857819261425057505090565b9091503d8083833e6142628183613e37565b810190602081830312610b1f5780519067ffffffffffffffff821161074a570181601f82011215610b1f5780519061429982613fcc565b936142a76040519586613e37565b82855260208086019360051b8301019384116106165750602001905b8282106142d05750505090565b602080916142dd8461406c565b8152019101906142c3565b50604051903d90823e3d90fd5b92935067ffffffffffffffff9285871615614331575061271061432061ffff61432794511683613fe4565b049061405f565b915b9038806141ce565b61434392506143206127109183613fe4565b91614329565b67ffffffffffffffff9192506143729061436c61436736898b613e78565b61493f565b906149fa565b916141dc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516143bd602082613e37565b60008152600036813790565b67ffffffffffffffff909291926144077fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614b07565b16600052600b60205260406000206040519061442282613e1b565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526144cf577fffffffff00000000000000000000000000000000000000000000000000000000166144c457505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b604051906144f582613dff565b60006080838281528260208201528260408201528260608201520152565b9060405161452081613dff565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161458b6144e8565b506145946144e8565b506145c857166000526008602052604060002090613ef86145bc60026145c16145bc86614513565b614bee565b9401614513565b16908160005260046020526145e36145bc6040600020614513565b916000526005602052613ef86145bc6040600020614513565b3573ffffffffffffffffffffffffffffffffffffffff81168103613bce5790565b3567ffffffffffffffff81168103613bce5790565b9067ffffffffffffffff613ef892166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b6040519061467c82613de3565b60606020838281520152565b805182101561469c5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c92168015614714575b60208310146146e557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f16916146da565b9060405191826000825492614732846146cb565b80845293600181169081156147a05750600114614759575b5061475792500383613e37565b565b90506000929192526020600020906000915b818310614784575050906020614757928201013861474a565b602091935080600191548385890101520191019091849261476b565b602093506147579592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013861474a565b67ffffffffffffffff166000526008602052613ef8600460406000200161471e565b919081101561469c5760081b0190565b358015158103613bce5790565b3561ffff81168103613bce5790565b3563ffffffff81168103613bce5790565b359063ffffffff82168203613bce57565b359061ffff82168203613bce57565b919081101561469c5760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613bce57565b9190826060910312613bce576040516060810181811067ffffffffffffffff821117613db45760405260406148df8183956148c681613d8b565b85526148d46020820161486f565b60208601520161486f565b910152565b6fffffffffffffffffffffffffffffffff6149226040809361490581613d8b565b15158652836149166020830161486f565b1660208701520161486f565b16910152565b818110614933575050565b60008155600101614928565b805180156149af57602003614971578051602082810191830183900312613bce57519060ff8211614971575060ff1690565b6120c7906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613d2c565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613ff757565b60ff16604d8111613ff757600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614b0057828411614ad65790614a3f916149d5565b91604d60ff8416118015614a9d575b614a6757505090614a61613ef8926149e9565b90613fe4565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614aa7836149e9565b8015614030577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411614a4e565b614adf916149d5565b91604d60ff841611614a6757505090614afa613ef8926149e9565b90614026565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614be957614b3a816151ce565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614be95761ffff8360e01c168015918215614bd8575b5050614b84575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614b7a565b505050565b614bf66144e8565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614c536020850193614c4d614c4063ffffffff8751164261405f565b8560808901511690613fe4565b906151c1565b80821015614c6c57505b16825263ffffffff4216905290565b9050614c5d565b90816020910312613bce57518015158103613bce5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613bce570180359067ffffffffffffffff8211613bce57602001918136038313613bce57565b73ffffffffffffffffffffffffffffffffffffffff600154163303614cfd57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614f675767ffffffffffffffff81516020830120921691826000526008602052614d5c8160056040600020016157aa565b15614f235760005260096020526040600020815167ffffffffffffffff8111613db457614d8982546146cb565b601f8111614ef1575b506020601f8211600114614e2b5791614e05827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614e1b95600091614e20575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613d2c565b0390a2565b905084015138614dd4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614ed9575092614e1b9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614ea2575b5050811b019055611d75565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614e96565b9192602060018192868a015181550194019201614e5b565b614f1d90836000526020600020601f840160051c81019160208510610f6f57601f0160051c0190614928565b38614d92565b50906120c76040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613d2c565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b815191929115615113576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff602085015116106150b05761475791925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615111604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604084015116158015906151a2575b615141576147579192614fd4565b606483615111604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615133565b91908201809211613ff757565b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156152a5577dffff0000000000000000000000000000000000000000000000000000000081161561529c5760ff60015b169060f01c80615266575b506001036152395750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b60108110615277575061522e565b6001811b821661528a575b600101615269565b9160018101809111613ff75791615282565b60ff6000615223565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9216928360005260086020526152f281836002604060002001615880565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614e1b565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156153875750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f9918360005260056020526152f281836040600020615880565b9061475793506152a9565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613bce57016020813591019167ffffffffffffffff8211613bce578136038313613bce57565b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613ef8604082613e37565b906040519182815491828252602082019060005260206000209260005b81811061544f57505061475792500383613e37565b845483526001948501948794506020909301920161543a565b805482101561469c5760005260206000200190600090565b600081815260076020526040902054801561560f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613ff757600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613ff7578181036155a0575b5050506006548015615571577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161552e816006615468565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6155f76155b16155c2936006615468565b90549060031b1c9283926006615468565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005260076020526040600020553880806154f5565b5050600090565b9060018201918160005282602052604060002054801515600014615741577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613ff7578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613ff75781810361570a575b50505080548015615571577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906156cb8282615468565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61572a61571a6155c29386615468565b90549060031b1c92839286615468565b905560005283602052604060002055388080615693565b50505050600090565b806000526007602052604060002054156000146157a45760065468010000000000000000811015613db45761578b6155c28260018594016006556006615468565b9055600654906000526007602052604060002055600190565b50600090565b600082815260018201602052604090205461560f5780549068010000000000000000821015613db457826157e86155c2846001809601855584615468565b905580549260005201602052604060002055600190565b906127109167ffffffffffffffff6158196020830161461d565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561586a57606061ffff615866935460901c16910135613fe4565b0490565b606061ffff615866935460801c16910135613fe4565b9182549060ff8260a01c16158015615b34575b615b2e576fffffffffffffffffffffffffffffffff821691600185019081546158d863ffffffff6fffffffffffffffffffffffffffffffff83169360801c164261405f565b9081615a90575b5050848110615a44575083831061593957505061590e6fffffffffffffffffffffffffffffffff92839261405f565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c9283156159d857816159519161405f565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613ff75761599f6159a49273ffffffffffffffffffffffffffffffffffffffff966151c1565b614026565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615b0457615aab92614c4d9160801c90613fe4565b80841015615aff5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806158df565b615ab6565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b508215615893565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449216928360005260086020526152f281836040600020615880565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c1615615be75750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e918360005260046020526152f281836040600020615880565b906147579350615b3c56fea164736f6c634300081a000a" - -type BurnMintWithLockReleaseFlagTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnMintWithLockReleaseFlagTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnMintWithLockReleaseFlagTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnMintWithLockReleaseFlagTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnMintWithLockReleaseFlagTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnMintWithLockReleaseFlagTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnMintWithLockReleaseFlagTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-mint-with-lock-release-flag-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnMintWithLockReleaseFlagTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnMintWithLockReleaseFlagTokenPoolABI, - Bin: BurnMintWithLockReleaseFlagTokenPoolBin, - }, + Name: "burn-mint-with-lock-release-flag-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnMintWithLockReleaseFlagTokenPool contract", + ContractMetadata: gobindings.BurnMintWithLockReleaseFlagTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnMintWithLockReleaseFlagTokenPoolBin), + EVM: common.FromHex(gobindings.BurnMintWithLockReleaseFlagTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go b/chains/evm/deployment/v2_0_0/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go index bd85ecefca..0c02f4bfe2 100644 --- a/chains/evm/deployment/v2_0_0/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go @@ -3,81 +3,34 @@ package burn_to_address_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_to_address_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnToAddressMintTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnToAddressMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"burnAddress","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getBurnAddress","inputs":[],"outputs":[{"name":"burnAddress","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"i_burnAddress","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnToAddressMintTokenPoolBin = "0x610100806040523461021f5760c081615e7580380380916100208285610270565b83398101031261021f5780516001600160a01b038116919082900361021f5761004b602082016102a9565b610057604083016102b7565b90610064606084016102b7565b9361007d60a0610076608087016102b7565b95016102b7565b94331561025f57600180546001600160a01b031916331790558115801561024e575b801561023d575b61022c578160805260c052308103610199575b5060a052600380546001600160a01b039283166001600160a01b0319918216179091556002805493909216921691909117905560e052604051615ba990816102cc8239608051818181610255015281816104bd0152818161217d015281816123950152818161296801528181612b63015281816130640152818161369001526136ea015260a051818181613556015281816148ba015281816149040152614e4e015260c0518181816102f00152818161139b0152818161221701528181612a0301526130ff015260e05181818161049c015281816123740152613c2f0152f35b60206004916040519283809263313ce56760e01b82525afa600091816101eb575b50156100b95760ff1660ff82168181036101d457506100b9565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d602011610224575b8161020760209383610270565b8101031261021f57610218906102a9565b90386101ba565b600080fd5b3d91506101fa565b630a64406560e11b60005260046000fd5b506001600160a01b038116156100a6565b506001600160a01b0385161561009f565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761029357604052565b634e487b7160e01b600052604160045260246000fd5b519060ff8216820361021f57565b51906001600160a01b038216820361021f5756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461390b5750806306b859ef14613826578063181f5a77146137c55780631826b1e71461370e57806321df0da7146136bd578063240028e8146136595780632422ac451461357a57806324f65ee71461353c5780632cab0fb614612fc957806337a3210d14612f9557806338b39d291461184357806339077537146128bd5780634c5ef0ed1461287657806362ddd3c4146127ef5780637437ff9f146127a157806379ba5097146126da5780638926f54f146126945780638da5cb5b146126605780639a4575b914612104578063a42a7b8b14611f9d578063acfecf9114611ea5578063ae39a25714611d1a578063b6cfa3b714611c5f578063b794658014611c27578063bfeffd3f14611b7b578063c4bffe2b14611a50578063c7230a6014611848578063c8de9fe014611843578063dc04fa1f146113bf578063dc0bd9711461136e578063dcbd41bc1461116a578063e8a1da1714610a92578063ea6396db14610954578063ec6ae7a714610911578063f2fde38b146108425763fbc801a7146101ad57600080fd5b346106b65760606003193601126106b6576004359067ffffffffffffffff82116106b6578160040160a0600319843603011261083e576101eb613a3d565b9160443567ffffffffffffffff811161083e579061021161022e93923690600401613b68565b939061021b614576565b5061022686856150b2565b943691613d33565b93608486019461023d86614503565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036107f457602487019677ffffffffffffffff000000000000000000000000000000006102a389614524565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107675785916107c5575b5061079d5767ffffffffffffffff61033789614524565b1661034f816000526007602052604060002054151590565b1561077257602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015610767578590610716575b73ffffffffffffffffffffffffffffffffffffffff91501633036106ea576064810135946103de8787613f1a565b7fffffffff0000000000000000000000000000000000000000000000000000000085169485156106c85761043a907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614a0e565b610456816104478b614503565b6104508d614524565b9061539a565b73ffffffffffffffffffffffffffffffffffffffff600354169384610597575b61058d8a61055c6105578e61048b8e8e613f1a565b9361049582614524565b506104e1857f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061540a565b7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61051d61051785614524565b93614503565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a2614524565b6146e7565b90610565614e47565b6040519261057284613c9e565b83526020830152604051928392604084526040840190613dfb565b9060208301520390f35b843b156106c4578694928a949286928d604051998a98899788967fa8027c0f0000000000000000000000000000000000000000000000000000000088526004880160809052806105e691615304565b6084890160a090526101248901906105fd92613f48565b9361060790613b53565b67ffffffffffffffff1660a488015260440161062290613b04565b73ffffffffffffffffffffffffffffffffffffffff1660c48701528d60e487015261064c90613b04565b73ffffffffffffffffffffffffffffffffffffffff16610104860152602485015283810360031901604485015261068291613b96565b90606483015203925af180156106b9576106a1575b8080808080610476565b6106ac828092613cf2565b6106b65780610697565b80fd5b6040513d84823e3d90fd5b8680fd5b506106e5816106d68b614503565b6106df8d614524565b90615354565b610456565b6024847f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d60201161075f575b8161073060209383613cf2565b8101031261075b5761075673ffffffffffffffffffffffffffffffffffffffff91613f27565b6103b0565b8480fd5b3d9150610723565b6040513d87823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008552600452602484fd5b6004847f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6107e7915060203d6020116107ed575b6107df8183613cf2565b810190614b7a565b38610320565b503d6107d5565b60248373ffffffffffffffffffffffffffffffffffffffff61081589614503565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b5080fd5b50346106b65760206003193601126106b65773ffffffffffffffffffffffffffffffffffffffff610871613a9b565b610879614b92565b163381146108e957807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346106b657806003193601126106b65760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346106b65760806003193601126106b65761096e613a9b565b50610977613b25565b61097f613a6c565b5060643567ffffffffffffffff8111610a8e579167ffffffffffffffff6040926109af60e0953690600401613b68565b50508260c085516109bf81613cd6565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b60205220604051906109f782613cd6565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346106b65760406003193601126106b65760043567ffffffffffffffff811161083e57610ac4903690600401613e25565b9060243567ffffffffffffffff81116111665790610ae784923690600401613e25565b939091610af2614b92565b83905b828210610fa75750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015610fa3578060051b8301358581121561075b5783016101208136031261075b5760405194610b5986613cba565b610b6282613b53565b8652602082013567ffffffffffffffff811161083e5782019436601f8701121561083e57853595610b9287613e87565b96610ba06040519889613cf2565b80885260208089019160051b8301019036821161075b5760208301905b828210610f74575050505060208701958652604083013567ffffffffffffffff8111610a8e57610bf09036908501613d98565b9160408801928352610c1a610c083660608701614793565b9460608a0195865260c0369101614793565b956080890196875283515115610f4c57610c3e67ffffffffffffffff8a511661582b565b15610f155767ffffffffffffffff8951168252600860205260408220610c65865182614e82565b610c73885160028301614e82565b6004855191019080519067ffffffffffffffff8211610ee857610c9683546145d2565b601f8111610ead575b50602090601f8311600114610e0e57610ced9291869183610e03575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610d275790610d21600192610d1a8367ffffffffffffffff8f51169261458f565b5190614bdd565b01610cf2565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610df567ffffffffffffffff6001979694985116925193519151610dc1610d8c60405196879687526101006020880152610100870190613b96565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610b28565b015190508e80610cbb565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610e955750908460019594939210610e5e575b505050811b019055610cf0565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610e51565b92936020600181928786015181550195019301610e3b565b610ed89084875260208720601f850160051c81019160208610610ede575b601f0160051c019061482f565b8d610c9f565b9091508190610ecb565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff81116106c457602091610f988392833691890101613d98565b815201910190610bbd565b8380f35b9267ffffffffffffffff610fc9610fc48486889a9699979a614766565b614524565b1691610fd483615561565b1561113a578284526008602052610ff0600560408620016154fe565b94845b86518110156110295760019085875260086020526110226005604089200161101b838b61458f565b51906156f7565b5001610ff3565b509396929094509490948087526008602052600560408820888155886001820155886002820155886003820155886004820161106581546145d2565b806110f9575b50505001805490888155816110db575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610af5565b885260208820908101905b8181101561107b578881556001016110e6565b601f811160011461110f5750555b888a8061106b565b8183526020832061112a91601f01861c81019060010161482f565b8082528160208120915555611107565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b8380fd5b50346106b65760206003193601126106b65760043567ffffffffffffffff811161083e5761119c903690600401613e56565b73ffffffffffffffffffffffffffffffffffffffff600a54163314158061134c575b61132057825b8181106111cf578380f35b6111da818385614709565b67ffffffffffffffff6111ec82614524565b1690611205826000526007602052604060002054151590565b156112f457907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e0836112b461128e602060019897018b61124682614719565b156112bb57879052600460205261126d60408d206112673660408801614793565b90614e82565b868c52600560205261128960408d206112673660a08801614793565b614719565b9160405192151583526112a760208401604083016147eb565b60a06080840191016147eb565ba2016111c4565b60026040828a611289945260086020526112dd82822061126736858c01614793565b8a8152600860205220016112673660a08801614793565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600154163314156111be565b50346106b657806003193601126106b657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106b65760406003193601126106b65760043567ffffffffffffffff811161083e576113f1903690600401613e56565b60243567ffffffffffffffff811161116657611411903690600401613e25565b91909261141c614b92565b845b82811061148857505050825b818110611435578380f35b8067ffffffffffffffff61144f610fc46001948688614766565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a20161142a565b67ffffffffffffffff61149f610fc4838686614709565b166114b7816000526007602052604060002054151590565b15611818576114c7828585614709565b602081019060e08101906114da82614719565b156117ec5760a0810161271061ffff6114f283614726565b1610156117dd5760c082019161271061ffff61150d85614726565b1610156117a55763ffffffff61152286614735565b161561177957858c52600b60205260408c2061153d86614735565b63ffffffff1690805490604084019161155583614735565b60201b67ffffffff000000001693606086019461157186614735565b60401b6bffffffff000000000000000016966080019661159088614735565b60601b6fffffffff00000000000000000000000016916115af8a614726565b60801b71ffff0000000000000000000000000000000016936115d08c614726565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff16171717815561168387614719565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016179055604051966116d490614746565b63ffffffff1687526116e590614746565b63ffffffff1660208701526116f990614746565b63ffffffff16604086015261170d90614746565b63ffffffff16606085015261172190614757565b61ffff16608084015261173390614757565b61ffff1660a083015261174590613bf5565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a260010161141e565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff6117b486614726565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff6117b4602493614726565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b613c02565b50346106b65760406003193601126106b65760043567ffffffffffffffff811161083e5761187a903690600401613e25565b90611883613ae1565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611a2e575b611a025773ffffffffffffffffffffffffffffffffffffffff83169081156119da57845b8181106118d5578580f35b73ffffffffffffffffffffffffffffffffffffffff6118fd6118f8838588614766565b614503565b1690604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa80156119cf5785908990611995575b6001945080611957575b505050016118ca565b6020816119867f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e938c8761540a565b604051908152a338848161194e565b5050909160203d81116119c8575b6119ad8183613cf2565b602082600092810103126106b6575090846001939251611944565b503d6119a3565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c54163314156118a6565b50346106b657806003193601126106b657604051906006548083528260208101600684526020842092845b818110611b62575050611a9092500383613cf2565b8151611ab4611a9e82613e87565b91611aac6040519384613cf2565b808352613e87565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611b13578067ffffffffffffffff611b006001938861458f565b5116611b0c828661458f565b5201611ae1565b50925090604051928392602084019060208552518091526040840192915b818110611b3f575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611b31565b8454835260019485019487945060209093019201611a7b565b50346106b65760206003193601126106b65760043573ffffffffffffffffffffffffffffffffffffffff811680910361083e57611bb6614b92565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b50346106b65760206003193601126106b657611c5b611c47610557613b3c565b604051918291602083526020830190613b96565b0390f35b50346106b65760206003193601126106b6577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611c9c613a09565b611ca4614b92565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346106b65760606003193601126106b657611d34613a9b565b90611d3d613ae1565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361116657611d67614b92565b73ffffffffffffffffffffffffffffffffffffffff82168015611e7d5794611e77917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346106b65767ffffffffffffffff611ebd36613db6565b929091611ec8614b92565b1691611ee1836000526007602052604060002054151590565b1561113a578284526008602052611f1060056040862001611f03368486613d33565b60208151910120906156f7565b15611f5557907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691611f4f604051928392602084526020840191613f48565b0390a280f35b82611f99836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613f48565b0390fd5b50346106b65760206003193601126106b65767ffffffffffffffff611fc0613b3c565b1681526008602052611fd7600560408320016154fe565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061201c61200683613e87565b926120146040519485613cf2565b808452613e87565b01835b8181106120f3575050825b825181101561207057806120406001928561458f565b518552600960205261205460408620614625565b61205e828561458f565b52612069818461458f565b500161202a565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106120a857505050500390f35b919360206120e3827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613b96565b9601920192018594939192612099565b80606060208093860101520161201f565b50346106b65760206003193601126106b65760043567ffffffffffffffff811161083e57806004019060a06003198236030112610a8e57612143614576565b506040516020936121548583613cf2565b808252608483019161216583614503565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361263f57602484019477ffffffffffffffff000000000000000000000000000000006121cb87614524565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156125c4578491612622575b506125fa5767ffffffffffffffff61225e87614524565b16612276816000526007602052604060002054151590565b156125cf578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156125c457849061257c575b73ffffffffffffffffffffffffffffffffffffffff9150163303612550576064850135946123108661230787614503565b6106df8a614524565b73ffffffffffffffffffffffffffffffffffffffff600354169182612435575b886124056105578a8a7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8c61236d85614524565b506123b9847f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061540a565b61054f6123ce6123c887614524565b92614503565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b9061240e614e47565b6040519261241b84613c9e565b835281830152611c5b604051928284938452830190613dfb565b823b1561075b57918791858094604051968795869485937fa8027c0f00000000000000000000000000000000000000000000000000000000855260048501608090528061248191615304565b6084860160a0905261012486019061249892613f48565b916124a290613b53565b67ffffffffffffffff1660a48501526044016124bd90613b04565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e48401526124e78b613b04565b73ffffffffffffffffffffffffffffffffffffffff1661010484015283602484015282810360031901604484015261251e91613b96565b8a606483015203925af180156106b95761253b575b808080612330565b612546828092613cf2565b6106b65780612533565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d83116125bd575b6125928183613cf2565b81010312611166576125b873ffffffffffffffffffffffffffffffffffffffff91613f27565b6122d6565b503d612588565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6126399150883d8a116107ed576107df8183613cf2565b38612247565b5073ffffffffffffffffffffffffffffffffffffffff610815602493614503565b50346106b657806003193601126106b657602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346106b65760206003193601126106b65760206126d067ffffffffffffffff6126bc613b3c565b166000526007602052604060002054151590565b6040519015158152f35b50346106b657806003193601126106b657805473ffffffffffffffffffffffffffffffffffffffff81163303612779577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346106b657806003193601126106b657600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346106b6576127fe36613db6565b61280a93929193614b92565b67ffffffffffffffff821661282c816000526007602052604060002054151590565b1561284b57506128489293612842913691613d33565b90614bdd565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346106b65760406003193601126106b657612890613b3c565b906024359067ffffffffffffffff82116106b65760206126d0846128b73660048701613d98565b90614539565b50346106b65760206003193601126106b6576004359067ffffffffffffffff82116106b657816004019061010060031984360301126106b6578060405161290381613c53565b528060405161291181613c53565b52606483013560c484019361294161293b61293661292f88886144b2565b3691613d33565b614846565b83614901565b93608482019561295087614503565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603612f7457602483019377ffffffffffffffff000000000000000000000000000000006129b686614524565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612ef7578791612f55575b50612f2d5767ffffffffffffffff612a4a86614524565b16612a62816000526007602052604060002054151590565b15612f0257602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115612ef7578791612ed8575b5015612eac57612ad985614524565b92612aef60a48601946128b761292f87856144b2565b15612e6557612b1088612b018b614503565b612b0a89614524565b9061521b565b73ffffffffffffffffffffffffffffffffffffffff600354169283612c93575b505050505060440191612b4283614503565b612b4b83614524565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b15610a8e576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481018690529082908290604490829084905af180156106b957612c7e575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612c4a612c446105177ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc097614524565b96614503565b816040519716875233898801521660408601528560608601521692a260405190612c7382613c53565b815260405190518152f35b612c89828092613cf2565b6106b65780612bef565b833b15612e6157878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612ce38780615304565b60648a0161010090526101648a0190612cfb92613f48565b94612d0590613b53565b67ffffffffffffffff166084890152604401612d2090613b04565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c4870152612d4990613b04565b73ffffffffffffffffffffffffffffffffffffffff1660e4860152612d6e9084615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612da39291613f48565b90612dae9083615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612de39291613f48565b9060e48a01612df191615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612e269291613f48565b8b602483015282604483015203925af180156125c457908491612e4c575b808080612b30565b81612e5691613cf2565b610a8e578238612e44565b8780fd5b83612e6f916144b2565b611f996040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613f48565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b612ef1915060203d6020116107ed576107df8183613cf2565b38612aca565b6040513d89823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612f6e915060203d6020116107ed576107df8183613cf2565b38612a33565b60248573ffffffffffffffffffffffffffffffffffffffff6108158a614503565b50346106b657806003193601126106b657602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346106b65760406003193601126106b6576004359067ffffffffffffffff82116106b657816004019061010060031984360301126106b65761300a613a3d565b918160405161301881613c53565b5260648401359360c481019361303d61303761293661292f88876144b2565b87614901565b94608483019661304c88614503565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361351b57602484019477ffffffffffffffff000000000000000000000000000000006130b287614524565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156119cf5788916134fc575b506134d45767ffffffffffffffff61314687614524565b1661315e816000526007602052604060002054151590565b156134a957602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156119cf57889161348a575b501561345e576131d586614524565b936131eb60a48701956128b761292f88866144b2565b15613454577fffffffff000000000000000000000000000000000000000000000000000000001690811561343957613235896132268c614503565b61322f8a614524565b90615294565b73ffffffffffffffffffffffffffffffffffffffff600354169384613268575b50505050505060440191612b4283614503565b843b1561343557868995938c959387938b6040519a8b998a9889977f6371157400000000000000000000000000000000000000000000000000000000895260048901606090526132b88780615304565b60648b0161010090526101648b01906132d092613f48565b946132da90613b53565b67ffffffffffffffff1660848a01526044016132f590613b04565b73ffffffffffffffffffffffffffffffffffffffff1660a489015260c488015261331e90613b04565b73ffffffffffffffffffffffffffffffffffffffff1660e48701526133439084615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526133789291613f48565b906133839083615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101248701526133b89291613f48565b9060e48b016133c691615304565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c858403016101448601526133fb9291613f48565b908c6024840152604483015203925af180156125c457613420575b8080808080613255565b9261342e8160449395613cf2565b9290613416565b8880fd5b61344f896134468c614503565b612b0a8a614524565b613235565b612e6f85836144b2565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6134a3915060203d6020116107ed576107df8183613cf2565b386131c6565b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b613515915060203d6020116107ed576107df8183613cf2565b3861312f565b60248673ffffffffffffffffffffffffffffffffffffffff6108158b614503565b50346106b657806003193601126106b657602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106b65760406003193601126106b657613594613b3c565b6024359182151583036106b6576101406136576135b1858561442f565b61360760409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346106b65760206003193601126106b657602090613676613a9b565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346106b657806003193601126106b657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106b65760c06003193601126106b657613728613a9b565b50613731613b25565b613739613abe565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036106b65760a4359067ffffffffffffffff82116106b65760a063ffffffff8061ffff61379e88886137973660048b01613b68565b505061427f565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346106b657806003193601126106b65750611c5b6040516137e8604082613cf2565b601c81527f4275726e546f41646472657373546f6b656e506f6f6c20322e302e30000000006020820152604051918291602083526020830190613b96565b50346106b65760c06003193601126106b657613840613a9b565b613848613b25565b906064357fffffffff00000000000000000000000000000000000000000000000000000000811681036111665760843567ffffffffffffffff811161075b57613895903690600401613b68565b9160a4359360028510156106c4576138b09560443591613f87565b90604051918291602083016020845282518091526020604085019301915b8181106138dc575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016138ce565b90503461083e57602060031936011261083e576020907fffffffff0000000000000000000000000000000000000000000000000000000061394a613a09565b167faff2afbf0000000000000000000000000000000000000000000000000000000081149081156139df575b81156139b5575b811561398b575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613984565b7f0e64dd29000000000000000000000000000000000000000000000000000000008114915061397d565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613976565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613a3857565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613a3857565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613a3857565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613a3857565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613a3857565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613a3857565b359073ffffffffffffffffffffffffffffffffffffffff82168203613a3857565b6024359067ffffffffffffffff82168203613a3857565b6004359067ffffffffffffffff82168203613a3857565b359067ffffffffffffffff82168203613a3857565b9181601f84011215613a385782359167ffffffffffffffff8311613a385760208381860195010111613a3857565b919082519283825260005b848110613be05750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613ba1565b35908115158203613a3857565b34613a38576000600319360112613a3857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6020810190811067ffffffffffffffff821117613c6f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613c6f57604052565b60a0810190811067ffffffffffffffff821117613c6f57604052565b60e0810190811067ffffffffffffffff821117613c6f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613c6f57604052565b92919267ffffffffffffffff8211613c6f5760405191613d7b601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613cf2565b829481845281830111613a38578281602093846000960137010152565b9080601f83011215613a3857816020613db393359101613d33565b90565b906040600319830112613a385760043567ffffffffffffffff81168103613a3857916024359067ffffffffffffffff8211613a3857613df791600401613b68565b9091565b613db3916020613e148351604084526040840190613b96565b920151906020818403910152613b96565b9181601f84011215613a385782359167ffffffffffffffff8311613a38576020808501948460051b010111613a3857565b9181601f84011215613a385782359167ffffffffffffffff8311613a38576020808501948460081b010111613a3857565b67ffffffffffffffff8111613c6f5760051b60200190565b81810292918115918404141715613eb257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613eeb570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613eb257565b519073ffffffffffffffffffffffffffffffffffffffff82168203613a3857565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff6003541695861561425d578097600287101561422e5773ffffffffffffffffffffffffffffffffffffffff986140e8957fffffffff0000000000000000000000000000000000000000000000000000000093896142045767ffffffffffffffff8216600052600b6020526040600020906040519161401f83613cd6565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c16151591829101526141b0575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613f48565b928180600095869560a483015203915afa9182156141a357819261410b57505090565b9091503d8083833e61411d8183613cf2565b810190602081830312610a8e5780519067ffffffffffffffff8211611166570181601f82011215610a8e5780519061415482613e87565b936141626040519586613cf2565b82855260208086019360051b8301019384116106b65750602001905b82821061418b5750505090565b6020809161419884613f27565b81520191019061417e565b50604051903d90823e3d90fd5b92935067ffffffffffffffff92858716156141ec57506127106141db61ffff6141e294511683613e9f565b0490613f1a565b915b903880614089565b6141fe92506141db6127109183613e9f565b916141e4565b67ffffffffffffffff9192506142289061422261293636898b613d33565b90614901565b91614097565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b5050505050505050604051614273602082613cf2565b60008152600036813790565b67ffffffffffffffff909291926142bd7fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614a0e565b16600052600b6020526040600020604051906142d882613cd6565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c08215910152614385577fffffffff000000000000000000000000000000000000000000000000000000001661437a57505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b604051906143ab82613cba565b60006080838281528260208201528260408201528260608201520152565b906040516143d681613cba565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161444161439e565b5061444a61439e565b5061447e57166000526008602052604060002090613db36144726002614477614472866143c9565b614af5565b94016143c9565b169081600052600460205261449961447260406000206143c9565b916000526005602052613db361447260406000206143c9565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613a38570180359067ffffffffffffffff8211613a3857602001918136038313613a3857565b3573ffffffffffffffffffffffffffffffffffffffff81168103613a385790565b3567ffffffffffffffff81168103613a385790565b9067ffffffffffffffff613db392166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b6040519061458382613c9e565b60606020838281520152565b80518210156145a35760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c9216801561461b575b60208310146145ec57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f16916145e1565b9060405191826000825492614639846145d2565b80845293600181169081156146a75750600114614660575b5061465e92500383613cf2565b565b90506000929192526020600020906000915b81831061468b57505090602061465e9282010138614651565b6020919350806001915483858901015201910190918492614672565b6020935061465e9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138614651565b67ffffffffffffffff166000526008602052613db36004604060002001614625565b91908110156145a35760081b0190565b358015158103613a385790565b3561ffff81168103613a385790565b3563ffffffff81168103613a385790565b359063ffffffff82168203613a3857565b359061ffff82168203613a3857565b91908110156145a35760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613a3857565b9190826060910312613a38576040516060810181811067ffffffffffffffff821117613c6f5760405260406147e68183956147cd81613bf5565b85526147db60208201614776565b602086015201614776565b910152565b6fffffffffffffffffffffffffffffffff6148296040809361480c81613bf5565b151586528361481d60208301614776565b16602087015201614776565b16910152565b81811061483a575050565b6000815560010161482f565b805180156148b657602003614878578051602082810191830183900312613a3857519060ff8211614878575060ff1690565b611f99906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613b96565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613eb257565b60ff16604d8111613eb257600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614a07578284116149dd5790614946916148dc565b91604d60ff84161180156149a4575b61496e57505090614968613db3926148f0565b90613e9f565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b506149ae836148f0565b8015613eeb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411614955565b6149e6916148dc565b91604d60ff84161161496e57505090614a01613db3926148f0565b90613ee1565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614af057614a4181615140565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614af05761ffff8360e01c168015918215614adf575b5050614a8b575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614a81565b505050565b614afd61439e565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614b5a6020850193614b54614b4763ffffffff87511642613f1a565b8560808901511690613e9f565b90615133565b80821015614b7357505b16825263ffffffff4216905290565b9050614b64565b90816020910312613a3857518015158103613a385790565b73ffffffffffffffffffffffffffffffffffffffff600154163303614bb357565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614e1d5767ffffffffffffffff81516020830120921691826000526008602052614c1281600560406000200161588b565b15614dd95760005260096020526040600020815167ffffffffffffffff8111613c6f57614c3f82546145d2565b601f8111614da7575b506020601f8211600114614ce15791614cbb827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614cd195600091614cd6575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613b96565b0390a2565b905084015138614c8a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614d8f575092614cd19492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614d58575b5050811b019055611c47565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614d4c565b9192602060018192868a015181550194019201614d11565b614dd390836000526020600020601f840160051c81019160208510610ede57601f0160051c019061482f565b38614c48565b5090611f996040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613b96565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613db3604082613cf2565b815191929115615004576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff60208501511610614fa15761465e91925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615002604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408401511615801590615093575b6150325761465e9192614ec5565b606483615002604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615024565b906127109167ffffffffffffffff6150cc60208301614524565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561511d57606061ffff615119935460901c16910135613e9f565b0490565b606061ffff615119935460801c16910135613e9f565b91908201809211613eb257565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115615217577dffff0000000000000000000000000000000000000000000000000000000081161561520e5760ff60015b169060f01c806151d8575b506001036151ab5750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b601081106151e957506151a0565b6001811b82166151fc575b6001016151db565b9160018101809111613eb257916151f4565b60ff6000615195565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c921692836000526008602052615264818360026040600020016158e0565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614cd1565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156152f95750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f991836000526005602052615264818360406000206158e0565b9061465e935061521b565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613a3857016020813591019167ffffffffffffffff8211613a38578136038313613a3857565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da8178944921692836000526008602052615264818360406000206158e0565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c16156153ff5750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e91836000526004602052615264818360406000206158e0565b9061465e9350615354565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff9490941660248301526044808301959095529381529092600091615470606482613cf2565b519082855af1156154f2576000513d6154e9575073ffffffffffffffffffffffffffffffffffffffff81163b155b6154a55750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b6001141561549e565b6040513d6000823e3d90fd5b906040519182815491828252602082019060005260206000209260005b81811061553057505061465e92500383613cf2565b845483526001948501948794506020909301920161551b565b80548210156145a35760005260206000200190600090565b60008181526007602052604090205480156156f0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613eb257600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613eb257818103615681575b5050506006548015615652577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161560f816006615549565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6156d86156926156a3936006615549565b90549060031b1c9283926006615549565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005260076020526040600020553880806155d6565b5050600090565b9060018201918160005282602052604060002054801515600014615822577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613eb2578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613eb2578181036157eb575b50505080548015615652577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906157ac8282615549565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61580b6157fb6156a39386615549565b90549060031b1c92839286615549565b905560005283602052604060002055388080615774565b50505050600090565b806000526007602052604060002054156000146158855760065468010000000000000000811015613c6f5761586c6156a38260018594016006556006615549565b9055600654906000526007602052604060002055600190565b50600090565b60008281526001820160205260409020546156f05780549068010000000000000000821015613c6f57826158c96156a3846001809601855584615549565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615b94575b615b8e576fffffffffffffffffffffffffffffffff8216916001850190815461593863ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613f1a565b9081615af0575b5050848110615aa4575083831061599957505061596e6fffffffffffffffffffffffffffffffff928392613f1a565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c928315615a3857816159b191613f1a565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613eb2576159ff615a049273ffffffffffffffffffffffffffffffffffffffff96615133565b613ee1565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615b6457615b0b92614b549160801c90613e9f565b80841015615b5f5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff000000000000000000000000000000001617865592388061593f565b615b16565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b5082156158f356fea164736f6c634300081a000a" - -type BurnToAddressMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnToAddressMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnToAddressMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnToAddressMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnToAddressMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnToAddressMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnToAddressMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address - BurnAddress common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + BurnAddress common.Address `json:"burnAddress"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-to-address-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnToAddressMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnToAddressMintTokenPoolABI, - Bin: BurnToAddressMintTokenPoolBin, - }, + Name: "burn-to-address-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnToAddressMintTokenPool contract", + ContractMetadata: gobindings.BurnToAddressMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnToAddressMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnToAddressMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go b/chains/evm/deployment/v2_0_0/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go index 7fe49c7099..56031c3d07 100644 --- a/chains/evm/deployment/v2_0_0/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go @@ -3,80 +3,33 @@ package burn_with_from_mint_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/burn_with_from_mint_token_pool" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "BurnWithFromMintTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const BurnWithFromMintTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const BurnWithFromMintTokenPoolBin = "0x60e080604052346102aa5760a081615ee1803803809161001f82856102fb565b8339810103126102aa5780516001600160a01b03811691908290036102aa5761004a60208201610334565b61005660408301610342565b9061006f608061006860608601610342565b9401610342565b9233156102ea57600180546001600160a01b03191633179055841580156102d9575b80156102c8575b6102b7578460805260c052308403610220575b60a052600380546001600160a01b039283166001600160a01b0319918216179091556002805493909216921691909117905560405163095ea7b360e01b60208083019182523060248401526000196044808501919091528352906000906101136064856102fb565b83519082865af16000513d82610204575b5050156101bf575b604051615b2390816103be823960805181818161023e01528181610491015281816122700152818161244801528181612ab501528181612cb0015281816131a20152818161374f01526137a9015260a05181818161361501528181614928015281816149720152614ebc015260c0518181816102d9015281816113f50152818161230a01528181612b50015261323d0152f35b6101fd916101f860405163095ea7b360e01b602082015230602482015260006044820152604481526101f26064826102fb565b82610356565b610356565b388061012c565b9091506102185750813b15155b3880610124565b600114610211565b60405163313ce56760e01b8152602081600481885afa60009181610276575b5061024b575b506100ab565b60ff1660ff821681810361025f5750610245565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116102af575b81610292602093836102fb565b810103126102aa576102a390610334565b903861023f565b600080fd5b3d9150610285565b630a64406560e11b60005260046000fd5b506001600160a01b03811615610098565b506001600160a01b03841615610091565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761031e57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff821682036102aa57565b51906001600160a01b03821682036102aa57565b906000602091828151910182855af1156103b1576000513d6103a857506001600160a01b0381163b155b6103875750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b60011415610380565b6040513d6000823e3d90fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146139ca5750806306b859ef146138e5578063181f5a77146138845780631826b1e7146137cd57806321df0da71461377c578063240028e8146137185780632422ac451461363957806324f65ee7146135fb5780632cab0fb61461310757806337a3210d146130d35780633907753714612a0a5780634c5ef0ed146129c357806362ddd3c41461293c5780637437ff9f146128ee57806379ba5097146128275780638926f54f146127e15780638da5cb5b146127ad5780639a4575b9146121f7578063a42a7b8b14612090578063acfecf9114611f98578063ae39a25714611e0d578063b6cfa3b714611d52578063b794658014611d1a578063bfeffd3f14611c6e578063c4bffe2b14611b43578063c7230a601461189d578063dc04fa1f14611419578063dc0bd971146113c8578063dcbd41bc146111c4578063e8a1da1714610ae8578063ea6396db146109aa578063ec6ae7a714610967578063f2fde38b146108985763fbc801a71461019757600080fd5b346105db5760606003193601126105db576004359067ffffffffffffffff82116105db578160040160a060031984360301126105e9576101d5613afc565b9060443567ffffffffffffffff811161070f57906101fa610217923690600401613c27565b92906102046145e4565b5061020f8584615120565b933691613da1565b92608486019361022685614571565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361084e57602487019677ffffffffffffffff0000000000000000000000000000000061028c89614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c157889161081f575b506107f75767ffffffffffffffff61032089614592565b16610338816000526007602052604060002054151590565b156107cc57602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156107c1578890610770575b73ffffffffffffffffffffffffffffffffffffffff9150163303610744576064810135936103c78686613f88565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561072257610423907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614a7c565b61043f816104308a614571565b6104398d614592565b90615408565b73ffffffffffffffffffffffffffffffffffffffff6003541693846105ed575b5050505050509061046f91613f88565b9161047984614592565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105e9576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152306004820152602481018590529082908290604490829084905af180156105de576105c6575b6105bc8461058b61058688877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61054c61054685614592565b93614571565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a2614592565b614755565b90610594614eb5565b604051926105a184613d0c565b83526020830152604051928392604084526040840190613e69565b9060208301520390f35b6105d1828092613d60565b6105db5780610504565b80fd5b6040513d84823e3d90fd5b5080fd5b843b1561071e578994928b9694928692604051988997889687957fa8027c0f00000000000000000000000000000000000000000000000000000000875260048701608090528061063c91615372565b6084880160a0905261012488019061065392613fb6565b9261065d90613c12565b67ffffffffffffffff1660a487015260440161067890613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660c48601528d8c60e48701526106a390613bc3565b73ffffffffffffffffffffffffffffffffffffffff1661010486015260248501528381036003190160448501526106d991613c55565b90606483015203925af18015610713579085916106fa575b8080808061045f565b8161070491613d60565b61070f5783386106f1565b8380fd5b6040513d87823e3d90fd5b8980fd5b5061073f816107308a614571565b6107398d614592565b906153c2565b61043f565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d6020116107b9575b8161078a60209383613d60565b810103126107b5576107b073ffffffffffffffffffffffffffffffffffffffff91613f95565b610399565b8780fd5b3d915061077d565b6040513d8a823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b610841915060203d602011610847575b6108398183613d60565b810190614be8565b38610309565b503d61082f565b60248673ffffffffffffffffffffffffffffffffffffffff61086f88614571565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b50346105db5760206003193601126105db5773ffffffffffffffffffffffffffffffffffffffff6108c7613b5a565b6108cf614c00565b1633811461093f57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346105db57806003193601126105db5760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346105db5760806003193601126105db576109c4613b5a565b506109cd613be4565b6109d5613b2b565b5060643567ffffffffffffffff8111610ae4579167ffffffffffffffff604092610a0560e0953690600401613c27565b50508260c08551610a1581613d44565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610a4d82613d44565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e957610b1a903690600401613e93565b9060243567ffffffffffffffff811161070f5790610b3d84923690600401613e93565b939091610b48614c00565b83905b8282106110055750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015611001578060051b83013585811215610ffd57830161012081360312610ffd5760405194610baf86613d28565b610bb882613c12565b8652602082013567ffffffffffffffff81116105e95782019436601f870112156105e957853595610be887613ef5565b96610bf66040519889613d60565b80885260208089019160051b83010190368211610ffd5760208301905b828210610fca575050505060208701958652604083013567ffffffffffffffff8111610ae457610c469036908501613e06565b9160408801928352610c70610c5e3660608701614801565b9460608a0195865260c0369101614801565b956080890196875283515115610fa257610c9467ffffffffffffffff8a51166157a5565b15610f6b5767ffffffffffffffff8951168252600860205260408220610cbb865182614ef0565b610cc9885160028301614ef0565b6004855191019080519067ffffffffffffffff8211610f3e57610cec8354614640565b601f8111610f03575b50602090601f8311600114610e6457610d439291869183610e59575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610d7d5790610d77600192610d708367ffffffffffffffff8f5116926145fd565b5190614c4b565b01610d48565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e4b67ffffffffffffffff6001979694985116925193519151610e17610de260405196879687526101006020880152610100870190613c55565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610b7e565b015190508e80610d11565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610eeb5750908460019594939210610eb4575b505050811b019055610d46565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610ea7565b92936020600181928786015181550195019301610e91565b610f2e9084875260208720601f850160051c81019160208610610f34575b601f0160051c019061489d565b8d610cf5565b9091508190610f21565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111610ff957602091610fee8392833691890101613e06565b815201910190610c13565b8680fd5b8480fd5b8380f35b9267ffffffffffffffff6110276110228486889a9699979a6147d4565b614592565b1691611032836154db565b1561119857828452600860205261104e60056040862001615478565b94845b865181101561108757600190858752600860205261108060056040892001611079838b6145fd565b5190615671565b5001611051565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110c38154614640565b80611157575b5050500180549088815581611139575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610b4b565b885260208820908101905b818110156110d957888155600101611144565b601f811160011461116d5750555b888a806110c9565b8183526020832061118891601f01861c81019060010161489d565b8082528160208120915555611165565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346105db5760206003193601126105db5760043567ffffffffffffffff81116105e9576111f6903690600401613ec4565b73ffffffffffffffffffffffffffffffffffffffff600a5416331415806113a6575b61137a57825b818110611229578380f35b611234818385614777565b67ffffffffffffffff61124682614592565b169061125f826000526007602052604060002054151590565b1561134e57907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e08361130e6112e8602060019897018b6112a082614787565b156113155787905260046020526112c760408d206112c13660408801614801565b90614ef0565b868c5260056020526112e360408d206112c13660a08801614801565b614787565b9160405192151583526113016020840160408301614859565b60a0608084019101614859565ba20161121e565b60026040828a6112e3945260086020526113378282206112c136858c01614801565b8a8152600860205220016112c13660a08801614801565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611218565b50346105db57806003193601126105db57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e95761144b903690600401613ec4565b60243567ffffffffffffffff811161070f5761146b903690600401613e93565b919092611476614c00565b845b8281106114e257505050825b81811061148f578380f35b8067ffffffffffffffff6114a961102260019486886147d4565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a201611484565b67ffffffffffffffff6114f9611022838686614777565b16611511816000526007602052604060002054151590565b1561187257611521828585614777565b602081019060e081019061153482614787565b156118465760a0810161271061ffff61154c83614794565b1610156118375760c082019161271061ffff61156785614794565b1610156117ff5763ffffffff61157c866147a3565b16156117d357858c52600b60205260408c20611597866147a3565b63ffffffff169080549060408401916115af836147a3565b60201b67ffffffff00000000169360608601946115cb866147a3565b60401b6bffffffff00000000000000001696608001966115ea886147a3565b60601b6fffffffff00000000000000000000000016916116098a614794565b60801b71ffff00000000000000000000000000000000169361162a8c614794565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556116dd87614787565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661172e906147b4565b63ffffffff16875261173f906147b4565b63ffffffff166020870152611753906147b4565b63ffffffff166040860152611767906147b4565b63ffffffff16606085015261177b906147c5565b61ffff16608084015261178d906147c5565b61ffff1660a083015261179f90613cb4565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a2600101611478565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61180e86614794565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61180e602493614794565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346105db5760406003193601126105db5760043567ffffffffffffffff81116105e9576118cf903690600401613e93565b906118d8613ba0565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611b21575b611af55773ffffffffffffffffffffffffffffffffffffffff8316908115611acd57845b81811061192a578580f35b73ffffffffffffffffffffffffffffffffffffffff61195261194d8385886147d4565b614571565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa9081156107c1578891611a9a575b50806119a7575b505060010161191f565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a9190611a08606482613d60565b519082865af115611a8f5787513d611a865750813b155b611a5a5790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a3903861199d565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611a1f565b6040513d89823e3d90fd5b905060203d8111611ac6575b611ab08183613d60565b602082600092810103126105db57505138611996565b503d611aa6565b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c54163314156118fb565b50346105db57806003193601126105db57604051906006548083528260208101600684526020842092845b818110611c55575050611b8392500383613d60565b8151611ba7611b9182613ef5565b91611b9f6040519384613d60565b808352613ef5565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611c06578067ffffffffffffffff611bf3600193886145fd565b5116611bff82866145fd565b5201611bd4565b50925090604051928392602084019060208552518091526040840192915b818110611c32575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611c24565b8454835260019485019487945060209093019201611b6e565b50346105db5760206003193601126105db5760043573ffffffffffffffffffffffffffffffffffffffff81168091036105e957611ca9614c00565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b50346105db5760206003193601126105db57611d4e611d3a610586613bfb565b604051918291602083526020830190613c55565b0390f35b50346105db5760206003193601126105db577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611d8f613ac8565b611d97614c00565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346105db5760606003193601126105db57611e27613b5a565b90611e30613ba0565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361070f57611e5a614c00565b73ffffffffffffffffffffffffffffffffffffffff82168015611f705794611f6a917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346105db5767ffffffffffffffff611fb036613e24565b929091611fbb614c00565b1691611fd4836000526007602052604060002054151590565b1561119857828452600860205261200360056040862001611ff6368486613da1565b6020815191012090615671565b1561204857907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691612042604051928392602084526020840191613fb6565b0390a280f35b8261208c836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613fb6565b0390fd5b50346105db5760206003193601126105db5767ffffffffffffffff6120b3613bfb565b16815260086020526120ca60056040832001615478565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061210f6120f983613ef5565b926121076040519485613d60565b808452613ef5565b01835b8181106121e6575050825b82518110156121635780612133600192856145fd565b518552600960205261214760408620614693565b61215182856145fd565b5261215c81846145fd565b500161211d565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061219b57505050500390f35b919360206121d6827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613c55565b960192019201859493919261218c565b806060602080938601015201612112565b50346105db5760206003193601126105db5760043567ffffffffffffffff81116105e957806004019060a06003198236030112610ae4576122366145e4565b506040516020936122478583613d60565b808252608483019161225883614571565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361278c57602484019477ffffffffffffffff000000000000000000000000000000006122be87614592565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561271157849161276f575b506127475767ffffffffffffffff61235187614592565b16612369816000526007602052604060002054151590565b1561271c578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156127115784906126c9575b73ffffffffffffffffffffffffffffffffffffffff915016330361269d57606485013594612403866123fa87614571565b6107398a614592565b73ffffffffffffffffffffffffffffffffffffffff600354169182612580575b5050505061243084614592565b5073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b156105e9576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152306004820152602481018590529082908290604490829084905af180156105de5761256b575b8561253b61058687877ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8961057e6125046124fe87614592565b92614571565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b90612544614eb5565b6040519261255184613d0c565b835281830152611d4e604051928284938452830190613e69565b612576828092613d60565b6105db57806124bb565b823b15610ffd57918791858094604051968795869485937fa8027c0f0000000000000000000000000000000000000000000000000000000085526004850160809052806125cc91615372565b6084860160a090526101248601906125e392613fb6565b916125ed90613c12565b67ffffffffffffffff1660a485015260440161260890613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e48401526126328b613bc3565b73ffffffffffffffffffffffffffffffffffffffff1661010484015283602484015282810360031901604484015261266991613c55565b8a606483015203925af180156105de57908291612688575b8080612423565b8161269291613d60565b6105db578038612681565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d831161270a575b6126df8183613d60565b8101031261070f5761270573ffffffffffffffffffffffffffffffffffffffff91613f95565b6123c9565b503d6126d5565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6127869150883d8a11610847576108398183613d60565b3861233a565b5073ffffffffffffffffffffffffffffffffffffffff61086f602493614571565b50346105db57806003193601126105db57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346105db5760206003193601126105db57602061281d67ffffffffffffffff612809613bfb565b166000526007602052604060002054151590565b6040519015158152f35b50346105db57806003193601126105db57805473ffffffffffffffffffffffffffffffffffffffff811633036128c6577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346105db57806003193601126105db57600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346105db5761294b36613e24565b61295793929193614c00565b67ffffffffffffffff8216612979816000526007602052604060002054151590565b156129985750612995929361298f913691613da1565b90614c4b565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346105db5760406003193601126105db576129dd613bfb565b906024359067ffffffffffffffff82116105db57602061281d84612a043660048701613e06565b906145a7565b50346105db5760206003193601126105db576004359067ffffffffffffffff82116105db57816004019061010060031984360301126105db5780604051612a5081613cc1565b5280604051612a5e81613cc1565b52606483013560c4840193612a8e612a88612a83612a7c8888614520565b3691613da1565b6148b4565b8361496f565b936084820195612a9d87614571565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036130b257602483019377ffffffffffffffff00000000000000000000000000000000612b0386614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a8f578791613093575b5061306b5767ffffffffffffffff612b9786614592565b16612baf816000526007602052604060002054151590565b1561304057602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611a8f578791613021575b5015612ff557612c2685614592565b92612c3c60a4860194612a04612a7c8785614520565b15612fae57612c5d88612c4e8b614571565b612c5789614592565b90615289565b73ffffffffffffffffffffffffffffffffffffffff600354169283612de0575b505050505060440191612c8f83614571565b612c9883614592565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b15610ae4576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152602481018690529082908290604490829084905af180156105de57612dcb575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612d97612d916105467ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc097614592565b96614571565b816040519716875233898801521660408601528560608601521692a260405190612dc082613cc1565b815260405190518152f35b612dd6828092613d60565b6105db5780612d3c565b833b156107b557878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612e308780615372565b60648a0161010090526101648a0190612e4892613fb6565b94612e5290613c12565b67ffffffffffffffff166084890152604401612e6d90613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c4870152612e9690613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660e4860152612ebb9084615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612ef09291613fb6565b90612efb9083615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612f309291613fb6565b9060e48a01612f3e91615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612f739291613fb6565b8b602483015282604483015203925af1801561271157908491612f99575b808080612c7d565b81612fa391613d60565b610ae4578238612f91565b83612fb891614520565b61208c6040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613fb6565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b61303a915060203d602011610847576108398183613d60565b38612c17565b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6130ac915060203d602011610847576108398183613d60565b38612b80565b60248573ffffffffffffffffffffffffffffffffffffffff61086f8a614571565b50346105db57806003193601126105db57602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346105db5760406003193601126105db576004359067ffffffffffffffff82116105db57816004019061010060031984360301126105db57613148613afc565b918160405161315681613cc1565b5260648401359360c481019361317b613175612a83612a7c8887614520565b8761496f565b94608483019661318a88614571565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036135da57602484019477ffffffffffffffff000000000000000000000000000000006131f087614592565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c15788916135bb575b506107f75767ffffffffffffffff61328487614592565b1661329c816000526007602052604060002054151590565b156107cc57602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156107c157889161359c575b50156107445761331386614592565b9361332960a4870195612a04612a7c8886614520565b15613592577fffffffff000000000000000000000000000000000000000000000000000000001690811561357757613373896133648c614571565b61336d8a614592565b90615302565b73ffffffffffffffffffffffffffffffffffffffff6003541693846133a6575b50505050505060440191612c8f83614571565b843b1561357357868995938c959387938b6040519a8b998a9889977f6371157400000000000000000000000000000000000000000000000000000000895260048901606090526133f68780615372565b60648b0161010090526101648b019061340e92613fb6565b9461341890613c12565b67ffffffffffffffff1660848a015260440161343390613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660a489015260c488015261345c90613bc3565b73ffffffffffffffffffffffffffffffffffffffff1660e48701526134819084615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526134b69291613fb6565b906134c19083615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101248701526134f69291613fb6565b9060e48b0161350491615372565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c858403016101448601526135399291613fb6565b908c6024840152604483015203925af180156127115761355e575b8080808080613393565b9261356c8160449395613d60565b9290613554565b8880fd5b61358d896135848c614571565b612c578a614592565b613373565b612fb88583614520565b6135b5915060203d602011610847576108398183613d60565b38613304565b6135d4915060203d602011610847576108398183613d60565b3861326d565b60248673ffffffffffffffffffffffffffffffffffffffff61086f8b614571565b50346105db57806003193601126105db57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760406003193601126105db57613653613bfb565b6024359182151583036105db57610140613716613670858561449d565b6136c660409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346105db5760206003193601126105db57602090613735613b5a565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346105db57806003193601126105db57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105db5760c06003193601126105db576137e7613b5a565b506137f0613be4565b6137f8613b7d565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036105db5760a4359067ffffffffffffffff82116105db5760a063ffffffff8061ffff61385d88886138563660048b01613c27565b50506142ed565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346105db57806003193601126105db5750611d4e6040516138a7604082613d60565b601f81527f4275726e5769746846726f6d4d696e74546f6b656e506f6f6c20322e302e30006020820152604051918291602083526020830190613c55565b50346105db5760c06003193601126105db576138ff613b5a565b613907613be4565b906064357fffffffff000000000000000000000000000000000000000000000000000000008116810361070f5760843567ffffffffffffffff8111610ffd57613954903690600401613c27565b9160a435936002851015610ff95761396f9560443591613ff5565b90604051918291602083016020845282518091526020604085019301915b81811061399b575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff1684528594506020938401939092019160010161398d565b9050346105e95760206003193601126105e9576020907fffffffff00000000000000000000000000000000000000000000000000000000613a09613ac8565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613a9e575b8115613a74575b8115613a4a575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613a43565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613a3c565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613a35565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613af757565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b359073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b6024359067ffffffffffffffff82168203613af757565b6004359067ffffffffffffffff82168203613af757565b359067ffffffffffffffff82168203613af757565b9181601f84011215613af75782359167ffffffffffffffff8311613af75760208381860195010111613af757565b919082519283825260005b848110613c9f5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613c60565b35908115158203613af757565b6020810190811067ffffffffffffffff821117613cdd57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613cdd57604052565b60a0810190811067ffffffffffffffff821117613cdd57604052565b60e0810190811067ffffffffffffffff821117613cdd57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613cdd57604052565b92919267ffffffffffffffff8211613cdd5760405191613de9601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613d60565b829481845281830111613af7578281602093846000960137010152565b9080601f83011215613af757816020613e2193359101613da1565b90565b906040600319830112613af75760043567ffffffffffffffff81168103613af757916024359067ffffffffffffffff8211613af757613e6591600401613c27565b9091565b613e21916020613e828351604084526040840190613c55565b920151906020818403910152613c55565b9181601f84011215613af75782359167ffffffffffffffff8311613af7576020808501948460051b010111613af757565b9181601f84011215613af75782359167ffffffffffffffff8311613af7576020808501948460081b010111613af757565b67ffffffffffffffff8111613cdd5760051b60200190565b81810292918115918404141715613f2057565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613f59570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613f2057565b519073ffffffffffffffffffffffffffffffffffffffff82168203613af757565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff600354169586156142cb578097600287101561429c5773ffffffffffffffffffffffffffffffffffffffff98614156957fffffffff0000000000000000000000000000000000000000000000000000000093896142725767ffffffffffffffff8216600052600b6020526040600020906040519161408d83613d44565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c161515918291015261421e575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613fb6565b928180600095869560a483015203915afa91821561421157819261417957505090565b9091503d8083833e61418b8183613d60565b810190602081830312610ae45780519067ffffffffffffffff821161070f570181601f82011215610ae4578051906141c282613ef5565b936141d06040519586613d60565b82855260208086019360051b8301019384116105db5750602001905b8282106141f95750505090565b6020809161420684613f95565b8152019101906141ec565b50604051903d90823e3d90fd5b92935067ffffffffffffffff928587161561425a575061271061424961ffff61425094511683613f0d565b0490613f88565b915b9038806140f7565b61426c92506142496127109183613f0d565b91614252565b67ffffffffffffffff91925061429690614290612a8336898b613da1565b9061496f565b91614105565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516142e1602082613d60565b60008152600036813790565b67ffffffffffffffff9092919261432b7fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614a7c565b16600052600b60205260406000206040519061434682613d44565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526143f3577fffffffff00000000000000000000000000000000000000000000000000000000166143e857505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b6040519061441982613d28565b60006080838281528260208201528260408201528260608201520152565b9060405161444481613d28565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff916144af61440c565b506144b861440c565b506144ec57166000526008602052604060002090613e216144e060026144e56144e086614437565b614b63565b9401614437565b16908160005260046020526145076144e06040600020614437565b916000526005602052613e216144e06040600020614437565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613af7570180359067ffffffffffffffff8211613af757602001918136038313613af757565b3573ffffffffffffffffffffffffffffffffffffffff81168103613af75790565b3567ffffffffffffffff81168103613af75790565b9067ffffffffffffffff613e2192166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b604051906145f182613d0c565b60606020838281520152565b80518210156146115760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c92168015614689575b602083101461465a57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161464f565b90604051918260008254926146a784614640565b808452936001811690811561471557506001146146ce575b506146cc92500383613d60565b565b90506000929192526020600020906000915b8183106146f95750509060206146cc92820101386146bf565b60209193508060019154838589010152019101909184926146e0565b602093506146cc9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101386146bf565b67ffffffffffffffff166000526008602052613e216004604060002001614693565b91908110156146115760081b0190565b358015158103613af75790565b3561ffff81168103613af75790565b3563ffffffff81168103613af75790565b359063ffffffff82168203613af757565b359061ffff82168203613af757565b91908110156146115760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613af757565b9190826060910312613af7576040516060810181811067ffffffffffffffff821117613cdd57604052604061485481839561483b81613cb4565b8552614849602082016147e4565b6020860152016147e4565b910152565b6fffffffffffffffffffffffffffffffff6148976040809361487a81613cb4565b151586528361488b602083016147e4565b166020870152016147e4565b16910152565b8181106148a8575050565b6000815560010161489d565b80518015614924576020036148e6578051602082810191830183900312613af757519060ff82116148e6575060ff1690565b61208c906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613c55565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613f2057565b60ff16604d8111613f2057600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614a7557828411614a4b57906149b49161494a565b91604d60ff8416118015614a12575b6149dc575050906149d6613e219261495e565b90613f0d565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614a1c8361495e565b8015613f59577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0484116149c3565b614a549161494a565b91604d60ff8416116149dc57505090614a6f613e219261495e565b90613f4f565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614b5e57614aaf816151ae565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614b5e5761ffff8360e01c168015918215614b4d575b5050614af9575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614aef565b505050565b614b6b61440c565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614bc86020850193614bc2614bb563ffffffff87511642613f88565b8560808901511690613f0d565b906151a1565b80821015614be157505b16825263ffffffff4216905290565b9050614bd2565b90816020910312613af757518015158103613af75790565b73ffffffffffffffffffffffffffffffffffffffff600154163303614c2157565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614e8b5767ffffffffffffffff81516020830120921691826000526008602052614c80816005604060002001615805565b15614e475760005260096020526040600020815167ffffffffffffffff8111613cdd57614cad8254614640565b601f8111614e15575b506020601f8211600114614d4f5791614d29827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614d3f95600091614d44575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613c55565b0390a2565b905084015138614cf8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614dfd575092614d3f9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614dc6575b5050811b019055611d3a565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614dba565b9192602060018192868a015181550194019201614d7f565b614e4190836000526020600020601f840160051c81019160208510610f3457601f0160051c019061489d565b38614cb6565b509061208c6040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613c55565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613e21604082613d60565b815191929115615072576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff6020850151161061500f576146cc91925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615070604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408401511615801590615101575b6150a0576146cc9192614f33565b606483615070604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615092565b906127109167ffffffffffffffff61513a60208301614592565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561518b57606061ffff615187935460901c16910135613f0d565b0490565b606061ffff615187935460801c16910135613f0d565b91908201809211613f2057565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115615285577dffff0000000000000000000000000000000000000000000000000000000081161561527c5760ff60015b169060f01c80615246575b506001036152195750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b60108110615257575061520e565b6001811b821661526a575b600101615249565b9160018101809111613f205791615262565b60ff6000615203565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9216928360005260086020526152d28183600260406000200161585a565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614d3f565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156153675750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f9918360005260056020526152d28183604060002061585a565b906146cc9350615289565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613af757016020813591019167ffffffffffffffff8211613af7578136038313613af757565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449216928360005260086020526152d28183604060002061585a565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c161561546d5750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e918360005260046020526152d28183604060002061585a565b906146cc93506153c2565b906040519182815491828252602082019060005260206000209260005b8181106154aa5750506146cc92500383613d60565b8454835260019485019487945060209093019201615495565b80548210156146115760005260206000200190600090565b600081815260076020526040902054801561566a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f2057600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f20578181036155fb575b50505060065480156155cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016155898160066154c3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b61565261560c61561d9360066154c3565b90549060031b1c92839260066154c3565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526007602052604060002055388080615550565b5050600090565b906001820191816000528260205260406000205480151560001461579c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613f20578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613f2057818103615765575b505050805480156155cc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061572682826154c3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b61578561577561561d93866154c3565b90549060031b1c928392866154c3565b9055600052836020526040600020553880806156ee565b50505050600090565b806000526007602052604060002054156000146157ff5760065468010000000000000000811015613cdd576157e661561d82600185940160065560066154c3565b9055600654906000526007602052604060002055600190565b50600090565b600082815260018201602052604090205461566a5780549068010000000000000000821015613cdd578261584361561d8460018096018555846154c3565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615b0e575b615b08576fffffffffffffffffffffffffffffffff821691600185019081546158b263ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613f88565b9081615a6a575b5050848110615a1e57508383106159135750506158e86fffffffffffffffffffffffffffffffff928392613f88565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c9283156159b2578161592b91613f88565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613f205761597961597e9273ffffffffffffffffffffffffffffffffffffffff966151a1565b613f4f565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615ade57615a8592614bc29160801c90613f0d565b80841015615ad95750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff00000000000000000000000000000000161786559238806158b9565b615a90565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561586d56fea164736f6c634300081a000a" - -type BurnWithFromMintTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewBurnWithFromMintTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*BurnWithFromMintTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(BurnWithFromMintTokenPoolABI)) - if err != nil { - return nil, err - } - return &BurnWithFromMintTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *BurnWithFromMintTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *BurnWithFromMintTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "burn-with-from-mint-token-pool:deploy", - Version: Version, - Description: "Deploys the BurnWithFromMintTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: BurnWithFromMintTokenPoolABI, - Bin: BurnWithFromMintTokenPoolBin, - }, + Name: "burn-with-from-mint-token-pool:deploy", + Version: Version, + Description: "Deploys the BurnWithFromMintTokenPool contract", + ContractMetadata: gobindings.BurnWithFromMintTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(BurnWithFromMintTokenPoolBin), + EVM: common.FromHex(gobindings.BurnWithFromMintTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go b/chains/evm/deployment/v2_0_0/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go index f77f1e21f1..ea2e14b71b 100644 --- a/chains/evm/deployment/v2_0_0/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go +++ b/chains/evm/deployment/v2_0_0/operations/cctp_message_transmitter_proxy/cctp_message_transmitter_proxy.go @@ -3,126 +3,68 @@ package cctp_message_transmitter_proxy import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_message_transmitter_proxy" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CCTPMessageTransmitterProxy" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CCTPMessageTransmitterProxyABI = `[{"type":"constructor","inputs":[{"name":"tokenMessenger","type":"address","internalType":"contract ITokenMessenger"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"i_cctpTransmitter","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IMessageTransmitter"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"receiveMessage","inputs":[{"name":"message","type":"bytes","internalType":"bytes"},{"name":"attestation","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"TransmitterCannotBeZero","inputs":[]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const CCTPMessageTransmitterProxyBin = "0x60a0806040523461026e57602081611147803803809161001f8285610273565b83398101031261026e57516001600160a01b0381169081900361026e5760405190602061004c8184610273565b600083526000368137331561025d57600180546001600160a01b0319163317905560405161007a8282610273565b60008152600036813760408051949085016001600160401b03811186821017610247576040528452808285015260005b8151811015610111576001906001600160a01b036100c88285610296565b5116846100d4826102d8565b6100e1575b5050016100aa565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138846100d9565b5050915160005b83825182101561018e57506001600160a01b036101358284610296565b5116801561017d5784917feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef838361016d6001956103d6565b50604051908152a1019050610118565b6342bcdf7f60e11b60005260046000fd5b604051632c12192160e01b81528181600481885afa91821561023b576000926101f7575b50506001600160a01b03166080819052156101e657604051610d10908161043782396080518181816101ba015261065a0152f35b6324acd18360e21b60005260046000fd5b81813d8311610234575b61020b8183610273565b810103126102305751906001600160a01b038216820361022d575081806101b2565b80fd5b5080fd5b503d610201565b6040513d6000823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761024757604052565b80518210156102aa5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b80548210156102aa5760005260206000200190600090565b60008181526003602052604090205480156103cf5760001981018181116103b9576002546000198101919082116103b957808203610368575b5050506002548015610352576000190161032c8160026102c0565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b6103a161037961038a9360026102c0565b90549060031b1c92839260026102c0565b819391549060031b91821b91600019901b19161790565b90556000526003602052604060002055388080610311565b634e487b7160e01b600052601160045260246000fd5b5050600090565b8060005260036020526040600020541560001461043057600254680100000000000000008110156102475761041761038a82600185940160025560026102c0565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b60003560e01c908163181f5a7714610800575080632451a6271461071257806357ecfd281461054357806379ba50971461045a5780638da5cb5b1461040857806391a2749a146101de578063cfc1db061461016f5763f2fde38b1461007757600080fd5b3461016a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a5760043573ffffffffffffffffffffffffffffffffffffffff811680910361016a576100cf610a38565b33811461014057807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b600080fd5b3461016a5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461016a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a5760043567ffffffffffffffff811161016a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261016a57604051906040820182811067ffffffffffffffff8211176103d957604052806004013567ffffffffffffffff811161016a5761028d9060043691840101610975565b825260248101359067ffffffffffffffff821161016a5760046102b39236920101610975565b602082019081526102c2610a38565b519060005b825181101561033a578073ffffffffffffffffffffffffffffffffffffffff6102f260019386610a83565b51166102fd81610ade565b610309575b50016102c7565b60207fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a184610302565b505160005b81518110156103d75773ffffffffffffffffffffffffffffffffffffffff6103678284610a83565b51169081156103ad577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef60208361039f600195610ca3565b50604051908152a10161033f565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b3461016a5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461016a5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a5760005473ffffffffffffffffffffffffffffffffffffffff81163303610519577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b3461016a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a5760043567ffffffffffffffff811161016a57610592903690600401610947565b60243567ffffffffffffffff811161016a576105b2903690600401610947565b929091336000526003602052604060002054156106e45761063f60209361060f9560405196879586957f57ecfd280000000000000000000000000000000000000000000000000000000087526040600488015260448701916109f9565b917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8584030160248601526109f9565b0381600073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af19081156106d857600091610698575b6020826040519015158152f35b6020813d6020116106d0575b816106b160209383610906565b810103126106cc575180151581036106cc579050602061068b565b5080fd5b3d91506106a4565b6040513d6000823e3d90fd5b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b3461016a5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a576040518060206002549283815201809260026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b8181106107ea5750505081610791910382610906565b6040519182916020830190602084525180915260408301919060005b8181106107bb575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016107ad565b825484526020909301926001928301920161077b565b3461016a5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016a576060810181811067ffffffffffffffff8211176103d957604052602181527f434354504d6573736167655472616e736d697474657250726f787920322e302e60208201527f3000000000000000000000000000000000000000000000000000000000000000604082015260405190602082528181519182602083015260005b8381106108ee5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b602082820181015160408784010152859350016108ae565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176103d957604052565b9181601f8401121561016a5782359167ffffffffffffffff831161016a576020838186019501011161016a57565b81601f8201121561016a5780359167ffffffffffffffff83116103d9578260051b91604051936109a86020850186610906565b845260208085019382010191821161016a57602001915b8183106109cc5750505090565b823573ffffffffffffffffffffffffffffffffffffffff8116810361016a578152602092830192016109bf565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b73ffffffffffffffffffffffffffffffffffffffff600154163303610a5957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b8051821015610a975760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8054821015610a975760005260206000200190600090565b6000818152600360205260409020548015610c9c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111610c6d57600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211610c6d57808203610bfe575b5050506002548015610bcf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610b8c816002610ac6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b610c55610c0f610c20936002610ac6565b90549060031b1c9283926002610ac6565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080610b53565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5050600090565b80600052600360205260406000205415600014610cfd57600254680100000000000000008110156103d957610ce4610c208260018594016002556002610ac6565b9055600254906000526003602052604060002055600190565b5060009056fea164736f6c634300081a000a" - -type CCTPMessageTransmitterProxyContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCCTPMessageTransmitterProxyContract( - address common.Address, - backend bind.ContractBackend, -) (*CCTPMessageTransmitterProxyContract, error) { - parsed, err := abi.JSON(strings.NewReader(CCTPMessageTransmitterProxyABI)) - if err != nil { - return nil, err - } - return &CCTPMessageTransmitterProxyContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CCTPMessageTransmitterProxyContract) Address() common.Address { - return c.address -} - -func (c *CCTPMessageTransmitterProxyContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CCTPMessageTransmitterProxyContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *CCTPMessageTransmitterProxyContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - type ConstructorArgs struct { - TokenMessenger common.Address + TokenMessenger common.Address `json:"tokenMessenger"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "cctp-message-transmitter-proxy:deploy", - Version: Version, - Description: "Deploys the CCTPMessageTransmitterProxy contract", - ContractMetadata: &bind.MetaData{ - ABI: CCTPMessageTransmitterProxyABI, - Bin: CCTPMessageTransmitterProxyBin, - }, + Name: "cctp-message-transmitter-proxy:deploy", + Version: Version, + Description: "Deploys the CCTPMessageTransmitterProxy contract", + ContractMetadata: gobindings.CCTPMessageTransmitterProxyMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(CCTPMessageTransmitterProxyBin), + EVM: common.FromHex(gobindings.CCTPMessageTransmitterProxyMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *CCTPMessageTransmitterProxyContract]{ - Name: "cctp-message-transmitter-proxy:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: CCTPMessageTransmitterProxyABI, - NewContract: NewCCTPMessageTransmitterProxyContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPMessageTransmitterProxyContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *CCTPMessageTransmitterProxyContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.CCTPMessageTransmitterProxyInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.CCTPMessageTransmitterProxyInterface]{ + Name: "cctp-message-transmitter-proxy:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPMessageTransmitterProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPMessageTransmitterProxyInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPMessageTransmitterProxyInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *CCTPMessageTransmitterProxyContract]{ - Name: "cctp-message-transmitter-proxy:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewCCTPMessageTransmitterProxyContract, - CallContract: func(c *CCTPMessageTransmitterProxyContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) +func NewReadGetAllAuthorizedCallers(c gobindings.CCTPMessageTransmitterProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.CCTPMessageTransmitterProxyInterface]{ + Name: "cctp-message-transmitter-proxy:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPMessageTransmitterProxyInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/cctp_through_ccv_token_pool/cctp_through_ccv_token_pool.go b/chains/evm/deployment/v2_0_0/operations/cctp_through_ccv_token_pool/cctp_through_ccv_token_pool.go index 4eaf56cb85..9a1d99abe0 100644 --- a/chains/evm/deployment/v2_0_0/operations/cctp_through_ccv_token_pool/cctp_through_ccv_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/cctp_through_ccv_token_pool/cctp_through_ccv_token_pool.go @@ -3,110 +3,60 @@ package cctp_through_ccv_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_through_ccv_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CCTPThroughCCVTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CCTPThroughCCVTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"cctpVerifier","type":"address","internalType":"address"},{"name":"allowedCallers","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCCTPVerifier","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CCVNotSetOnResolver","inputs":[{"name":"resolver","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"IPoolV1NotSupported","inputs":[]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const CCTPThroughCCVTokenPoolBin = "0x610100806040523461039e576155cb803803809161001d82856103f6565b833981019060c08183031261039e5780516001600160a01b03811680820361039e5761004b60208401610419565b9061005860408501610427565b61006460608601610427565b9361007160808701610427565b60a087015190966001600160401b03821161039e57019680601f8901121561039e578751976001600160401b038911610302578860051b9060208201996100bb6040519b8c6103f6565b8a526020808b019282010192831161039e57602001905b8282106103de5750505033156103cd57600180546001600160a01b03191633179055821580156103bc575b80156103ab575b6102f15760805260c052308103610318575b5060a052600380546001600160a01b0319908116909155600280549091166001600160a01b039290921691909117905560405160209061015682826103f6565b60008152600036813760408051949085016001600160401b03811186821017610302576040528452808285015260005b81518110156101ed576001906001600160a01b036101a4828561043b565b5116846101b08261047d565b6101bd575b505001610186565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138846101b5565b5050915160005b8151811015610265576001600160a01b0361020f828461043b565b5116908115610254577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef858361024660019561057b565b50604051908152a1016101f4565b6342bcdf7f60e11b60005260046000fd5b6001600160a01b03831680156102f15760e052604051614fef90816105dc823960805181818161024b015281816104060152818161271d015281816128cb01528181612bc10152612c1b015260a051818181612a0601528181613d710152613dbb015260c0518181816102e60152818161133c01526127b8015260e0518181816107fa015261259a0152f35b630a64406560e11b60005260046000fd5b634e487b7160e01b600052604160045260246000fd5b60206004916040519283809263313ce56760e01b82525afa6000918161036a575b50156101165760ff1660ff82168181036103535750610116565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116103a3575b81610386602093836103f6565b8101031261039e5761039790610419565b9038610339565b600080fd5b3d9150610379565b506001600160a01b03821615610104565b506001600160a01b038516156100fd565b639b15e16f60e01b60005260046000fd5b602080916103eb84610427565b8152019101906100d2565b601f909101601f19168101906001600160401b0382119082101761030257604052565b519060ff8216820361039e57565b51906001600160a01b038216820361039e57565b805182101561044f5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561044f5760005260206000200190600090565b6000818152600e6020526040902054801561057457600019810181811161055e57600d5460001981019190821161055e5780820361050d575b505050600d5480156104f757600019016104d181600d610465565b8154906000199060031b1b19169055600d55600052600e60205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61054661051e61052f93600d610465565b90549060031b1c928392600d610465565b819391549060031b91821b91600019901b19161790565b9055600052600e6020526040600020553880806104b6565b634e487b7160e01b600052601160045260246000fd5b5050600090565b80600052600e602052604060002054156000146105d557600d5468010000000000000000811015610302576105bc61052f826001859401600d55600d610465565b9055600d5490600052600e602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612de95750806306b859ef14612d57578063181f5a7714612cf65780631826b1e714612c3f57806321df0da714612bee578063240028e814612b8a5780632422ac4514612aab5780632451a62714612a2a57806324f65ee7146129ec5780632cab0fb6146126a257806337a3210d1461266e57806339077537146126055780634c5ef0ed146125be578063615521a71461256d57806362ddd3c4146124e65780637437ff9f1461249857806379ba5097146123d15780638926f54f1461238b5780638da5cb5b1461235757806391a2749a146121a95780639a4575b914612146578063a42a7b8b14611fdf578063acfecf9114611ee7578063ae39a25714611d5c578063b6cfa3b714611ca1578063b794658014611c69578063bfeffd3f14611bbd578063c4bffe2b14611a92578063c7230a60146117e4578063dc04fa1f14611360578063dc0bd9711461130f578063dcbd41bc1461110b578063e8a1da1714610a25578063ea6396db146106d3578063ec6ae7a714610690578063f2fde38b146105c15763fbc801a7146101b857600080fd5b346105be5760606003193601126105be5760043567ffffffffffffffff81116105ba5760a060031982360301126105ba576101f1612f1b565b9060443567ffffffffffffffff81116105b657610215610225913690600401613010565b61021d613a3e565b5036916131f6565b5060848101610233816139e0565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361056c57602482019177ffffffffffffffff00000000000000000000000000000000610299846139cb565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610561578691610532575b5061050a579161043c916104ae9560646104419561033b610336866139cb565b6146b2565b0135958691507fffffffff000000000000000000000000000000000000000000000000000000008116156104e9576103b6926103a26103a7927fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690613ec5565b6139e0565b6103b0846139cb565b90614be6565b6103bf816139cb565b7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae10606067ffffffffffffffff6040519373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001685523360208601528860408601521692a26139cb565b613baf565b906104df6040517f3047587c0000000000000000000000000000000000000000000000000000000060208201526004815261047d602482613149565b6040519361048a856130d9565b8452602084019081526040519485946040865251604080870152608086019061318a565b90517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc085830301606086015261318a565b9060208301520390f35b506104f6610505926139e0565b6104ff846139cb565b90614ba0565b6103b6565b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b610554915060203d60201161055a575b61054c8183613149565b810190614031565b38610316565b503d610542565b6040513d88823e3d90fd5b8373ffffffffffffffffffffffffffffffffffffffff61058d6024936139e0565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b8380fd5b5080fd5b80fd5b50346105be5760206003193601126105be5773ffffffffffffffffffffffffffffffffffffffff6105f0612f79565b6105f861409a565b1633811461066857807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346105be57806003193601126105be5760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346105be5760806003193601126105be576106ed612f79565b506106f6612fe2565b6106fe612f4a565b506064359067ffffffffffffffff8211610a0e5761072967ffffffffffffffff923690600401613010565b50508260c060405161073a81613111565b8281528260208201528260408201528260608201528260808201528260a0820152015216808252600b60205260408220906040519161077883613111565b549063ffffffff82168352602083019363ffffffff8360201c168552604084019463ffffffff8460401c168652606085019063ffffffff8560601c168252608086019261ffff8660801c16845260a087019461ffff8760901c16865260ff60c089019760a01c161515875273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690604051907f958021a7000000000000000000000000000000000000000000000000000000008252600482015260406024820152826044820152602081606481855afa8015610a1a5783906109c9575b73ffffffffffffffffffffffffffffffffffffffff91501690811561099e57506060600491604051928380927f7437ff9f0000000000000000000000000000000000000000000000000000000082525afa91821561099257809261091d575b505061ffff9493919263ffffffff60e09981889687604083970151168952816040519c51168c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b9091506060823d60601161098a575b8161093960609383613149565b810103126105be57604080519261094f8461312d565b6109588161343b565b84526109666020820161343b565b602085015201519061ffff821682036105be575060408201528263ffffffff6108c9565b3d915061092c565b604051903d90823e3d90fd5b7f4172d660000000000000000000000000000000000000000000000000000000008352600452602482fd5b506020813d602011610a12575b816109e360209383613149565b81010312610a0e57610a0973ffffffffffffffffffffffffffffffffffffffff9161343b565b61086a565b8280fd5b3d91506109d6565b6040513d85823e3d90fd5b50346105be5760406003193601126105be5760043567ffffffffffffffff81116105ba57610a57903690600401613351565b9060243567ffffffffffffffff81116105b65790610a7a84923690600401613351565b939091610a8561409a565b83905b828210610f4c5750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015610f48578060051b83013585811215610f4457830161012081360312610f445760405194610aec866130f5565b813567ffffffffffffffff811681036105ba578652602082013567ffffffffffffffff81116105ba5782019436601f870112156105ba57853595610b2f876132be565b96610b3d6040519889613149565b80885260208089019160051b83010190368211610f445760208301905b828210610f11575050505060208701958652604083013567ffffffffffffffff8111610a0e57610b8d903690850161325b565b9160408801928352610bb7610ba53660608701613c5b565b9460608a0195865260c0369101613c5b565b956080890196875283515115610ee957610bdb67ffffffffffffffff8a5116614b30565b15610eb25767ffffffffffffffff8951168252600860205260408220610c0286518261434f565b610c1088516002830161434f565b6004855191019080519067ffffffffffffffff8211610e8557610c338354613a9a565b601f8111610e4a575b50602090601f8311600114610dab57610c8a9291869183610da0575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610cc45790610cbe600192610cb78367ffffffffffffffff8f511692613a57565b51906140e5565b01610c8f565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610d9267ffffffffffffffff6001979694985116925193519151610d5e610d296040519687968752610100602088015261010087019061318a565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610abb565b015190508e80610c58565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610e325750908460019594939210610dfb575b505050811b019055610c8d565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610dee565b92936020600181928786015181550195019301610dd8565b610e759084875260208720601f850160051c81019160208610610e7b575b601f0160051c0190613ce6565b8d610c3c565b9091508190610e68565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111610f4057602091610f35839283369189010161325b565b815201910190610b5a565b8680fd5b8480fd5b8380f35b9267ffffffffffffffff610f6e610f698486889a9699979a613c2e565b6139cb565b1691610f79836148de565b156110df578284526008602052610f9560056040862001614667565b94845b8651811015610fce576001908587526008602052610fc760056040892001610fc0838b613a57565b51906149ea565b5001610f98565b509396929094509490948087526008602052600560408820888155886001820155886002820155886003820155886004820161100a8154613a9a565b8061109e575b5050500180549088815581611080575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610a88565b885260208820908101905b818110156110205788815560010161108b565b601f81116001146110b45750555b888a80611010565b818352602083206110cf91601f01861c810190600101613ce6565b80825281602081209155556110ac565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346105be5760206003193601126105be5760043567ffffffffffffffff81116105ba5761113d903690600401613382565b73ffffffffffffffffffffffffffffffffffffffff600a5416331415806112ed575b6112c157825b818110611170578380f35b61117b818385613bd1565b67ffffffffffffffff61118d826139cb565b16906111a6826000526007602052604060002054151590565b1561129557907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e08361125561122f602060019897018b6111e782613be1565b1561125c57879052600460205261120e60408d206112083660408801613c5b565b9061434f565b868c52600560205261122a60408d206112083660a08801613c5b565b613be1565b9160405192151583526112486020840160408301613ca2565b60a0608084019101613ca2565ba201611165565b60026040828a61122a9452600860205261127e82822061120836858c01613c5b565b8a8152600860205220016112083660a08801613c5b565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff6001541633141561115f565b50346105be57806003193601126105be57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105be5760406003193601126105be5760043567ffffffffffffffff81116105ba57611392903690600401613382565b60243567ffffffffffffffff81116105b6576113b2903690600401613351565b9190926113bd61409a565b845b82811061142957505050825b8181106113d6578380f35b8067ffffffffffffffff6113f0610f696001948688613c2e565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a2016113cb565b67ffffffffffffffff611440610f69838686613bd1565b16611458816000526007602052604060002054151590565b156117b957611468828585613bd1565b602081019060e081019061147b82613be1565b1561178d5760a0810161271061ffff61149383613bee565b16101561177e5760c082019161271061ffff6114ae85613bee565b1610156117465763ffffffff6114c386613bfd565b161561171a57858c52600b60205260408c206114de86613bfd565b63ffffffff169080549060408401916114f683613bfd565b60201b67ffffffff000000001693606086019461151286613bfd565b60401b6bffffffff000000000000000016966080019661153188613bfd565b60601b6fffffffff00000000000000000000000016916115508a613bee565b60801b71ffff0000000000000000000000000000000016936115718c613bee565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff16171717815561162487613be1565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661167590613c0e565b63ffffffff16875261168690613c0e565b63ffffffff16602087015261169a90613c0e565b63ffffffff1660408601526116ae90613c0e565b63ffffffff1660608501526116c290613c1f565b61ffff1660808401526116d490613c1f565b61ffff1660a08301526116e6906131e9565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a26001016113bf565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61175586613bee565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff611755602493613bee565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346105be5760406003193601126105be5760043567ffffffffffffffff81116105ba57611816903690600401613351565b9061181f612fbf565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611a70575b611a445773ffffffffffffffffffffffffffffffffffffffff8316908115611a1c57845b818110611871578580f35b73ffffffffffffffffffffffffffffffffffffffff6118946103a2838588613c2e565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa908115611a115788916119dc575b50806118e9575b5050600101611866565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a919061194a606482613149565b519082865af1156119d15787513d6119c85750813b155b61199c5790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a390386118df565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611961565b6040513d89823e3d90fd5b90506020813d8211611a09575b816119f660209383613149565b81010312611a055751386118d8565b8780fd5b3d91506119e9565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c5416331415611842565b50346105be57806003193601126105be57604051906006548083528260208101600684526020842092845b818110611ba4575050611ad292500383613149565b8151611af6611ae0826132be565b91611aee6040519384613149565b8083526132be565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611b55578067ffffffffffffffff611b4260019388613a57565b5116611b4e8286613a57565b5201611b23565b50925090604051928392602084019060208552518091526040840192915b818110611b81575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611b73565b8454835260019485019487945060209093019201611abd565b50346105be5760206003193601126105be5760043573ffffffffffffffffffffffffffffffffffffffff81168091036105ba57611bf861409a565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b50346105be5760206003193601126105be57611c9d611c8961043c612ff9565b60405191829160208352602083019061318a565b0390f35b50346105be5760206003193601126105be577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611cde612ee7565b611ce661409a565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346105be5760606003193601126105be57611d76612f79565b90611d7f612fbf565b6044359273ffffffffffffffffffffffffffffffffffffffff84168085036105b657611da961409a565b73ffffffffffffffffffffffffffffffffffffffff82168015611ebf5794611eb9917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346105be5767ffffffffffffffff611eff36613279565b929091611f0a61409a565b1691611f23836000526007602052604060002054151590565b156110df578284526008602052611f5260056040862001611f453684866131f6565b60208151910120906149ea565b15611f9757907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691611f9160405192839260208452602084019161345c565b0390a280f35b82611fdb836040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485015260406024850152604484019161345c565b0390fd5b50346105be5760206003193601126105be5767ffffffffffffffff612002612ff9565b168152600860205261201960056040832001614667565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061205e612048836132be565b926120566040519485613149565b8084526132be565b01835b818110612135575050825b82518110156120b2578061208260019285613a57565b518552600960205261209660408620613aed565b6120a08285613a57565b526120ab8184613a57565b500161206c565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106120ea57505050500390f35b91936020612125827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc06001959799849503018652885161318a565b96019201920185949391926120db565b806060602080938601015201612061565b50346105be5760206003193601126105be5760043567ffffffffffffffff81116105ba5760031960a091360301126105be57600490612183613a3e565b507f690a7a40000000000000000000000000000000000000000000000000000000008152fd5b50346105be5760206003193601126105be5760043567ffffffffffffffff81116105ba57604060031982360301126105ba57604051906121e8826130d9565b806004013567ffffffffffffffff81116105b65761220c90600436918401016132d6565b825260248101359067ffffffffffffffff82116105b657600461223292369201016132d6565b6020820190815261224161409a565b5191805b83518110156122b8578073ffffffffffffffffffffffffffffffffffffffff61227060019387613a57565b511661227b81614f12565b612287575b5001612245565b60207fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138612280565b509051815b81518110156123535773ffffffffffffffffffffffffffffffffffffffff6122e58284613a57565b5116801561232b57907feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef60208361231d600195614af1565b50604051908152a1016122bd565b6004847f8579befe000000000000000000000000000000000000000000000000000000008152fd5b8280f35b50346105be57806003193601126105be57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346105be5760206003193601126105be5760206123c767ffffffffffffffff6123b3612ff9565b166000526007602052604060002054151590565b6040519015158152f35b50346105be57806003193601126105be57805473ffffffffffffffffffffffffffffffffffffffff81163303612470577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346105be57806003193601126105be57600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346105be576124f536613279565b6125019392919361409a565b67ffffffffffffffff8216612523816000526007602052604060002054151590565b15612542575061253f92936125399136916131f6565b906140e5565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346105be57806003193601126105be57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105be5760406003193601126105be576125d8612ff9565b906024359067ffffffffffffffff82116105be5760206123c7846125ff366004870161325b565b90613a01565b50346105be5760206003193601126105be5760043567ffffffffffffffff81116105ba5760031961010091360301126105be57806004916040516126488161308e565b527f690a7a40000000000000000000000000000000000000000000000000000000008152fd5b50346105be57806003193601126105be57602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b50346105be5760406003193601126105be5760043567ffffffffffffffff81116105ba5780600401906101006003198236030112610a0e576126e2612f1b565b91836040516126f08161308e565b526064820135926084830191612705836139e0565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036129cb57602484019577ffffffffffffffff0000000000000000000000000000000061276b886139cb565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156129c05782916129a1575b5061297957506127fa610336876139cb565b612803866139cb565b9061282060a48601926125ff6128198585614049565b36916131f6565b1561293257505067ffffffffffffffff6128ae60446128a76020987ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc096897fffffffff0000000000000000000000000000000000000000000000000000000060809816151560001461291757612898610f69926139e0565b6128a1846139cb565b906147c3565b95016139e0565b9373ffffffffffffffffffffffffffffffffffffffff60405195817f000000000000000000000000000000000000000000000000000000000000000016875233898801521660408601528560608601521692a28060405161290e8161308e565b52604051908152f35b612923610f69926139e0565b61292c846139cb565b9061474a565b61293c9250614049565b611fdb6040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161345c565b807f53ad11d80000000000000000000000000000000000000000000000000000000060049252fd5b6129ba915060203d60201161055a5761054c8183613149565b386127e8565b6040513d84823e3d90fd5b60248673ffffffffffffffffffffffffffffffffffffffff61058d866139e0565b50346105be57806003193601126105be57602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105be57806003193601126105be57604051600d8054808352908352909160208301917fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5915b818110612a9557611c9d85612a8981870382613149565b6040519182918261303e565b8254845260209093019260019283019201612a72565b50346105be5760406003193601126105be57612ac5612ff9565b6024359182151583036105be57610140612b88612ae28585613948565b612b3860409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346105be5760206003193601126105be57602090612ba7612f79565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346105be57806003193601126105be57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105be5760c06003193601126105be57612c59612f79565b50612c62612fe2565b612c6a612f9c565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036105be5760a4359067ffffffffffffffff82116105be5760a063ffffffff8061ffff612ccf8888612cc83660048b01613010565b5050613798565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346105be57806003193601126105be5750611c9d604051612d19604082613149565b601d81527f434354505468726f756768434356546f6b656e506f6f6c20322e302e30000000602082015260405191829160208352602083019061318a565b50346105be5760c06003193601126105be57612d71612f79565b612d79612fe2565b6064357fffffffff00000000000000000000000000000000000000000000000000000000811681036105b65760843567ffffffffffffffff8111610f4457612dc5903690600401613010565b93909260a4359560028710156105be57611c9d612a8988888888604435888a61349b565b9050346105ba5760206003193601126105ba576020907fffffffff00000000000000000000000000000000000000000000000000000000612e28612ee7565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115612ebd575b8115612e93575b8115612e69575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612e62565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150612e5b565b7f940a15420000000000000000000000000000000000000000000000000000000081149150612e54565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203612f1657565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203612f1657565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203612f1657565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203612f1657565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203612f1657565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203612f1657565b6024359067ffffffffffffffff82168203612f1657565b6004359067ffffffffffffffff82168203612f1657565b9181601f84011215612f165782359167ffffffffffffffff8311612f165760208381860195010111612f1657565b602060408183019282815284518094520192019060005b8181106130625750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101613055565b6020810190811067ffffffffffffffff8211176130aa57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176130aa57604052565b60a0810190811067ffffffffffffffff8211176130aa57604052565b60e0810190811067ffffffffffffffff8211176130aa57604052565b6060810190811067ffffffffffffffff8211176130aa57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176130aa57604052565b919082519283825260005b8481106131d45750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613195565b35908115158203612f1657565b92919267ffffffffffffffff82116130aa576040519161323e601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613149565b829481845281830111612f16578281602093846000960137010152565b9080601f83011215612f1657816020613276933591016131f6565b90565b906040600319830112612f165760043567ffffffffffffffff81168103612f1657916024359067ffffffffffffffff8211612f16576132ba91600401613010565b9091565b67ffffffffffffffff81116130aa5760051b60200190565b9080601f83011215612f16578135906132ee826132be565b926132fc6040519485613149565b82845260208085019360051b820101918211612f1657602001915b8183106133245750505090565b823573ffffffffffffffffffffffffffffffffffffffff81168103612f1657815260209283019201613317565b9181601f84011215612f165782359167ffffffffffffffff8311612f16576020808501948460051b010111612f1657565b9181601f84011215612f165782359167ffffffffffffffff8311612f16576020808501948460081b010111612f1657565b818102929181159184041417156133c657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81156133ff570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b919082039182116133c657565b519073ffffffffffffffffffffffffffffffffffffffff82168203612f1657565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff6003541695861561377657809760028710156137475773ffffffffffffffffffffffffffffffffffffffff986135fc957fffffffff0000000000000000000000000000000000000000000000000000000093896137185767ffffffffffffffff8216600052600b6020526040600020906040519161353383613111565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c16151591829101526136c4575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c484019161345c565b928180600095869560a483015203915afa9182156136b757819261361f57505090565b9091503d8083833e6136318183613149565b810190602081830312610a0e5780519067ffffffffffffffff82116105b6570181601f82011215610a0e57805190613668826132be565b936136766040519586613149565b82855260208086019360051b8301019384116105be5750602001905b82821061369f5750505090565b602080916136ac8461343b565b815201910190613692565b50604051903d90823e3d90fd5b92935067ffffffffffffffff928587161561370057506127106136ef61ffff6136f6945116836133b3565b049061342e565b915b90388061359d565b61371292506136ef61271091836133b3565b916136f8565b67ffffffffffffffff9192506137419061373b61373636898b6131f6565b613cfd565b90613db8565b916135ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b505050505050505060405161378c602082613149565b60008152600036813790565b67ffffffffffffffff909291926137d67fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685613ec5565b16600052600b6020526040600020604051906137f182613111565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c0821591015261389e577fffffffff000000000000000000000000000000000000000000000000000000001661389357505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b604051906138c4826130f5565b60006080838281528260208201528260408201528260608201520152565b906040516138ef816130f5565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161395a6138b7565b506139636138b7565b506139975716600052600860205260406000209061327661398b600261399061398b866138e2565b613fac565b94016138e2565b16908160005260046020526139b261398b60406000206138e2565b91600052600560205261327661398b60406000206138e2565b3567ffffffffffffffff81168103612f165790565b3573ffffffffffffffffffffffffffffffffffffffff81168103612f165790565b9067ffffffffffffffff61327692166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b60405190613a4b826130d9565b60606020838281520152565b8051821015613a6b5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c92168015613ae3575b6020831014613ab457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613aa9565b9060405191826000825492613b0184613a9a565b8084529360018116908115613b6f5750600114613b28575b50613b2692500383613149565b565b90506000929192526020600020906000915b818310613b53575050906020613b269282010138613b19565b6020919350806001915483858901015201910190918492613b3a565b60209350613b269592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138613b19565b67ffffffffffffffff1660005260086020526132766004604060002001613aed565b9190811015613a6b5760081b0190565b358015158103612f165790565b3561ffff81168103612f165790565b3563ffffffff81168103612f165790565b359063ffffffff82168203612f1657565b359061ffff82168203612f1657565b9190811015613a6b5760051b0190565b35906fffffffffffffffffffffffffffffffff82168203612f1657565b9190826060910312612f1657604051613c738161312d565b6040613c9d818395613c84816131e9565b8552613c9260208201613c3e565b602086015201613c3e565b910152565b6fffffffffffffffffffffffffffffffff613ce060408093613cc3816131e9565b1515865283613cd460208301613c3e565b16602087015201613c3e565b16910152565b818110613cf1575050565b60008155600101613ce6565b80518015613d6d57602003613d2f578051602082810191830183900312612f1657519060ff8211613d2f575060ff1690565b611fdb906040519182917f953576f700000000000000000000000000000000000000000000000000000000835260206004840152602483019061318a565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff82116133c657565b60ff16604d81116133c657600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414613ebe57828411613e945790613dfd91613d93565b91604d60ff8416118015613e5b575b613e2557505090613e1f61327692613da7565b906133b3565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50613e6583613da7565b80156133ff577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411613e0c565b613e9d91613d93565b91604d60ff841611613e2557505090613eb861327692613da7565b906133f5565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115613fa757613ef88161458c565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616613fa75761ffff8360e01c168015918215613f96575b5050613f42575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880613f38565b505050565b613fb46138b7565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614011602085019361400b613ffe63ffffffff8751164261342e565b85608089015116906133b3565b9061457f565b8082101561402a57505b16825263ffffffff4216905290565b905061401b565b90816020910312612f1657518015158103612f165790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215612f16570180359067ffffffffffffffff8211612f1657602001918136038313612f1657565b73ffffffffffffffffffffffffffffffffffffffff6001541633036140bb57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b908051156143255767ffffffffffffffff8151602083012092169182600052600860205261411a816005604060002001614b69565b156142e15760005260096020526040600020815167ffffffffffffffff81116130aa576141478254613a9a565b601f81116142af575b506020601f82116001146141e957916141c3827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea95936141d9956000916141de575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b905560405191829160208352602083019061318a565b0390a2565b905084015138614192565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b8181106142975750926141d99492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614260575b5050811b019055611c89565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614254565b9192602060018192868a015181550194019201614219565b6142db90836000526020600020601f840160051c81019160208510610e7b57601f0160051c0190613ce6565b38614150565b5090611fdb6040519283927f393b8ad2000000000000000000000000000000000000000000000000000000008452600484015260406024840152604483019061318a565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b8151919291156144d1576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff6020850151161061446e57613b2691925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b6064836144cf604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408401511615801590614560575b6144ff57613b269192614392565b6064836144cf604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff60208401511615156144f1565b919082018092116133c657565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614663577dffff0000000000000000000000000000000000000000000000000000000081161561465a5760ff60015b169060f01c80614624575b506001036145f75750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b6010811061463557506145ec565b6001811b8216614648575b600101614627565b91600181018091116133c65791614640565b60ff60006145e1565b5050565b906040519182815491828252602082019060005260206000209260005b818110614699575050613b2692500383613149565b8454835260019485019487945060209093019201614684565b67ffffffffffffffff166146d3816000526007602052604060002054151590565b1561471d575033600052600e602052604060002054156146ef57565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fa9902c7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c92169283600052600860205261479381836002604060002001614c56565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252602082019290925290819081016141d9565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156148285750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f99183600052600560205261479381836040600020614c56565b90613b26935061474a565b8054821015613a6b5760005260206000200190600090565b805480156148af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906148808282614833565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008181526007602052604090205480156149e3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116133c657600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116133c657818103614974575b505050614960600661484b565b600052600760205260006040812055600190565b6149cb614985614996936006614833565b90549060031b1c9283926006614833565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526007602052604060002055388080614953565b5050600090565b906001820191816000528260205260406000205490811515600014614abd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918083116133c65781547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81019081116133c6578381614a749503614a86575b50505061484b565b60005260205260006040812055600190565b614aa6614a966149969386614833565b90549060031b1c92839286614833565b905560005284602052604060002055388080614a6c565b50505050600090565b805490680100000000000000008210156130aa5781614996916001614aed94018155614833565b9055565b80600052600e60205260406000205415600014614b2a57614b1381600d614ac6565b600d5490600052600e602052604060002055600190565b50600090565b80600052600760205260406000205415600014614b2a57614b52816006614ac6565b600654906000526007602052604060002055600190565b60008281526001820160205260409020546149e35780614b8b83600193614ac6565b80549260005201602052604060002055600190565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da817894492169283600052600860205261479381836040600020614c56565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c1615614c4b5750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e9183600052600460205261479381836040600020614c56565b90613b269350614ba0565b9182549060ff8260a01c16158015614f0a575b614f04576fffffffffffffffffffffffffffffffff82169160018501908154614cae63ffffffff6fffffffffffffffffffffffffffffffff83169360801c164261342e565b9081614e66575b5050848110614e1a5750838310614d0f575050614ce46fffffffffffffffffffffffffffffffff92839261342e565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c928315614dae5781614d279161342e565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908082116133c657614d75614d7a9273ffffffffffffffffffffffffffffffffffffffff9661457f565b6133f5565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611614eda57614e819261400b9160801c906133b3565b80841015614ed55750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880614cb5565b614e8c565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b508215614c69565b6000818152600e602052604090205480156149e3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116133c657600d54907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116133c657808203614fa8575b505050614f94600d61484b565b600052600e60205260006040812055600190565b614fca614fb961499693600d614833565b90549060031b1c928392600d614833565b9055600052600e602052604060002055388080614f8756fea164736f6c634300081a000a" - -type CCTPThroughCCVTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCCTPThroughCCVTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*CCTPThroughCCVTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(CCTPThroughCCVTokenPoolABI)) - if err != nil { - return nil, err - } - return &CCTPThroughCCVTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CCTPThroughCCVTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *CCTPThroughCCVTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CCTPThroughCCVTokenPoolContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - RmnProxy common.Address - Router common.Address - CctpVerifier common.Address - AllowedCallers []common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + CctpVerifier common.Address `json:"cctpVerifier"` + AllowedCallers []common.Address `json:"allowedCallers"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "cctp-through-ccv-token-pool:deploy", - Version: Version, - Description: "Deploys the CCTPThroughCCVTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: CCTPThroughCCVTokenPoolABI, - Bin: CCTPThroughCCVTokenPoolBin, - }, + Name: "cctp-through-ccv-token-pool:deploy", + Version: Version, + Description: "Deploys the CCTPThroughCCVTokenPool contract", + ContractMetadata: gobindings.CCTPThroughCCVTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(CCTPThroughCCVTokenPoolBin), + EVM: common.FromHex(gobindings.CCTPThroughCCVTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *CCTPThroughCCVTokenPoolContract]{ - Name: "cctp-through-ccv-token-pool:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: CCTPThroughCCVTokenPoolABI, - NewContract: NewCCTPThroughCCVTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPThroughCCVTokenPoolContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *CCTPThroughCCVTokenPoolContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.CCTPThroughCCVTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.CCTPThroughCCVTokenPoolInterface]{ + Name: "cctp-through-ccv-token-pool:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPThroughCCVTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPThroughCCVTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPThroughCCVTokenPoolInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/cctp_verifier/cctp_verifier.go b/chains/evm/deployment/v2_0_0/operations/cctp_verifier/cctp_verifier.go index b07d3efe0c..24841d3de3 100644 --- a/chains/evm/deployment/v2_0_0/operations/cctp_verifier/cctp_verifier.go +++ b/chains/evm/deployment/v2_0_0/operations/cctp_verifier/cctp_verifier.go @@ -3,504 +3,296 @@ package cctp_verifier import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_verifier" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CCTPVerifier" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CCTPVerifierABI = `[{"type":"constructor","inputs":[{"name":"tokenMessenger","type":"address","internalType":"contract ITokenMessenger"},{"name":"messageTransmitterProxy","type":"address","internalType":"contract CCTPMessageTransmitterProxy"},{"name":"usdcToken","type":"address","internalType":"contract IERC20"},{"name":"dynamicConfig","type":"tuple","internalType":"struct CCTPVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"},{"name":"fastFinalityBps","type":"uint16","internalType":"uint16"}]},{"name":"baseVerifierArgs","type":"tuple","internalType":"struct CCTPVerifier.BaseVerifierArgs","components":[{"name":"storageLocations","type":"string[]","internalType":"string[]"},{"name":"rmn","type":"address","internalType":"address"},{"name":"versionTag","type":"bytes4","internalType":"bytes4"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowlistUpdates","inputs":[{"name":"allowlistConfigArgsItems","type":"tuple[]","internalType":"struct BaseVerifier.AllowlistConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"addedAllowlistedSenders","type":"address[]","internalType":"address[]"},{"name":"removedAllowlistedSenders","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyRemoteChainConfigUpdates","inputs":[{"name":"remoteChainConfigArgs","type":"tuple[]","internalType":"struct BaseVerifier.RemoteChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"forwardToVerifier","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"verifierArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"verifierReturnData","type":"bytes","internalType":"bytes"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getDomain","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct CCTPVerifier.Domain","components":[{"name":"allowedCallerOnDest","type":"bytes32","internalType":"bytes32"},{"name":"allowedCallerOnSource","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipientOnDest","type":"bytes32","internalType":"bytes32"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct CCTPVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"},{"name":"fastFinalityBps","type":"uint16","internalType":"uint16"}]}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"","type":"bytes","internalType":"bytes"},{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"getRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"remoteChainConfig","type":"tuple","internalType":"struct BaseVerifier.RemoteChainConfigArgs","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]},{"name":"allowedSendersList","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"tokenMessenger","type":"address","internalType":"address"},{"name":"messageTransmitterProxy","type":"address","internalType":"address"},{"name":"usdcToken","type":"address","internalType":"address"},{"name":"localDomainIdentifier","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"getStorageLocations","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDomains","inputs":[{"name":"domains","type":"tuple[]","internalType":"struct CCTPVerifier.SetDomainArgs[]","components":[{"name":"allowedCallerOnDest","type":"bytes32","internalType":"bytes32"},{"name":"allowedCallerOnSource","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipientOnDest","type":"bytes32","internalType":"bytes32"},{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct CCTPVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"},{"name":"fastFinalityBps","type":"uint16","internalType":"uint16"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateStorageLocations","inputs":[{"name":"newLocations","type":"string[]","internalType":"string[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verifyMessage","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageHash","type":"bytes32","internalType":"bytes32"},{"name":"verifierResults","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"versionTag","inputs":[],"outputs":[{"name":"tag","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListSendersAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListSendersRemoved","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListStateChanged","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"DomainsSet","inputs":[{"name":"domains","type":"tuple[]","indexed":false,"internalType":"struct CCTPVerifier.SetDomainArgs[]","components":[{"name":"allowedCallerOnDest","type":"bytes32","internalType":"bytes32"},{"name":"allowedCallerOnSource","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipientOnDest","type":"bytes32","internalType":"bytes32"},{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct CCTPVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"},{"name":"fastFinalityBps","type":"uint16","internalType":"uint16"}]}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RemoteChainConfigSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"StaticConfigSet","inputs":[{"name":"tokenMessenger","type":"address","indexed":false,"internalType":"address"},{"name":"messageTransmitterProxy","type":"address","indexed":false,"internalType":"address"},{"name":"usdcToken","type":"address","indexed":false,"internalType":"address"},{"name":"localDomainIdentifier","type":"uint32","indexed":false,"internalType":"uint32"}],"anonymous":false},{"type":"event","name":"StorageLocationsUpdated","inputs":[{"name":"oldLocations","type":"string[]","indexed":false,"internalType":"string[]"},{"name":"newLocations","type":"string[]","indexed":false,"internalType":"string[]"}],"anonymous":false},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DestGasCannotBeZero","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidAllowListRequest","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidCCVVersion","inputs":[{"name":"expected","type":"bytes4","internalType":"bytes4"},{"name":"got","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidFastFinalityBps","inputs":[{"name":"fastFinalityBps","type":"uint16","internalType":"uint16"}]},{"type":"error","name":"InvalidMessageId","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"got","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidMessageSender","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"got","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidMessageTransmitterOnProxy","inputs":[{"name":"expected","type":"address","internalType":"address"},{"name":"got","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidMessageTransmitterVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidReceiver","inputs":[{"name":"receiver","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSetDomainArgs","inputs":[{"name":"args","type":"tuple","internalType":"struct CCTPVerifier.SetDomainArgs","components":[{"name":"allowedCallerOnDest","type":"bytes32","internalType":"bytes32"},{"name":"allowedCallerOnSource","type":"bytes32","internalType":"bytes32"},{"name":"mintRecipientOnDest","type":"bytes32","internalType":"bytes32"},{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"domainIdentifier","type":"uint32","internalType":"uint32"},{"name":"enabled","type":"bool","internalType":"bool"}]}]},{"type":"error","name":"InvalidSourceDomain","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidTokenMessengerVersion","inputs":[{"name":"expected","type":"uint32","internalType":"uint32"},{"name":"got","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidTokenTransferLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidVerifierArgsLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidVerifierResults","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwnerOrAllowlistAdmin","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReceiveMessageCallFailed","inputs":[]},{"type":"error","name":"RemoteChainNotSupported","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"UnknownDomain","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"VersionTagCannotBeZero","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const CCTPVerifierBin = "0x61014080604052346106ef57614c80803803809161001d8285610ad3565b833981019080820360e081126106ef5781516001600160a01b03811691908281036106ef5760208401516001600160a01b038116908181036106ef5760408601516001600160a01b038116949093908585036106ef57606090605f1901126106ef576040519561008c87610ab8565b61009860608901610af6565b87526100a660808901610af6565b9860208801998a5260a08901519861ffff8a168a036106ef5760408901998a5260c0810151906001600160401b0382116106ef57016060818303126106ef57604051906100f282610ab8565b80516001600160401b0381116106ef57810183601f820112156106ef5780519061011b82610b0a565b946101296040519687610ad3565b82865260208087019360051b830101918183116106ef5760208101935b838510610a40575050505050828252604061016360208301610af6565b602084018190529101516001600160e01b03198116928382036106ef57604001526001600160a01b0316913315610a2f57600180546001600160a01b0319163317905560035481519091906101b783610b0a565b926101c56040519485610ad3565b808452600360009081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90602086015b83821061098a5750505060005b8181106108f557505060005b8181106107665750507fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d075869161026361025592604051938493604085526040850190610bcc565b908382036020850152610bcc565b0390a181156107345780156107555760a0526080528015801561074d575b8015610745575b61073457604051639cdbb18160e01b8152602081600481855afa80156106185763ffffffff91600091610715575b5016600181036106fc5750602060049160405192838092632c12192160e01b82525afa908115610618576000916106bd575b5060405163054fd4d560e41b81526001600160a01b03919091169390602081600481885afa80156106185763ffffffff9160009161069e575b50166001810361068557506020600491604051928380926367e0ed8360e11b82525afa9081156106185760009161063c575b506001600160a01b031683810361062457506101005260e05260405163234d8e3d60e21b815290602090829060049082905afa908115610618576000916105e9575b506101205260c05260018060a01b03610100511690604051906020600081840163095ea7b360e01b815285602486015281196044860152604485526103db606486610ad3565b84519082855af16000513d826105cd575b505015610587575b50506101005160e05160c05161012051604080516001600160a01b0395861681529385166020850152919093169082015263ffffffff9190911660608201527fa87b8269841db42720476aa066520b7a92a17a6182da92012f7c52b7dd9ba25c9150608090a161ffff8251168015801561057c575b610568578151600680546001600160a01b039283166001600160a01b03199091168117909155855160078054875161ffff60a01b60a09190911b169285166001600160b01b0319909116179190911790556040805191825286519092166020820152845161ffff16918101919091527f9cb852253eef65e3ff88bbfd63deac06075b7dea8d990e9ae4a51c094734197290606090a1604051613fe79081610c99823960805181613a1c015260a051818181610169015281816114600152612b54015260c051818181612a4d0152613168015260e0518181816116cb015261312c015261010051818181612b0301526130f3015261012051816131940152f35b630c74dcaf60e41b60005260045260246000fd5b506127108111610469565b6105c06105c5936040519063095ea7b360e01b6020830152602482015260006044820152604481526105ba606482610ad3565b82610c3d565b610c3d565b3880806103f4565b9091506105e15750803b15155b38806103ec565b6001146105da565b61060b915060203d602011610611575b6106038183610ad3565b810190610b44565b38610395565b503d6105f9565b6040513d6000823e3d90fd5b836383395ca960e01b60005260045260245260446000fd5b6020813d60201161067d575b8161065560209383610ad3565b810103126106795751906001600160a01b0382168203610676575038610353565b80fd5b5080fd5b3d9150610648565b6331b6aa1b60e11b600052600160045260245260446000fd5b6106b7915060203d602011610611576106038183610ad3565b38610321565b90506020813d6020116106f4575b816106d860209383610ad3565b810103126106ef576106e990610af6565b386102e8565b600080fd5b3d91506106cb565b633785f8f160e01b600052600160045260245260446000fd5b61072e915060203d602011610611576106038183610ad3565b386102b6565b6342bcdf7f60e11b60005260046000fd5b508515610288565b508315610281565b631027401f60e21b60005260046000fd5b82518110156108df5760208160051b84010151600354680100000000000000008110156108b35780600161079d9201600355610b60565b9190916108c9578051906001600160401b0382116108b3576107bf8354610b7b565b601f8111610876575b50602090601f831160011461080b5760019493929160009183610800575b5050600019600383901b1c191690841b1790555b0161020f565b0151905038806107e6565b90601f1983169184600052816000209260005b81811061085e575091600196959492918388959310610845575b505050811b0190556107fa565b015160001960f88460031b161c19169055388080610838565b9293602060018192878601518155019501930161081e565b6108a390846000526020600020601f850160051c810191602086106108a9575b601f0160051c0190610bb5565b386107c8565b9091508190610896565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052600060045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600354801561097457600019019061090c82610b60565b9290926108c9578261092060019454610b7b565b9081610932575b505060035501610203565b81601f6000931186146109495750555b3880610927565b8183526020832061096491601f0160051c8101908701610bb5565b8082528160208120915555610942565b634e487b7160e01b600052603160045260246000fd5b6040516000845461099a81610b7b565b8084529060018116908115610a0c57506001146109d4575b50600192826109c685946020940382610ad3565b8152019301910190916101f6565b6000868152602081209092505b8183106109f6575050810160200160016109b2565b60018160209254838688010152019201916109e1565b60ff191660208581019190915291151560051b84019091019150600190506109b2565b639b15e16f60e01b60005260046000fd5b84516001600160401b0381116106ef5782019083603f830112156106ef576020820151906001600160401b0382116108b357604051610a89601f8401601f191660200182610ad3565b82815260408484010186106106ef57610aad60209493859460408685019101610b21565b815201940193610146565b606081019081106001600160401b038211176108b357604052565b601f909101601f19168101906001600160401b038211908210176108b357604052565b51906001600160a01b03821682036106ef57565b6001600160401b0381116108b35760051b60200190565b60005b838110610b345750506000910152565b8181015183820152602001610b24565b908160209103126106ef575163ffffffff811681036106ef5790565b6003548110156108df57600360005260206000200190600090565b90600182811c92168015610bab575b6020831014610b9557565b634e487b7160e01b600052602260045260246000fd5b91607f1691610b8a565b818110610bc0575050565b60008155600101610bb5565b9080602083519182815201916020808360051b8301019401926000915b838310610bf857505050505090565b909192939460208080600193601f198682030187528951610c2481518092818552858086019101610b21565b601f01601f191601019701959491909101920190610be9565b906000602091828151910182855af115610618576000513d610c8f57506001600160a01b0381163b155b610c6e5750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b60011415610c6756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146131bb5750806306285c69146130a8578063181f5a7714613029578063296947061461277f578063597b95c3146124215780635cb80c5d146121fa5780635ef2c64b14611da15780637437ff9f14611cae57806379ba509714611bc957806387ae929214611b77578063898068fc1461199457806389e364c7146110bf5780638da5cb5b1461106d578063b6cfa3b714610fb1578063c9b146b314610b5f578063d52e545a1461087d578063dfadfa3514610798578063e023ddb114610585578063ec6ae7a714610524578063f2fde38b14610437578063f4cdd89e146101905763fe163eed1461011357600080fd5b3461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760206040517fffffffff000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b503461018d5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d576101c86135d3565b9060243567ffffffffffffffff81116103f35760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126103f357604051906102148261332c565b806004013567ffffffffffffffff81116103f7576102389060043691840101613610565b8252602481013567ffffffffffffffff81116103f75761025e9060043691840101613610565b6020830152604481013567ffffffffffffffff81116103f7578101366023820112156103f7576004810135610292816134df565b916102a06040519384613348565b818352602060048185019360061b830101019036821161043357602401915b8183106103fb5750505060408301526102da6064820161342e565b6060830152608481013567ffffffffffffffff81116103f75760809160046103059236920101613610565b91015260443567ffffffffffffffff81116103f357610328903690600401613610565b50606435917fffffffff00000000000000000000000000000000000000000000000000000000831683036103f35767ffffffffffffffff1690818152600260205260408120549173ffffffffffffffffffffffffffffffffffffffff8316156103c75760608361039e8660045460e01b90613bf5565b61ffff60405191818160a01c16835263ffffffff8160b01c16602084015260d01c166040820152f35b602492507f4d1aff7e000000000000000000000000000000000000000000000000000000008252600452fd5b5080fd5b8380fd5b6040833603126104335760206040918251610415816132a9565b61041e8661342e565b815282860135838201528152019201916102bf565b8680fd5b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5773ffffffffffffffffffffffffffffffffffffffff61048461340b565b61048c613ab8565b163381146104fc57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57602060045460e01b7fffffffff0000000000000000000000000000000000000000000000000000000060405191168152f35b503461018d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d576040516105c181613310565b6105c961340b565b815260243573ffffffffffffffffffffffffffffffffffffffff8116810361079457602082019081526044359061ffff821682036103f75760408301918252610610613ab8565b61ffff82511680158015610789575b61075e5750916107589173ffffffffffffffffffffffffffffffffffffffff7f9cb852253eef65e3ff88bbfd63deac06075b7dea8d990e9ae4a51c094734197294818451167fffffffffffffffffffffffff0000000000000000000000000000000000000000600654161760065551167fffffffffffffffffffffffff00000000000000000000000000000000000000006007541617600755517fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff75ffff0000000000000000000000000000000000000000806007549360a01b161691161760075560405191829182919091604061ffff81606084019573ffffffffffffffffffffffffffffffffffffffff815116855273ffffffffffffffffffffffffffffffffffffffff6020820151166020860152015116910152565b0390a180f35b7fc74dcaf0000000000000000000000000000000000000000000000000000000008552600452602484fd5b50612710811161061f565b8280fd5b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57604060a09167ffffffffffffffff6107de6135d3565b82608085516107ec8161332c565b82815282602082015282878201528260608201520152168152600560205220604051906108188261332c565b63ffffffff8154928381526001830154926020820193845260036002820154916040840192835201549360ff608060608501948688168652019560201c1615158552604051958652516020860152516040850152511660608301525115156080820152f35b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f3576108cd90369060040161347d565b6108d8929192613ab8565b81925b81841015610aa75760c0840281019360c0853603126103f75760405194610901866132f4565b803590818752602081013590602088019782895260408101906040830135825261092d606084016135ea565b93606082019480865261095560a0610947608088016135ff565b966080860197885201613780565b9660a0840197885215918215610a9e575b508115610a8b575b50610a25579863ffffffff9260039267ffffffffffffffff8560019a9b9c9d51945192519351169751151596604051946109a78661332c565b85526020850192835260408501938452606085019889526080850197885251168c52600560205260408c20925183555188830155516002820155019251167fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000064ff0000000084549351151560201b16921617179055019291906108db565b8463ffffffff8467ffffffffffffffff8760c4968f604051977f3c0f3232000000000000000000000000000000000000000000000000000000008952516004890152516024880152516044870152511660648501525116608483015251151560a4820152fd5b67ffffffffffffffff915016153861096e565b15915038610966565b6040519180602084016020855252604083019190845b818110610aee57857f4b8db73ca99bc17f5741d6b1dcae3396bfcaad3ecf3742785f459ef163a3004686860387a180f35b90919260c08060019286358152602087013560208201526040870135604082015267ffffffffffffffff610b24606089016135ea565b16606082015263ffffffff610b3b608089016135ff565b166080820152610b4d60a08801613780565b151560a0820152019401929101610abd565b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f357610baf9036906004016134ae565b73ffffffffffffffffffffffffffffffffffffffff600193929354163303610f69575b819291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301915b81811015610f65578060051b84013583811215610f61578401608081360312610f6157604051956080870187811067ffffffffffffffff821117610f3457604052610c47826135ea565b8752610c5560208301613780565b9360208801948552604083013567ffffffffffffffff811161079457610c7e9036908501613b90565b9260408901938452606081013567ffffffffffffffff81116103f757610ca691369101613b90565b966060890197885267ffffffffffffffff89511683526002602052604083209160ff835460e01c16875115158091151503610eab575b50600184989301975b89518051821015610d6a579073ffffffffffffffffffffffffffffffffffffffff610d1282600194613b03565b51168c610d1f828d613de6565b610d2c575b505001610ce5565b602067ffffffffffffffff7f9ac16e02c9a455144d35e2f0d80817a608340dee3c104f547ceb4433df418d8292511692604051908152a2388c610d24565b5050989392975094959095825151610d8d575b5050505060010193909293610bfd565b9790949196959297511515600014610e7457855b87518051821015610e6157610dcb8273ffffffffffffffffffffffffffffffffffffffff92613b03565b51168015610e2a579081610de160019389613f7e565b610ded575b5001610da1565b7f85682793ee26ba7d2d073ce790a50b388a1791aab25fc368bcce99d3b1d4da80602067ffffffffffffffff8d511692604051908152a238610de6565b60248867ffffffffffffffff8c51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b5050965092509293506001388080610d7d565b60248667ffffffffffffffff8a51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b83547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681151560e01b7cff00000000000000000000000000000000000000000000000000000000161784557f8504171b9fc8a6c38617bdd508715ec759043b69df1608d7b0db90c0f8523492602067ffffffffffffffff8d511692604051908152a238610cdc565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8580fd5b8480f35b73ffffffffffffffffffffffffffffffffffffffff60075416330315610bd2576004827f905d7d9b000000000000000000000000000000000000000000000000000000008152fd5b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a602061100c613275565b611014613ab8565b8060e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000060045416176004557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f3576101c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126103f357604051906101c0820182811067ffffffffffffffff82111761196757604052611159816004016135ea565b8252611167602482016135ea565b6020830152611178604482016135ea565b6040830152611189606482016135ff565b606083015261119a608482016135ff565b608083015260a48101357fffffffff00000000000000000000000000000000000000000000000000000000811681036103f75760a083015260c481013560c083015260e481013567ffffffffffffffff81116103f7576112009060043691840101613610565b60e083015261010481013567ffffffffffffffff81116103f75761122a9060043691840101613610565b61010083015261012481013567ffffffffffffffff81116103f7576112559060043691840101613610565b61012083015261014481013567ffffffffffffffff81116103f7576112809060043691840101613610565b61014083015261016481013567ffffffffffffffff81116103f7576112ab9060043691840101613610565b61016083015261018481013567ffffffffffffffff81116103f7578101366023820112156103f7576004810135906112e2826134df565b916112f06040519384613348565b80835260051b8101602401602083013682116104335760248301905b82821061193157505050506101808301526101a48101359067ffffffffffffffff82116103f75760046113429236920101613610565b6101a08201526024359060443567ffffffffffffffff81116103f75761136c90369060040161344f565b9261138167ffffffffffffffff8451166139b6565b67ffffffffffffffff835116808652600260205273ffffffffffffffffffffffffffffffffffffffff604087205416908115611906576020906044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156118fb5786916118dc575b50156118b0576101e184106118885783600411611884577fffffffff00000000000000000000000000000000000000000000000000000000823516927fffffffff000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000169384810361185457506101809361017c600087871161018d57506114cb817fffffffff00000000000000000000000000000000000000000000000000000000928701908803906138fd565b16908082036118265750506000916101a0948581116103f7578686116103f7576114fa90808703908601613963565b908181036117f857505067ffffffffffffffff81511686526005602052604086209160038301549160ff8360201c16156117c257506000905085600c1161018d575063ffffffff61154f6004600886016138fd565b60e01c91168082036117945750600091905061011c8581116107945760019061159d907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff040160fc8601613963565b9101548082036117665750508484841161018d576102047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f60049760209788965087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6082019061019c6040519b8c9a8b997f57ecfd28000000000000000000000000000000000000000000000000000000008b526040838c0152508260448b01520160648901378b6102008801528186880161020060248a0152526102248701378986857ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe608489010101015201168201010301818573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af190811561175b57829161172c575b50156117045780f35b807fbc40f5560000000000000000000000000000000000000000000000000000000060049252fd5b61174e915060203d602011611754575b6117468183613348565b81019061399e565b386116fb565b503d61173c565b6040513d84823e3d90fd5b7f7d8b101a000000000000000000000000000000000000000000000000000000008752600452602452604485fd5b7fe366a117000000000000000000000000000000000000000000000000000000008752600452602452604485fd5b517fd201c48a00000000000000000000000000000000000000000000000000000000885267ffffffffffffffff16600452602487fd5b7f6c86fa3a000000000000000000000000000000000000000000000000000000008852600452602452604486fd5b7fadaf7739000000000000000000000000000000000000000000000000000000008852600452602452604486fd5b86604491867fadaf7739000000000000000000000000000000000000000000000000000000008352600452602452fd5b8480fd5b6004857f1ede477b000000000000000000000000000000000000000000000000000000008152fd5b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6118f5915060203d602011611754576117468183613348565b38611401565b6040513d88823e3d90fd5b7f4d1aff7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b813567ffffffffffffffff811161196357602091611958839283600436928a01010161362e565b81520191019061130c565b8880fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5767ffffffffffffffff6119d56135d3565b8260a06040516119e4816132f4565b82815282602082015282604082015282606082015282608082015201521680825260026020526040822080549260405193611a1e856132f4565b73ffffffffffffffffffffffffffffffffffffffff8116855260208501938452604085019060ff8160e01c1615158252606086019361ffff8260a01c1685526001608088019163ffffffff8460b01c16835261ffff60a08a019460d01c1684520194604051938460208854918281520190819888526020882090885b818110611b61575050509261ffff86959363ffffffff93611ac867ffffffffffffffff9d9984980389613348565b6040519c8d9c8d73ffffffffffffffffffffffffffffffffffffffff60e082019c51169052511660208d015251151560408c0152511660608a015251166080880152511660a086015260e060c086015251809152610100840192915b818110611b32575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611b24565b8254845260209093019260019283019201611a9a565b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57611bc5611bb16137e0565b60405191829160208352602083019061355c565b0390f35b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57805473ffffffffffffffffffffffffffffffffffffffff81163303611c86577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760408051611cea81613310565b8281528260208201520152611bc5604051611d0481613310565b73ffffffffffffffffffffffffffffffffffffffff60065416815261ffff60075473ffffffffffffffffffffffffffffffffffffffff8116602084015260a01c16604082015260405191829182919091604061ffff81606084019573ffffffffffffffffffffffffffffffffffffffff815116855273ffffffffffffffffffffffffffffffffffffffff6020820151166020860152015116910152565b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f357366023820112156103f3578060040135611dfc816134df565b91611e0a6040519384613348565b8183526024602084019260051b820101903682116118845760248101925b8284106121b9578585611e39613ab8565b600354908051611e476137e0565b92845b8181106120c6575050835b818110611ea857847fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d07586611e9a866107588760405193849360408552604085019061355c565b90838203602085015261355c565b611eb28184613b03565b516003546801000000000000000081101561209957806001611ed79201600355613b46565b91909161206d5780519067ffffffffffffffff821161204057611efa835461378d565b601f8111612005575b50602090601f8311600114611f6257600194939291899183611f57575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82861b9260031b1c19161790555b01611e55565b015190508980611f20565b83895281892091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084168a5b818110611fed575091600196959492918388959310611fb6575b505050811b019055611f51565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055898080611fa9565b92936020600181928786015181550195019301611f8f565b61203090848a5260208a20601f850160051c81019160208610612036575b601f0160051c0190613b79565b88611f03565b9091508190612023565b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024877f4e487b7100000000000000000000000000000000000000000000000000000000815280600452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b600354801561218c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016120fa81613b46565b6121605790878261210e600195945461378d565b80612120575b50505060035501611e4a565b601f811186146121355750555b878980612114565b8183526020832061215091601f0160051c8101908701613b79565b808252816020812091555561212d565b6024887f4e487b7100000000000000000000000000000000000000000000000000000000815280600452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b833567ffffffffffffffff811161043357820136604382011215610433576020916121ef839236906044602482013591016134f7565b815201930192611e28565b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f35761224a9036906004016134ae565b9073ffffffffffffffffffffffffffffffffffffffff600654169081156123f957835b83811015610f65578060051b82013573ffffffffffffffffffffffffffffffffffffffff8116809103610f61576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa9081156123ee5787916123bd575b50806122ee575b505060010161226d565b602087604051828101907fa9059cbb00000000000000000000000000000000000000000000000000000000825288602482015284604482015260448152612336606482613348565b519082865af1156118fb5786513d6123b45750813b155b6123885790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a390386122e4565b602487837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b6001141561234d565b90506020813d82116123e6575b816123d760209383613348565b810103126104335751386122dd565b3d91506123ca565b6040513d89823e3d90fd5b6004847f8579befe000000000000000000000000000000000000000000000000000000008152fd5b503461018d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5760043567ffffffffffffffff81116103f35761247190369060040161347d565b612479613ab8565b612482816134df565b916124906040519384613348565b81835260c060208401920281019036821161188457915b8183106126e2578480855b80518310156126de576124c58382613b03565b519267ffffffffffffffff6020850151169384156126b2578484526002602052604080852082518154928401517fffffff00ffffffffffffffff000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff919091161791151560e01b7cff000000000000000000000000000000000000000000000000000000001691909117815590606081015182547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1660a09190911b75ffff00000000000000000000000000000000000000001617825560808101805163ffffffff16156126865760019495969260ff73ffffffffffffffffffffffffffffffffffffffff7f4cef55db91890720ca3d94563535726752813bffa29490d6d41218acb6831cc9946040945184547fffffffff000000000000ffffffffffffffffffffffffffffffffffffffffffff79ffffffff000000000000000000000000000000000000000000007bffff000000000000000000000000000000000000000000000000000060a086015160d01b169360b01b1691161717809455511691835192835260e01c1615156020820152a20191906124b2565b602486887f9e720551000000000000000000000000000000000000000000000000000000008252600452fd5b602484867f97ccaab7000000000000000000000000000000000000000000000000000000008252600452fd5b5080f35b60c08336031261188457604051906126f9826132f4565b83359073ffffffffffffffffffffffffffffffffffffffff82168203610433578260209260c0945261272c8387016135ea565b8382015261273c60408701613780565b604082015261274d60608701613708565b606082015261275e608087016135ff565b608082015261276f60a08701613708565b60a08201528152019201916124a7565b503461018d5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d576004359067ffffffffffffffff821161018d5781600401918036036101c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610794576127fd6133e8565b5060843567ffffffffffffffff81116103f75761281e90369060040161344f565b949092602481019261283761283285613717565b6139b6565b61284084613717565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd610124840135910181121561043357820160048101359067ffffffffffffffff8211612c915760248101918036038313611963576020908201919091031261043357359073ffffffffffffffffffffffffffffffffffffffff82168092036104335767ffffffffffffffff168087526002602052604087209081549073ffffffffffffffffffffffffffffffffffffffff8216908115612ffe576020906024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015612ff3578990612f90575b73ffffffffffffffffffffffffffffffffffffffff9150163303612f645760e01c60ff16612f1c575b505067ffffffffffffffff61297c84613717565b1685526005602052604085209160038301549360ff8560201c1615612ede575061018482019060016129ae838361372c565b905003612ea857906129bf9161372c565b15612e7b5780357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4182360301811215610433576129fe9136910161362e565b936040850151916020838051810103126104335760208301519273ffffffffffffffffffffffffffffffffffffffff8416809403612c915773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016809403612e3d57506080860180516020815111612dff57506002850154908115612d1b5750975b60405192612aa1846132a9565b602435845260208401916107d0835260a48a9401357fffffffff000000000000000000000000000000000000000000000000000000008116809103612d1757612c64575b505063ffffffff73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001697519554915116925193604051947fffffffff000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000166020870152602486015260248552612b8d604486613348565b873b15611963579388979592938894612c0b9363ffffffff99976040519d8e9b8c9a8b997f779b432d000000000000000000000000000000000000000000000000000000008b5260048b015216602489015260448801526064870152608486015260a485015260c484015261010060e4840152610104830190613389565b03925af1918215612c575781611bc593612c47575b505060405190612c31602083613348565b8152604051918291602083526020830190613389565b612c5091613348565b3881612c20565b50604051903d90823e3d90fd5b6103e88352919250908015612cc05760208103612c95578160209181010312612c915735905b3880612ae5565b8780fd5b7f4a895e59000000000000000000000000000000000000000000000000000000008952600452602488fd5b5050855161ffff60075460a01c1690818102918183041490151715612cea57612710900490612c8a565b6024887f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b8a80fd5b9050516020815111612dbd57602081519101519060208110612d8c575b8060031b9080820460081490151715612d5f57610100036101008111612d5f571c97612a94565b6024897f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260200360031b1b1690612d38565b612dfb906040519182917fe0d7fb02000000000000000000000000000000000000000000000000000000008352602060048401526024830190613389565b0390fd5b612dfb906040519182917fa3c8cf09000000000000000000000000000000000000000000000000000000008352602060048401526024830190613389565b612dfb906040519182917f22d4cfe2000000000000000000000000000000000000000000000000000000008352602060048401526024830190613389565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b612eb5602492889261372c565b7f40de710500000000000000000000000000000000000000000000000000000000835260045250fd5b8667ffffffffffffffff612ef3602493613717565b7fd201c48a00000000000000000000000000000000000000000000000000000000835216600452fd5b60008281526002909101602052604090205415612f395780612968565b7fd0d25976000000000000000000000000000000000000000000000000000000008652600452602485fd5b6024887f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011612feb575b81612faa60209383613348565b81010312611963575173ffffffffffffffffffffffffffffffffffffffff811681036119635773ffffffffffffffffffffffffffffffffffffffff9061293f565b3d9150612f9d565b6040513d8b823e3d90fd5b7f4d1aff7e000000000000000000000000000000000000000000000000000000008a52600452602489fd5b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d5750611bc560405161306a604082613348565b601281527f43435450566572696669657220322e302e3000000000000000000000000000006020820152604051918291602083526020830190613389565b503461018d57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018d57608060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602082015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604082015263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166060820152f35b9050346103f35760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103f3576020907fffffffff00000000000000000000000000000000000000000000000000000000613218613275565b167fd3e969cd00000000000000000000000000000000000000000000000000000000811490811561324b575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613244565b600435907fffffffff00000000000000000000000000000000000000000000000000000000821682036132a457565b600080fd5b6040810190811067ffffffffffffffff8211176132c557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60c0810190811067ffffffffffffffff8211176132c557604052565b6060810190811067ffffffffffffffff8211176132c557604052565b60a0810190811067ffffffffffffffff8211176132c557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176132c557604052565b919082519283825260005b8481106133d35750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613394565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036132a457565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036132a457565b359073ffffffffffffffffffffffffffffffffffffffff821682036132a457565b9181601f840112156132a45782359167ffffffffffffffff83116132a457602083818601950101116132a457565b9181601f840112156132a45782359167ffffffffffffffff83116132a45760208085019460c085020101116132a457565b9181601f840112156132a45782359167ffffffffffffffff83116132a4576020808501948460051b0101116132a457565b67ffffffffffffffff81116132c55760051b60200190565b92919267ffffffffffffffff82116132c5576040519161353f601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613348565b8294818452818301116132a4578281602093846000960137010152565b9080602083519182815201916020808360051b8301019401926000915b83831061358857505050505090565b90919293946020806135c4837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951613389565b97019301930191939290613579565b6004359067ffffffffffffffff821682036132a457565b359067ffffffffffffffff821682036132a457565b359063ffffffff821682036132a457565b9080601f830112156132a45781602061362b933591016134f7565b90565b919060c0838203126132a45760405190613647826132f4565b819380358352602081013567ffffffffffffffff81116132a4578261366d918301613610565b6020840152604081013567ffffffffffffffff81116132a45782613692918301613610565b6040840152606081013567ffffffffffffffff81116132a457826136b7918301613610565b6060840152608081013567ffffffffffffffff81116132a457826136dc918301613610565b608084015260a08101359167ffffffffffffffff83116132a45760a0926137039201613610565b910152565b359061ffff821682036132a457565b3567ffffffffffffffff811681036132a45790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156132a4570180359067ffffffffffffffff82116132a457602001918160051b360383136132a457565b359081151582036132a457565b90600182811c921680156137d6575b60208310146137a757565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161379c565b600354906137ed826134df565b916137fb6040519384613348565b808352600360009081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9190602085015b82821061383a5750505050565b6040516000855461384a8161378d565b80845290600181169081156138bc5750600114613884575b506001928261387685946020940382613348565b81520194019101909261382d565b6000878152602081209092505b8183106138a657505081016020016001613862565b6001816020925483868801015201920191613891565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b8401909101915060019050613862565b919091357fffffffff0000000000000000000000000000000000000000000000000000000081169260048110613931575050565b7fffffffff00000000000000000000000000000000000000000000000000000000929350829060040360031b1b161690565b359060208110613971575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060200360031b1b1690565b908160209103126132a4575180151581036132a45790565b6040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815277ffffffffffffffff000000000000000000000000000000008260801b16600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115613aac57600091613a8d575b50613a555750565b67ffffffffffffffff907ffdbd6a72000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b613aa6915060203d602011611754576117468183613348565b38613a4d565b6040513d6000823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff600154163303613ad957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b8051821015613b175760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600354811015613b1757600360005260206000200190600090565b8054821015613b175760005260206000200190600090565b818110613b84575050565b60008155600101613b79565b9080601f830112156132a4578135613ba7816134df565b92613bb56040519485613348565b81845260208085019260051b8201019283116132a457602001905b828210613bdd5750505090565b60208091613bea8461342e565b815201910190613bd0565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115613cd757613c2881613cdc565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616613cd75761ffff8360e01c168015918215613cc6575b5050613c72575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880613c68565b505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115613de2577dffff00000000000000000000000000000000000000000000000000000000811615613dd95760ff60015b169060f01c80613d74575b50600103613d475750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b60108110613d855750613d3c565b6001811b8216613d98575b600101613d77565b9160018101809111613daa5791613d90565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff6000613d31565b5050565b9060018201918160005282602052604060002054801515600014613f75577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613daa578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613daa57818103613f09575b50505080548015613eda577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190613e9b8282613b61565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b613f5e613f19613f299386613b61565b90549060031b1c92839286613b61565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005283602052604060002055388080613e63565b50505050600090565b6000828152600182016020526040902054613fd357805490680100000000000000008210156132c55782613fbc613f29846001809601855584613b61565b905580549260005201602052604060002055600190565b505060009056fea164736f6c634300081a000a" - -type CCTPVerifierContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCCTPVerifierContract( - address common.Address, - backend bind.ContractBackend, -) (*CCTPVerifierContract, error) { - parsed, err := abi.JSON(strings.NewReader(CCTPVerifierABI)) - if err != nil { - return nil, err - } - return &CCTPVerifierContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CCTPVerifierContract) Address() common.Address { - return c.address -} - -func (c *CCTPVerifierContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CCTPVerifierContract) ApplyRemoteChainConfigUpdates(opts *bind.TransactOpts, args []RemoteChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyRemoteChainConfigUpdates", args) -} - -func (c *CCTPVerifierContract) SetDomains(opts *bind.TransactOpts, args []SetDomainArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDomains", args) -} - -func (c *CCTPVerifierContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -func (c *CCTPVerifierContract) ApplyAllowlistUpdates(opts *bind.TransactOpts, args []AllowlistConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowlistUpdates", args) -} - -func (c *CCTPVerifierContract) UpdateStorageLocations(opts *bind.TransactOpts, args []string) (*types.Transaction, error) { - return c.contract.Transact(opts, "updateStorageLocations", args) -} - -func (c *CCTPVerifierContract) SetAllowedFinalityConfig(opts *bind.TransactOpts, args [4]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setAllowedFinalityConfig", args) -} - -func (c *CCTPVerifierContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *CCTPVerifierContract) VersionTag(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "versionTag") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -func (c *CCTPVerifierContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *CCTPVerifierContract) GetRemoteChainConfig(opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteChainConfig", args) - outstruct := new(GetRemoteChainConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.RemoteChainConfig = *abi.ConvertType(out[0], new(RemoteChainConfigArgs)).(*RemoteChainConfigArgs) - outstruct.AllowedSendersList = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - - return *outstruct, nil -} - -func (c *CCTPVerifierContract) GetDomain(opts *bind.CallOpts, args uint64) (Domain, error) { - var out []any - err := c.contract.Call(opts, &out, "getDomain", args) - if err != nil { - var zero Domain - return zero, err - } - return *abi.ConvertType(out[0], new(Domain)).(*Domain), nil -} - -func (c *CCTPVerifierContract) GetStaticConfig(opts *bind.CallOpts) (GetStaticConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - outstruct := new(GetStaticConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.TokenMessenger = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.MessageTransmitterProxy = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.UsdcToken = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) - outstruct.LocalDomainIdentifier = *abi.ConvertType(out[3], new(uint32)).(*uint32) - - return *outstruct, nil -} - -func (c *CCTPVerifierContract) GetStorageLocations(opts *bind.CallOpts) ([]string, error) { - var out []any - err := c.contract.Call(opts, &out, "getStorageLocations") - if err != nil { - var zero []string - return zero, err - } - return *abi.ConvertType(out[0], new([]string)).(*[]string), nil -} - -func (c *CCTPVerifierContract) GetAllowedFinalityConfig(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedFinalityConfig") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -func (c *CCTPVerifierContract) GetFee(opts *bind.CallOpts, destChainSelector uint64, arg1 EVM2AnyMessage, arg2 []byte, requestedFinality [4]byte) (GetFeeResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getFee", destChainSelector, arg1, arg2, requestedFinality) - outstruct := new(GetFeeResult) - if err != nil { - return *outstruct, err - } - - outstruct.FeeUSDCents = *abi.ConvertType(out[0], new(uint16)).(*uint16) - outstruct.GasForVerification = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.PayloadSizeBytes = *abi.ConvertType(out[2], new(uint32)).(*uint32) - - return *outstruct, nil -} - -type AllowlistConfigArgs struct { - DestChainSelector uint64 - AllowlistEnabled bool - AddedAllowlistedSenders []common.Address - RemovedAllowlistedSenders []common.Address -} - -type BaseVerifierArgs struct { - StorageLocations []string - Rmn common.Address - VersionTag [4]byte -} - -type Domain struct { - AllowedCallerOnDest [32]byte - AllowedCallerOnSource [32]byte - MintRecipientOnDest [32]byte - DomainIdentifier uint32 - Enabled bool -} - -type DynamicConfig struct { - FeeAggregator common.Address - AllowlistAdmin common.Address - FastFinalityBps uint16 -} - -type EVM2AnyMessage struct { - Receiver []byte - Data []byte - TokenAmounts []EVMTokenAmount - FeeToken common.Address - ExtraArgs []byte -} - -type EVMTokenAmount struct { - Token common.Address - Amount *big.Int -} - -type GetFeeResult struct { - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint32 -} - -type GetRemoteChainConfigResult struct { - RemoteChainConfig RemoteChainConfigArgs - AllowedSendersList []common.Address -} - -type GetStaticConfigResult struct { - TokenMessenger common.Address - MessageTransmitterProxy common.Address - UsdcToken common.Address - LocalDomainIdentifier uint32 -} - -type RemoteChainConfigArgs struct { - Router common.Address - RemoteChainSelector uint64 - AllowlistEnabled bool - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint16 -} - -type SetDomainArgs struct { - AllowedCallerOnDest [32]byte - AllowedCallerOnSource [32]byte - MintRecipientOnDest [32]byte - ChainSelector uint64 - DomainIdentifier uint32 - Enabled bool -} - type GetFeeArgs struct { - DestChainSelector uint64 - Arg1 EVM2AnyMessage - Arg2 []byte - RequestedFinality [4]byte + DestChainSelector uint64 `json:"destChainSelector"` + Arg1 gobindings.ClientEVM2AnyMessage `json:"arg1"` + Arg2 []byte `json:"arg2"` + RequestedFinality [4]byte `json:"requestedFinality"` } type ConstructorArgs struct { - TokenMessenger common.Address - MessageTransmitterProxy common.Address - UsdcToken common.Address - DynamicConfig DynamicConfig - BaseVerifierArgs BaseVerifierArgs + TokenMessenger common.Address `json:"tokenMessenger"` + MessageTransmitterProxy common.Address `json:"messageTransmitterProxy"` + UsdcToken common.Address `json:"usdcToken"` + DynamicConfig gobindings.CCTPVerifierDynamicConfig `json:"dynamicConfig"` + BaseVerifierArgs gobindings.CCTPVerifierBaseVerifierArgs `json:"baseVerifierArgs"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "cctp-verifier:deploy", - Version: Version, - Description: "Deploys the CCTPVerifier contract", - ContractMetadata: &bind.MetaData{ - ABI: CCTPVerifierABI, - Bin: CCTPVerifierBin, - }, + Name: "cctp-verifier:deploy", + Version: Version, + Description: "Deploys the CCTPVerifier contract", + ContractMetadata: gobindings.CCTPVerifierMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(CCTPVerifierBin), + EVM: common.FromHex(gobindings.CCTPVerifierMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyRemoteChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]RemoteChainConfigArgs, *CCTPVerifierContract]{ - Name: "cctp-verifier:apply-remote-chain-config-updates", - Version: Version, - Description: "Calls applyRemoteChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, []RemoteChainConfigArgs], - Validate: func([]RemoteChainConfigArgs) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args []RemoteChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyRemoteChainConfigUpdates(opts, args) - }, -}) - -var SetDomains = contract.NewWrite(contract.WriteParams[[]SetDomainArgs, *CCTPVerifierContract]{ - Name: "cctp-verifier:set-domains", - Version: Version, - Description: "Calls setDomains on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, []SetDomainArgs], - Validate: func([]SetDomainArgs) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args []SetDomainArgs, - ) (*types.Transaction, error) { - return c.SetDomains(opts, args) - }, -}) - -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *CCTPVerifierContract]{ - Name: "cctp-verifier:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) - -var ApplyAllowlistUpdates = contract.NewWrite(contract.WriteParams[[]AllowlistConfigArgs, *CCTPVerifierContract]{ - Name: "cctp-verifier:apply-allowlist-updates", - Version: Version, - Description: "Calls applyAllowlistUpdates on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, []AllowlistConfigArgs], - Validate: func([]AllowlistConfigArgs) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args []AllowlistConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowlistUpdates(opts, args) - }, -}) - -var UpdateStorageLocations = contract.NewWrite(contract.WriteParams[[]string, *CCTPVerifierContract]{ - Name: "cctp-verifier:update-storage-locations", - Version: Version, - Description: "Calls updateStorageLocations on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, []string], - Validate: func([]string) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args []string, - ) (*types.Transaction, error) { - return c.UpdateStorageLocations(opts, args) - }, -}) - -var SetAllowedFinalityConfig = contract.NewWrite(contract.WriteParams[[4]byte, *CCTPVerifierContract]{ - Name: "cctp-verifier:set-allowed-finality-config", - Version: Version, - Description: "Calls setAllowedFinalityConfig on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, [4]byte], - Validate: func([4]byte) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args [4]byte, - ) (*types.Transaction, error) { - return c.SetAllowedFinalityConfig(opts, args) - }, -}) - -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *CCTPVerifierContract]{ - Name: "cctp-verifier:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: CCTPVerifierABI, - NewContract: NewCCTPVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CCTPVerifierContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *CCTPVerifierContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) - -var VersionTag = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *CCTPVerifierContract]{ - Name: "cctp-verifier:version-tag", - Version: Version, - Description: "Calls versionTag on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.VersionTag(opts) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, -}) - -var GetRemoteChainConfig = contract.NewRead(contract.ReadParams[uint64, GetRemoteChainConfigResult, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-remote-chain-config", - Version: Version, - Description: "Calls getRemoteChainConfig on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - return c.GetRemoteChainConfig(opts, args) - }, -}) - -var GetDomain = contract.NewRead(contract.ReadParams[uint64, Domain, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-domain", - Version: Version, - Description: "Calls getDomain on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args uint64) (Domain, error) { - return c.GetDomain(opts, args) - }, }) -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, GetStaticConfigResult, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args struct{}) (GetStaticConfigResult, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetStorageLocations = contract.NewRead(contract.ReadParams[struct{}, []string, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-storage-locations", - Version: Version, - Description: "Calls getStorageLocations on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args struct{}) ([]string, error) { - return c.GetStorageLocations(opts) - }, -}) - -var GetAllowedFinalityConfig = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-allowed-finality-config", - Version: Version, - Description: "Calls getAllowedFinalityConfig on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.GetAllowedFinalityConfig(opts) - }, -}) - -var GetFee = contract.NewRead(contract.ReadParams[GetFeeArgs, GetFeeResult, *CCTPVerifierContract]{ - Name: "cctp-verifier:get-fee", - Version: Version, - Description: "Calls getFee on the contract", - ContractType: ContractType, - NewContract: NewCCTPVerifierContract, - CallContract: func(c *CCTPVerifierContract, opts *bind.CallOpts, args GetFeeArgs) (GetFeeResult, error) { - return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) - }, -}) +func NewWriteApplyRemoteChainConfigUpdates(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierRemoteChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierRemoteChainConfigArgs, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:apply-remote-chain-config-updates", + Version: Version, + Description: "Calls applyRemoteChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierRemoteChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierRemoteChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyRemoteChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteSetDomains(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.CCTPVerifierSetDomainArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.CCTPVerifierSetDomainArgs, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:set-domains", + Version: Version, + Description: "Calls setDomains on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.CCTPVerifierSetDomainArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.CCTPVerifierSetDomainArgs, + ) (*types.Transaction, error) { + return c.SetDomains(opts, args) + }, + }) +} + +func NewWriteSetDynamicConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.CCTPVerifierDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.CCTPVerifierDynamicConfig, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args gobindings.CCTPVerifierDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args gobindings.CCTPVerifierDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} + +func NewWriteApplyAllowlistUpdates(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierAllowlistConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierAllowlistConfigArgs, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:apply-allowlist-updates", + Version: Version, + Description: "Calls applyAllowlistUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierAllowlistConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierAllowlistConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowlistUpdates(opts, args) + }, + }) +} + +func NewWriteUpdateStorageLocations(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]string], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]string, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:update-storage-locations", + Version: Version, + Description: "Calls updateStorageLocations on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args []string) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args []string, + ) (*types.Transaction, error) { + return c.UpdateStorageLocations(opts, args) + }, + }) +} + +func NewWriteSetAllowedFinalityConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[4]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[4]byte, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:set-allowed-finality-config", + Version: Version, + Description: "Calls setAllowedFinalityConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args [4]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args [4]byte, + ) (*types.Transaction, error) { + return c.SetAllowedFinalityConfig(opts, args) + }, + }) +} + +func NewWriteWithdrawFeeTokens(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.CCTPVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CCTPVerifierInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} + +func NewReadVersionTag(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:version-tag", + Version: Version, + Description: "Calls versionTag on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.VersionTag(opts) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.CCTPVerifierDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.CCTPVerifierDynamicConfig, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args struct{}) (gobindings.CCTPVerifierDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewReadGetRemoteChainConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetRemoteChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetRemoteChainConfig, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-remote-chain-config", + Version: Version, + Description: "Calls getRemoteChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.GetRemoteChainConfig, error) { + return c.GetRemoteChainConfig(opts, args) + }, + }) +} + +func NewReadGetDomain(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.CCTPVerifierDomain, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.CCTPVerifierDomain, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-domain", + Version: Version, + Description: "Calls getDomain on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.CCTPVerifierDomain, error) { + return c.GetDomain(opts, args) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.GetStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.GetStaticConfig, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args struct{}) (gobindings.GetStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetStorageLocations(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []string, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []string, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-storage-locations", + Version: Version, + Description: "Calls getStorageLocations on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args struct{}) ([]string, error) { + return c.GetStorageLocations(opts) + }, + }) +} + +func NewReadGetAllowedFinalityConfig(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-allowed-finality-config", + Version: Version, + Description: "Calls getAllowedFinalityConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.GetAllowedFinalityConfig(opts) + }, + }) +} + +func NewReadGetFee(c gobindings.CCTPVerifierInterface) *cld_ops.Operation[contract.FunctionInput[GetFeeArgs], gobindings.GetFee, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetFeeArgs, gobindings.GetFee, gobindings.CCTPVerifierInterface]{ + Name: "cctp-verifier:get-fee", + Version: Version, + Description: "Calls getFee on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CCTPVerifierInterface, opts *bind.CallOpts, args GetFeeArgs) (gobindings.GetFee, error) { + return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/committee_verifier/committee_verifier.go b/chains/evm/deployment/v2_0_0/operations/committee_verifier/committee_verifier.go index 50303df820..940d9a5385 100644 --- a/chains/evm/deployment/v2_0_0/operations/committee_verifier/committee_verifier.go +++ b/chains/evm/deployment/v2_0_0/operations/committee_verifier/committee_verifier.go @@ -3,422 +3,253 @@ package committee_verifier import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CommitteeVerifier" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CommitteeVerifierABI = `[{"type":"constructor","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct CommitteeVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]},{"name":"storageLocations","type":"string[]","internalType":"string[]"},{"name":"rmn","type":"address","internalType":"address"},{"name":"versionTag","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"acceptStorageLocationsAdmin","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowlistUpdates","inputs":[{"name":"allowlistConfigArgsItems","type":"tuple[]","internalType":"struct BaseVerifier.AllowlistConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"addedAllowlistedSenders","type":"address[]","internalType":"address[]"},{"name":"removedAllowlistedSenders","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyRemoteChainConfigUpdates","inputs":[{"name":"remoteChainConfigArgs","type":"tuple[]","internalType":"struct BaseVerifier.RemoteChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applySignatureConfigs","inputs":[{"name":"sourceChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"signatureConfigs","type":"tuple[]","internalType":"struct SignatureQuorumValidator.SignatureConfig[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"threshold","type":"uint8","internalType":"uint8"},{"name":"signers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"forwardToVerifier","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"","type":"bytes32","internalType":"bytes32"},{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"verifierReturnData","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getAllSignatureConfigs","inputs":[],"outputs":[{"name":"configs","type":"tuple[]","internalType":"struct SignatureQuorumValidator.SignatureConfig[]","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"threshold","type":"uint8","internalType":"uint8"},{"name":"signers","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct CommitteeVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"","type":"bytes","internalType":"bytes"},{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"getPendingStorageLocationsAdmin","inputs":[],"outputs":[{"name":"pendingStorageLocationsAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"remoteChainConfig","type":"tuple","internalType":"struct BaseVerifier.RemoteChainConfigArgs","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]},{"name":"allowedSendersList","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getSignatureConfig","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"signers","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getStorageLocations","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getStorageLocationsAdmin","inputs":[],"outputs":[{"name":"storageLocationsAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct CommitteeVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferStorageLocationsAdmin","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateStorageLocations","inputs":[{"name":"newLocations","type":"string[]","internalType":"string[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verifyMessage","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageHash","type":"bytes32","internalType":"bytes32"},{"name":"verifierResults","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"view"},{"type":"function","name":"versionTag","inputs":[],"outputs":[{"name":"tag","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListSendersAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListSendersRemoved","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListStateChanged","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct CommitteeVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowlistAdmin","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RemoteChainConfigSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"SignatureConfigSet","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"signers","type":"address[]","indexed":false,"internalType":"address[]"},{"name":"threshold","type":"uint8","indexed":false,"internalType":"uint8"}],"anonymous":false},{"type":"event","name":"StorageLocationsAdminTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StorageLocationsAdminTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"StorageLocationsUpdated","inputs":[{"name":"oldLocations","type":"string[]","indexed":false,"internalType":"string[]"},{"name":"newLocations","type":"string[]","indexed":false,"internalType":"string[]"}],"anonymous":false},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DestGasCannotBeZero","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ForkedChain","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"actual","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidAllowListRequest","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidCCVVersion","inputs":[{"name":"verifierVersion","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSignatureConfig","inputs":[]},{"type":"error","name":"InvalidVerifierResults","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustBeProposedStorageLocationsAdmin","inputs":[]},{"type":"error","name":"NonOrderedOrNonUniqueSignatures","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwnerOrAllowlistAdmin","inputs":[]},{"type":"error","name":"OnlyCallableByStorageLocationsAdmin","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"RemoteChainNotSupported","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"SignerCannotBeZeroAddress","inputs":[]},{"type":"error","name":"SourceNotConfigured","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"UnauthorizedSigner","inputs":[]},{"type":"error","name":"VersionTagCannotBeZero","inputs":[]},{"type":"error","name":"WrongNumberOfSignatures","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const CommitteeVerifierBin = "0x60e080604052346105a05761417b803803809161001c828561061d565b833981019080820360a081126105a0576040136105a057604080519081016001600160401b038111828210176104135760405261005882610640565b815261006660208301610640565b6020820190815260408301519091906001600160401b0381116105a057830184601f820112156105a05780519061009c82610654565b956100aa604051978861061d565b82875260208088019360051b830101918183116105a05760208101935b8385106105a557505050505060806100e160608501610640565b9301519263ffffffff60e01b8416948585036105a057331561058f57600180546001600160a01b0319163317905546608052600654815190919061012483610654565b92610132604051948561061d565b808452600660009081527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f90602086015b8382106104ea5750505060005b81811061045557505060005b8181106102c65750507fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d07586916101d06101c2926040519384936040855260408501906106fa565b9083820360208501526106fa565b0390a16001600160a01b03169384156102b557156102a45760c09290925260a09290925251600880546001600160a01b03199081166001600160a01b0393841690811790925583516009805490921690841617905560408051918252925190911660208201527f781b4fc361184bd997c249fbc855854e7d6daf1c72a585b5598c778e23dc35cd9190a1600a80546001600160a01b03191633179055604051613a0f908161076c823960805181611055015260a05181613374015260c05181818161019401528181610f710152612aa50152f35b631027401f60e21b60005260046000fd5b6342bcdf7f60e11b60005260046000fd5b825181101561043f5760208160051b8401015160065468010000000000000000811015610413578060016102fd920160065561068e565b919091610429578051906001600160401b0382116104135761031f83546106a9565b601f81116103d6575b50602090601f831160011461036b5760019493929160009183610360575b5050600019600383901b1c191690841b1790555b0161017c565b015190503880610346565b90601f1983169184600052816000209260005b8181106103be5750916001969594929183889593106103a5575b505050811b01905561035a565b015160001960f88460031b161c19169055388080610398565b9293602060018192878601518155019501930161037e565b61040390846000526020600020601f850160051c81019160208610610409575b601f0160051c01906106e3565b38610328565b90915081906103f6565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052600060045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60065480156104d457600019019061046c8261068e565b9290926104295782610480600194546106a9565b9081610492575b505060065501610170565b81601f6000931186146104a95750555b3880610487565b818352602083206104c491601f0160051c81019087016106e3565b80825281602081209155556104a2565b634e487b7160e01b600052603160045260246000fd5b604051600084546104fa816106a9565b808452906001811690811561056c5750600114610534575b50600192826105268594602094038261061d565b815201930191019091610163565b6000868152602081209092505b81831061055657505081016020016001610512565b6001816020925483868801015201920191610541565b60ff191660208581019190915291151560051b8401909101915060019050610512565b639b15e16f60e01b60005260046000fd5b600080fd5b84516001600160401b0381116105a05782019083603f830112156105a0576020820151906001600160401b038211610413576040516105ee601f8401601f19166020018261061d565b82815260408484010186106105a0576106126020949385946040868501910161066b565b8152019401936100c7565b601f909101601f19168101906001600160401b0382119082101761041357604052565b51906001600160a01b03821682036105a057565b6001600160401b0381116104135760051b60200190565b60005b83811061067e5750506000910152565b818101518382015260200161066e565b60065481101561043f57600660005260206000200190600090565b90600182811c921680156106d9575b60208310146106c357565b634e487b7160e01b600052602260045260246000fd5b91607f16916106b8565b8181106106ee575050565b600081556001016106e3565b9080602083519182815201916020808360051b8301019401926000915b83831061072657505050505090565b909192939460208080600193601f1986820301875289516107528151809281855285808601910161066b565b601f01601f19160101970195949190910192019061071756fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714612c4557508063181f5a7714612bc8578063296947061461289f5780632b7ae733146127d85780633a3d72b514612727578063449e6a971461229f578063597b95c314611f405780635cb80c5d14611d0b5780635ef2c64b146118dc5780637437ff9f1461181b57806379ba5097146117325780638282cbfe14611649578063869b7f621461150557806387ae9292146114b7578063898068fc1461130f57806389e364c714610e755780638da5cb5b14610e23578063a4422ad814610dd1578063aa8dac9814610b54578063b6cfa3b714610a9a578063c9b146b31461063b578063ec6ae7a7146105da578063f2fde38b146104ea578063f4cdd89e1461020f578063f96c05ca146101bd5763fe163eed1461013d57600080fd5b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760206040517fffffffff000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000168152f35b600080fd5b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b346101b85760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857610246612eb5565b60243567ffffffffffffffff81116101b85760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82360301126101b8576040519060a0820182811067ffffffffffffffff8211176104bb57604052806004013567ffffffffffffffff81116101b8576102c69060043691840101613071565b8252602481013567ffffffffffffffff81116101b8576102ec9060043691840101613071565b6020830152604481013567ffffffffffffffff81116101b8578101366023820112156101b857600481013561032081612f7d565b9161032e6040519384612d80565b818352602060048185019360061b83010101903682116101b857602401915b81831061048357505050604083015261036860648201612e66565b6060830152608481013567ffffffffffffffff81116101b85760809160046103939236920101613071565b91015260443567ffffffffffffffff81116101b8576103b6903690600401613071565b50606435907fffffffff00000000000000000000000000000000000000000000000000000000821682036101b85767ffffffffffffffff168060005260056020526040600020549073ffffffffffffffffffffffffffffffffffffffff821615610456575061042d60609260075460e01b906134f0565b61ffff60405191818160a01c16835263ffffffff8160b01c16602084015260d01c166040820152f35b7f4d1aff7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6040833603126101b8576020604091825161049d81612d64565b6104a686612e66565b8152828601358382015281520192019161034d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85773ffffffffffffffffffffffffffffffffffffffff610536612e43565b61053e613420565b163381146105b057807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857602060075460e01b7fffffffff0000000000000000000000000000000000000000000000000000000060405191168152f35b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b85761068a903690600401612f4c565b9073ffffffffffffffffffffffffffffffffffffffff600154163303610a50575b906000917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181360301915b80841015610a4e576000938060051b83013584811215610a4a578301608081360312610a4a57604051956080870187811067ffffffffffffffff821117610a1d5760405261072382612ecc565b87526107316020830161315c565b9360208801948552604083013567ffffffffffffffff8111610a195761075a90369085016130e3565b9260408901938452606081013567ffffffffffffffff8111610a1557610782913691016130e3565b966060890197885267ffffffffffffffff89511683526005602052604083209160ff835460e01c1687511515809115150361098c575b50600184989301975b89518051821015610846579073ffffffffffffffffffffffffffffffffffffffff6107ee82600194613148565b51168c6107fb828d61373e565b610808575b5050016107c1565b602067ffffffffffffffff7f9ac16e02c9a455144d35e2f0d80817a608340dee3c104f547ceb4433df418d8292511692604051908152a28c8c610800565b505097509495909583515161086a575b5050506001919091019450909290506106d6565b9690949195929651151560001461095557855b8751805182101561093d576108a78273ffffffffffffffffffffffffffffffffffffffff92613148565b511680156109065790816108bd600193896138d2565b6108c9575b500161087d565b7f85682793ee26ba7d2d073ce790a50b388a1791aab25fc368bcce99d3b1d4da80602067ffffffffffffffff8d511692604051908152a28a6108c2565b60248867ffffffffffffffff8c51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b50509650935093506001915084939291868080610856565b60248667ffffffffffffffff8a51167f463258ff000000000000000000000000000000000000000000000000000000008252600452fd5b83547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681151560e01b7cff00000000000000000000000000000000000000000000000000000000161784557f8504171b9fc8a6c38617bdd508715ec759043b69df1608d7b0db90c0f8523492602067ffffffffffffffff8d511692604051908152a28a6107b8565b8380fd5b8280fd5b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b8580fd5b005b73ffffffffffffffffffffffffffffffffffffffff600954163303156106ab577f905d7d9b0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b8577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020610af4612cfd565b610afc613420565b8060e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000060075416176007557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a1005b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760405180816020600354928381520160036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9260005b818110610db8575050610bd192500382612d80565b8051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610c17610c0184612f7d565b93610c0f6040519586612d80565b808552612f7d565b0160005b818110610d8c57505060005b8151811015610ce05767ffffffffffffffff610c438284613148565b5116806000526002602052604060002060ff6002820154166040519182602082549182815201916000526020600020906000905b808210610cc85750505090610c93836001969594930383612d80565b60405192610ca084612d2c565b835260208301526040820152610cb68286613148565b52610cc18185613148565b5001610c27565b90919260016020819286548152019401920190610c77565b826040518091602082016020835281518091526040830190602060408260051b8601019301916000905b828210610d1957505050500390f35b91936020610d7c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc06001959799849503018652606060408a5167ffffffffffffffff815116845260ff8682015116868501520151918160408201520190612ee1565b9601920192018594939192610d0a565b602090604051610d9b81612d2c565b600081526000838201526060604082015282828701015201610c1b565b8454835260019485019486945060209093019201610bbc565b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101b85760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b8576101c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8260040192360301126101b85760443567ffffffffffffffff81116101b857610f07903690600401612e87565b91610f19610f148261308f565b61330e565b600683106112b757826004116101b8577fffffffff00000000000000000000000000000000000000000000000000000000823516917fffffffff000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000001683036112e157836006116101b857600481013560f01c91610fb1836132e8565b85106112b757610fc3610fee9161308f565b9360405160208101918252602435602482015260248152610fe5604482612d80565b519020926132e8565b93600090856006116112b35785116112b057507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa600667ffffffffffffffff9201940192169182600052600260205260406000209160ff60028401541693841561128357507f00000000000000000000000000000000000000000000000000000000000000004681036112525750838260061c1061122857600091825b85841061109457005b8360061b848104604014851517156111f95760208101908181116111f9576110c76110c18383878d6132f6565b906134b5565b90600092604082018092116111cc576020926110ec6110c186946080948f8b906132f6565b60405191898352601b868401526040830152606082015282805260015afa156111c05773ffffffffffffffffffffffffffffffffffffffff81511691611142838860019160005201602052604060002054151590565b156111985773ffffffffffffffffffffffffffffffffffffffff16821115611170575060019093019261108b565b807fb70ad94b0000000000000000000000000000000000000000000000000000000060049252fd5b6004827fca31867a000000000000000000000000000000000000000000000000000000008152fd5b604051903d90823e3d90fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f71253a250000000000000000000000000000000000000000000000000000000060005260046000fd5b7f0f01ce85000000000000000000000000000000000000000000000000000000006000526004524660245260446000fd5b7f320951440000000000000000000000000000000000000000000000000000000060005260045260246000fd5b80fd5b5080fd5b7f1ede477b0000000000000000000000000000000000000000000000000000000060005260046000fd5b827fef8a07ee0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85767ffffffffffffffff61134f612eb5565b600060a060405161135f81612d48565b8281528260208201528260408201528260608201528260808201520152168060005260056020526040600020908154906040519161139c83612d48565b73ffffffffffffffffffffffffffffffffffffffff8116835260208301918252604083019360ff8260e01c16151585526060840161ffff8360a01c1681526001608086019263ffffffff8560b01c16845261ffff60a088019560d01c168552019560405194856020895491828152019860005260206000209060005b8181106114a1575050509261ffff86959363ffffffff9367ffffffffffffffff839761145e61149d9b73ffffffffffffffffffffffffffffffffffffffff9e038b612d80565b6040519c8d9c51168c52511660208b015251151560408a01525116606088015251166080860152511660a084015260e060c084015260e0830190612ee1565b0390f35b82548b526020909a019960019283019201611418565b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85761149d6114f16131cb565b604051918291602083526020830190612ffa565b346101b85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857600060405161154281612d64565b61154a612e43565b815260243573ffffffffffffffffffffffffffffffffffffffff81168103610a19578173ffffffffffffffffffffffffffffffffffffffff6116439260207f781b4fc361184bd997c249fbc855854e7d6daf1c72a585b5598c778e23dc35cd95019081526115b6613420565b818351167fffffffffffffffffffffffff0000000000000000000000000000000000000000600854161760085551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095560405191829182919091602073ffffffffffffffffffffffffffffffffffffffff816040840195828151168552015116910152565b0390a180f35b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b857600b5473ffffffffffffffffffffffffffffffffffffffff81163303611708577fffffffffffffffffffffffff0000000000000000000000000000000000000000600a54913382841617600a5516600b5573ffffffffffffffffffffffffffffffffffffffff3391167fa3ddd2c19634c07b63b5c8b2685e01ac8be465118ec23afa866803f1f0b9bc4a600080a3005b7f2798c9ea0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760005473ffffffffffffffffffffffffffffffffffffffff811633036117f1577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b8576000602060405161185a81612d64565b828152015261149d60405161186e81612d64565b73ffffffffffffffffffffffffffffffffffffffff60085416815273ffffffffffffffffffffffffffffffffffffffff60095416602082015260405191829182919091602073ffffffffffffffffffffffffffffffffffffffff816040840195828151168552015116910152565b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b857366023820112156101b857806004013561193681612f7d565b916119446040519384612d80565b8183526024602084019260051b820101903682116101b85760248101925b828410611cca578473ffffffffffffffffffffffffffffffffffffffff600a54163303611ca0576006548151916119976131cb565b9160005b818110611bcc5750506000925b8084106119ff577fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d075866119ec846119fa85604051938493604085526040850190612ffa565b908382036020850152612ffa565b0390a1005b611a098483613148565b5193600654680100000000000000008110156104bb57806001611a2f920160065561346b565b611b9d57855167ffffffffffffffff81116104bb57611a4e8254613178565b601f8111611b60575b506020601f8211600114611aba578190600195969798600092611aaf575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82861b9260031b1c19161790555b019291906119a8565b015190508880611a75565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169783600052816000209860005b818110611b48575091600196979899918488959410611b11575b505050811b019055611aa6565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055888080611b04565b838301518b556001909a019960209384019301611aea565b611b8d90836000526020600020601f840160051c81019160208510611b93575b601f0160051c019061349e565b87611a57565b9091508190611b80565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b600694929394548015611c71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190611c058261346b565b929092611b9d5782611c1960019454613178565b9081611c2f575b5050600655019392919361199b565b81601f600093118614611c465750555b8780611c20565b81835260208320611c6191601f0160051c810190870161349e565b8082528160208120915555611c3f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f5c8f80f00000000000000000000000000000000000000000000000000000000060005260046000fd5b833567ffffffffffffffff81116101b8578201366043820112156101b857602091611d0083923690604460248201359101612f95565b815201930192611962565b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b857611d5a903690600401612f4c565b9073ffffffffffffffffffffffffffffffffffffffff60085416918215611f165760005b818110611d8757005b611d928183856130a4565b3573ffffffffffffffffffffffffffffffffffffffff81168091036101b8576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa908115611ed957600091611ee5575b5080611e06575b5050600101611d7e565b60206000604051828101907fa9059cbb00000000000000000000000000000000000000000000000000000000825289602482015284604482015260448152611e4f606482612d80565b519082865af115611ed9576000513d611ed05750813b155b611ea25790857f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a39085611dfc565b507f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60011415611e67565b6040513d6000823e3d90fd5b906020823d8211611f0e575b81611efe60209383612d80565b810103126112b057505186611df5565b3d9150611ef1565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b857366023820112156101b857806004013567ffffffffffffffff81116101b857602460c082028301013681116101b857611fb8613420565b611fc182612f7d565b91611fcf6040519384612d80565b825260009260240190602083015b8183106121f2578480855b80518310156121ee57611ffb8382613148565b519267ffffffffffffffff6020850151169384156121c2578484526005602052604080852082518154928401517fffffff00ffffffffffffffff000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff919091161791151560e01b7cff000000000000000000000000000000000000000000000000000000001691909117815590606081015182546080830163ffffffff815116156121965773ffffffffffffffffffffffffffffffffffffffff7f4cef55db91890720ca3d94563535726752813bffa29490d6d41218acb6831cc9946040946001999a9b979479ffffffff0000000000000000000000000000000000000000000060ff955160b01b16907fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff75ffff00000000000000000000000000000000000000007bffff000000000000000000000000000000000000000000000000000060a087015160d01b169460a01b169116171717809455511691835192835260e01c1615156020820152a2019190611fe8565b6024888a7f9e720551000000000000000000000000000000000000000000000000000000008252600452fd5b602484867f97ccaab7000000000000000000000000000000000000000000000000000000008252600452fd5b5080f35b60c08336031261229b576040519061220982612d48565b833573ffffffffffffffffffffffffffffffffffffffff8116810361229757825261223660208501612ecc565b60208301526122476040850161315c565b604083015261225860608501613169565b606083015260808401359063ffffffff821682036122975782602092608060c095015261228760a08701613169565b60a0820152815201920191611fdd565b8680fd5b8480fd5b346101b85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b8576122ee903690600401612f4c565b60243567ffffffffffffffff81116101b85761230e903690600401612f4c565b929091612319613420565b60005b8181106125c2575050506000917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1823603015b81841015610a4e576000928460051b8101358281121561229b5781019460608636031261229b576040519161238383612d2c565b61238c87612ecc565b835260208701359660ff881688036122975760208401978852604081013567ffffffffffffffff81116125be576123c5913691016130e3565b93604084019480865260ff89511680159182156125b3575b505061258b5767ffffffffffffffff84511687526002602052604087209586548860018901905b82811061256557505050878755875b865180518210156124cc5761243d8273ffffffffffffffffffffffffffffffffffffffff92613148565b5116156124a45761246f73ffffffffffffffffffffffffffffffffffffffff612467838a51613148565b5116896138d2565b1561247c57600101612413565b6004897f12823a5e000000000000000000000000000000000000000000000000000000008152fd5b6004897fcfb6108a000000000000000000000000000000000000000000000000000000008152fd5b50509790957f3780850db9abcff2be2b607bfbc2b86c9c131d50e456bf09dbaf923039ad4b8392975067ffffffffffffffff600196949560ff926002848651169101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905561254282825116613872565b50511693519151169061255a60405192839283612f2b565b0390a201929061234f565b806125726001928c613486565b90549060031b1c8c52826020528b604081205501612404565b6004877f12823a5e000000000000000000000000000000000000000000000000000000008152fd5b5110905089806123dd565b8780fd5b604067ffffffffffffffff6125e06125db8486886130a4565b61308f565b166000908152600460205220546125fa575b60010161231c565b67ffffffffffffffff6126116125db8385876130a4565b16600052600260205260406000208054600060018301905b8281106126ff575050600082555060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560019061268367ffffffffffffffff61267d6125db8487896130a4565b166135d7565b506126926125db8285876130a4565b7f3780850db9abcff2be2b607bfbc2b86c9c131d50e456bf09dbaf923039ad4b836126ef60209267ffffffffffffffff604051916126d08684612d80565b6000835260003681376000604051948594604086526040860190612ee1565b9684015216930390a290506125f2565b8061270c60019286613486565b90549060031b1c600052826020526000604081205501612629565b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85767ffffffffffffffff612767612eb5565b166000526002602052604060002060405190818092602083549182815201908360005260206000209060005b8181106127bf578460ff6002886127ac84890385612d80565b0154169061149d60405192839283612f2b565b8254845286945060209093019260019283019201612793565b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85761280f612e43565b73ffffffffffffffffffffffffffffffffffffffff600a541690813303611ca05773ffffffffffffffffffffffffffffffffffffffff16903382146105b057817fffffffffffffffffffffffff0000000000000000000000000000000000000000600b541617600b557fdfee8caf308a35b723489c72952cf11683462281c34aa62e8af474dcd012f41a600080a3005b346101b85760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85760043567ffffffffffffffff81116101b8578036036101c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126101b857612916612e20565b5060843567ffffffffffffffff81116101b857612937903690600401612e87565b5050602482019161294a610f148461308f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdd61012482013592018212156101b8570160048101359067ffffffffffffffff82116101b857602481019180360383136101b857602090820191909103126101b857359073ffffffffffffffffffffffffffffffffffffffff82168092036101b8576129de67ffffffffffffffff9161308f565b1680600052600560205260406000209081549073ffffffffffffffffffffffffffffffffffffffff8216908115610456576020906024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa908115611ed957600091612b65575b5073ffffffffffffffffffffffffffffffffffffffff163303612b375760e01c60ff16612aed575b61149d6040517fffffffff000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000016602082015260048152612ad9602482612d80565b604051918291602083526020830190612dc1565b60008281526002909101602052604090205415612b0a5780612a7c565b7fd0d259760000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7f728fe07b000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6020813d602011612bc0575b81612b7e60209383612d80565b810103126112b357519073ffffffffffffffffffffffffffffffffffffffff821682036112b0575073ffffffffffffffffffffffffffffffffffffffff612a54565b3d9150612b71565b346101b85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85761149d6040805190612c098183612d80565b601782527f436f6d6d6974746565566572696669657220322e302e30000000000000000000602083015251918291602083526020830190612dc1565b346101b85760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b8576020907fffffffff00000000000000000000000000000000000000000000000000000000612ca0612cfd565b167fd3e969cd000000000000000000000000000000000000000000000000000000008114908115612cd3575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612ccc565b600435907fffffffff00000000000000000000000000000000000000000000000000000000821682036101b857565b6060810190811067ffffffffffffffff8211176104bb57604052565b60c0810190811067ffffffffffffffff8211176104bb57604052565b6040810190811067ffffffffffffffff8211176104bb57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176104bb57604052565b919082519283825260005b848110612e0b5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201612dcc565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036101b857565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101b857565b359073ffffffffffffffffffffffffffffffffffffffff821682036101b857565b9181601f840112156101b85782359167ffffffffffffffff83116101b857602083818601950101116101b857565b6004359067ffffffffffffffff821682036101b857565b359067ffffffffffffffff821682036101b857565b906020808351928381520192019060005b818110612eff5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101612ef2565b9060ff612f45602092959495604085526040850190612ee1565b9416910152565b9181601f840112156101b85782359167ffffffffffffffff83116101b8576020808501948460051b0101116101b857565b67ffffffffffffffff81116104bb5760051b60200190565b92919267ffffffffffffffff82116104bb5760405191612fdd601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184612d80565b8294818452818301116101b8578281602093846000960137010152565b9080602083519182815201916020808360051b8301019401926000915b83831061302657505050505090565b9091929394602080613062837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe086600196030187528951612dc1565b97019301930191939290613017565b9080601f830112156101b85781602061308c93359101612f95565b90565b3567ffffffffffffffff811681036101b85790565b91908110156130b45760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9080601f830112156101b85781356130fa81612f7d565b926131086040519485612d80565b81845260208085019260051b8201019283116101b857602001905b8282106131305750505090565b6020809161313d84612e66565b815201910190613123565b80518210156130b45760209160051b010190565b359081151582036101b857565b359061ffff821682036101b857565b90600182811c921680156131c1575b602083101461319257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613187565b600654906131d882612f7d565b916131e66040519384612d80565b808352600660009081527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9190602085015b8282106132255750505050565b6040516000855461323581613178565b80845290600181169081156132a7575060011461326f575b506001928261326185946020940382612d80565b815201940191019092613218565b6000878152602081209092505b8183106132915750508101602001600161324d565b600181602092548386880101520192019161327c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b840190910191506001905061324d565b60060190816006116111f957565b909392938483116101b85784116101b8578101920390565b6040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815277ffffffffffffffff000000000000000000000000000000008260801b16600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611ed9576000916133e5575b506133ad5750565b67ffffffffffffffff907ffdbd6a72000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b6020813d602011613418575b816133fe60209383612d80565b810103126112b357519081151582036112b05750386133a5565b3d91506133f1565b73ffffffffffffffffffffffffffffffffffffffff60015416330361344157565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b6006548110156130b457600660005260206000200190600090565b80548210156130b45760005260206000200190600090565b8181106134a9575050565b6000815560010161349e565b3590602081106134c3575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060200360031b1b1690565b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156135d25761352381613927565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c16166135d25761ffff8360e01c1680159182156135c1575b505061356d575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880613563565b505050565b6000818152600460205260409020548015613737577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116111f957600354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116111f9578181036136c8575b5050506003548015611c71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01613685816003613486565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600355600052600460205260006040812055600190565b61371f6136d96136ea936003613486565b90549060031b1c9283926003613486565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055600052600460205260406000205538808061364c565b5050600090565b9060018201918160005282602052604060002054801515600014613869577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116111f9578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116111f957818103613832575b50505080548015611c71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906137f38282613486565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b6138526138426136ea9386613486565b90549060031b1c92839286613486565b9055600052836020526040600020553880806137bb565b50505050600090565b806000526004602052604060002054156000146138cc57600354680100000000000000008110156104bb576138b36136ea8260018594016003556003613486565b9055600354906000526004602052604060002055600190565b50600090565b600082815260018201602052604090205461373757805490680100000000000000008210156104bb57826139106136ea846001809601855584613486565b905580549260005201602052604060002055600190565b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156139fe577dffff000000000000000000000000000000000000000000000000000000008116156139f55760ff60015b169060f01c806139bf575b506001036139925750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b601081106139d05750613987565b6001811b82166139e3575b6001016139c2565b91600181018091116111f957916139db565b60ff600061397c565b505056fea164736f6c634300081a000a" - -type CommitteeVerifierContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCommitteeVerifierContract( - address common.Address, - backend bind.ContractBackend, -) (*CommitteeVerifierContract, error) { - parsed, err := abi.JSON(strings.NewReader(CommitteeVerifierABI)) - if err != nil { - return nil, err - } - return &CommitteeVerifierContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CommitteeVerifierContract) Address() common.Address { - return c.address -} - -func (c *CommitteeVerifierContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CommitteeVerifierContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -func (c *CommitteeVerifierContract) ApplyRemoteChainConfigUpdates(opts *bind.TransactOpts, args []RemoteChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyRemoteChainConfigUpdates", args) -} - -func (c *CommitteeVerifierContract) SetAllowedFinalityConfig(opts *bind.TransactOpts, args [4]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setAllowedFinalityConfig", args) -} - -func (c *CommitteeVerifierContract) ApplyAllowlistUpdates(opts *bind.TransactOpts, args []AllowlistConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowlistUpdates", args) -} - -func (c *CommitteeVerifierContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *CommitteeVerifierContract) ApplySignatureConfigs(opts *bind.TransactOpts, sourceChainSelectorsToRemove []uint64, signatureConfigs []SignatureConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "applySignatureConfigs", sourceChainSelectorsToRemove, signatureConfigs) -} - -func (c *CommitteeVerifierContract) GetRemoteChainConfig(opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteChainConfig", args) - outstruct := new(GetRemoteChainConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.RemoteChainConfig = *abi.ConvertType(out[0], new(RemoteChainConfigArgs)).(*RemoteChainConfigArgs) - outstruct.AllowedSendersList = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - - return *outstruct, nil -} - -func (c *CommitteeVerifierContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *CommitteeVerifierContract) GetSignatureConfig(opts *bind.CallOpts, args uint64) (GetSignatureConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getSignatureConfig", args) - outstruct := new(GetSignatureConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.Signers = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.Threshold = *abi.ConvertType(out[1], new(uint8)).(*uint8) - - return *outstruct, nil -} - -func (c *CommitteeVerifierContract) GetAllowedFinalityConfig(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedFinalityConfig") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -func (c *CommitteeVerifierContract) GetFee(opts *bind.CallOpts, destChainSelector uint64, arg1 EVM2AnyMessage, arg2 []byte, requestedFinality [4]byte) (GetFeeResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getFee", destChainSelector, arg1, arg2, requestedFinality) - outstruct := new(GetFeeResult) - if err != nil { - return *outstruct, err - } - - outstruct.FeeUSDCents = *abi.ConvertType(out[0], new(uint16)).(*uint16) - outstruct.GasForVerification = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.PayloadSizeBytes = *abi.ConvertType(out[2], new(uint32)).(*uint32) - - return *outstruct, nil -} - -func (c *CommitteeVerifierContract) VersionTag(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "versionTag") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -type AllowlistConfigArgs struct { - DestChainSelector uint64 - AllowlistEnabled bool - AddedAllowlistedSenders []common.Address - RemovedAllowlistedSenders []common.Address -} - -type DynamicConfig struct { - FeeAggregator common.Address - AllowlistAdmin common.Address -} - -type EVM2AnyMessage struct { - Receiver []byte - Data []byte - TokenAmounts []EVMTokenAmount - FeeToken common.Address - ExtraArgs []byte -} - -type EVMTokenAmount struct { - Token common.Address - Amount *big.Int -} - -type GetFeeResult struct { - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint32 -} - -type GetRemoteChainConfigResult struct { - RemoteChainConfig RemoteChainConfigArgs - AllowedSendersList []common.Address -} - -type GetSignatureConfigResult struct { - Signers []common.Address - Threshold uint8 -} - -type RemoteChainConfigArgs struct { - Router common.Address - RemoteChainSelector uint64 - AllowlistEnabled bool - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint16 -} - -type SignatureConfig struct { - SourceChainSelector uint64 - Threshold uint8 - Signers []common.Address -} - type ApplySignatureConfigsArgs struct { - SourceChainSelectorsToRemove []uint64 - SignatureConfigs []SignatureConfig + SourceChainSelectorsToRemove []uint64 `json:"sourceChainSelectorsToRemove"` + SignatureConfigs []gobindings.SignatureQuorumValidatorSignatureConfig `json:"signatureConfigs"` } type GetFeeArgs struct { - DestChainSelector uint64 - Arg1 EVM2AnyMessage - Arg2 []byte - RequestedFinality [4]byte + DestChainSelector uint64 `json:"destChainSelector"` + Arg1 gobindings.ClientEVM2AnyMessage `json:"arg1"` + Arg2 []byte `json:"arg2"` + RequestedFinality [4]byte `json:"requestedFinality"` } type ConstructorArgs struct { - DynamicConfig DynamicConfig - StorageLocations []string - Rmn common.Address - VersionTag [4]byte + DynamicConfig gobindings.CommitteeVerifierDynamicConfig `json:"dynamicConfig"` + StorageLocations []string `json:"storageLocations"` + Rmn common.Address `json:"rmn"` + VersionTag [4]byte `json:"versionTag"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "committee-verifier:deploy", - Version: Version, - Description: "Deploys the CommitteeVerifier contract", - ContractMetadata: &bind.MetaData{ - ABI: CommitteeVerifierABI, - Bin: CommitteeVerifierBin, - }, + Name: "committee-verifier:deploy", + Version: Version, + Description: "Deploys the CommitteeVerifier contract", + ContractMetadata: gobindings.CommitteeVerifierMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(CommitteeVerifierBin), + EVM: common.FromHex(gobindings.CommitteeVerifierMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *CommitteeVerifierContract]{ - Name: "committee-verifier:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) - -var ApplyRemoteChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]RemoteChainConfigArgs, *CommitteeVerifierContract]{ - Name: "committee-verifier:apply-remote-chain-config-updates", - Version: Version, - Description: "Calls applyRemoteChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, []RemoteChainConfigArgs], - Validate: func([]RemoteChainConfigArgs) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args []RemoteChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyRemoteChainConfigUpdates(opts, args) - }, -}) - -var SetAllowedFinalityConfig = contract.NewWrite(contract.WriteParams[[4]byte, *CommitteeVerifierContract]{ - Name: "committee-verifier:set-allowed-finality-config", - Version: Version, - Description: "Calls setAllowedFinalityConfig on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, [4]byte], - Validate: func([4]byte) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args [4]byte, - ) (*types.Transaction, error) { - return c.SetAllowedFinalityConfig(opts, args) - }, -}) - -var ApplyAllowlistUpdates = contract.NewWrite(contract.WriteParams[[]AllowlistConfigArgs, *CommitteeVerifierContract]{ - Name: "committee-verifier:apply-allowlist-updates", - Version: Version, - Description: "Calls applyAllowlistUpdates on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, []AllowlistConfigArgs], - Validate: func([]AllowlistConfigArgs) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args []AllowlistConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowlistUpdates(opts, args) - }, }) -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *CommitteeVerifierContract]{ - Name: "committee-verifier:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) - -var ApplySignatureConfigs = contract.NewWrite(contract.WriteParams[ApplySignatureConfigsArgs, *CommitteeVerifierContract]{ - Name: "committee-verifier:apply-signature-configs", - Version: Version, - Description: "Calls applySignatureConfigs on the contract", - ContractType: ContractType, - ContractABI: CommitteeVerifierABI, - NewContract: NewCommitteeVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*CommitteeVerifierContract, ApplySignatureConfigsArgs], - Validate: func(ApplySignatureConfigsArgs) error { return nil }, - CallContract: func( - c *CommitteeVerifierContract, - opts *bind.TransactOpts, - args ApplySignatureConfigsArgs, - ) (*types.Transaction, error) { - return c.ApplySignatureConfigs(opts, args.SourceChainSelectorsToRemove, args.SignatureConfigs) - }, -}) - -var GetRemoteChainConfig = contract.NewRead(contract.ReadParams[uint64, GetRemoteChainConfigResult, *CommitteeVerifierContract]{ - Name: "committee-verifier:get-remote-chain-config", - Version: Version, - Description: "Calls getRemoteChainConfig on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - return c.GetRemoteChainConfig(opts, args) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *CommitteeVerifierContract]{ - Name: "committee-verifier:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, -}) - -var GetSignatureConfig = contract.NewRead(contract.ReadParams[uint64, GetSignatureConfigResult, *CommitteeVerifierContract]{ - Name: "committee-verifier:get-signature-config", - Version: Version, - Description: "Calls getSignatureConfig on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args uint64) (GetSignatureConfigResult, error) { - return c.GetSignatureConfig(opts, args) - }, -}) - -var GetAllowedFinalityConfig = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *CommitteeVerifierContract]{ - Name: "committee-verifier:get-allowed-finality-config", - Version: Version, - Description: "Calls getAllowedFinalityConfig on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.GetAllowedFinalityConfig(opts) - }, -}) - -var GetFee = contract.NewRead(contract.ReadParams[GetFeeArgs, GetFeeResult, *CommitteeVerifierContract]{ - Name: "committee-verifier:get-fee", - Version: Version, - Description: "Calls getFee on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args GetFeeArgs) (GetFeeResult, error) { - return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) - }, -}) - -var VersionTag = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *CommitteeVerifierContract]{ - Name: "committee-verifier:version-tag", - Version: Version, - Description: "Calls versionTag on the contract", - ContractType: ContractType, - NewContract: NewCommitteeVerifierContract, - CallContract: func(c *CommitteeVerifierContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.VersionTag(opts) - }, -}) +func NewWriteSetDynamicConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.CommitteeVerifierDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.CommitteeVerifierDynamicConfig, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args gobindings.CommitteeVerifierDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args gobindings.CommitteeVerifierDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} + +func NewWriteApplyRemoteChainConfigUpdates(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierRemoteChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierRemoteChainConfigArgs, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:apply-remote-chain-config-updates", + Version: Version, + Description: "Calls applyRemoteChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierRemoteChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierRemoteChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyRemoteChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteSetAllowedFinalityConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[4]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[4]byte, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:set-allowed-finality-config", + Version: Version, + Description: "Calls setAllowedFinalityConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args [4]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args [4]byte, + ) (*types.Transaction, error) { + return c.SetAllowedFinalityConfig(opts, args) + }, + }) +} + +func NewWriteApplyAllowlistUpdates(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierAllowlistConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierAllowlistConfigArgs, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:apply-allowlist-updates", + Version: Version, + Description: "Calls applyAllowlistUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierAllowlistConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierAllowlistConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowlistUpdates(opts, args) + }, + }) +} + +func NewWriteWithdrawFeeTokens(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} + +func NewWriteApplySignatureConfigs(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[ApplySignatureConfigsArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplySignatureConfigsArgs, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:apply-signature-configs", + Version: Version, + Description: "Calls applySignatureConfigs on the contract", + ContractType: ContractType, + ContractABI: gobindings.CommitteeVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, caller common.Address, args ApplySignatureConfigsArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.CommitteeVerifierInterface, + opts *bind.TransactOpts, + args ApplySignatureConfigsArgs, + ) (*types.Transaction, error) { + return c.ApplySignatureConfigs(opts, args.SourceChainSelectorsToRemove, args.SignatureConfigs) + }, + }) +} + +func NewReadGetRemoteChainConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetRemoteChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetRemoteChainConfig, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:get-remote-chain-config", + Version: Version, + Description: "Calls getRemoteChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.GetRemoteChainConfig, error) { + return c.GetRemoteChainConfig(opts, args) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.CommitteeVerifierDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.CommitteeVerifierDynamicConfig, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args struct{}) (gobindings.CommitteeVerifierDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewReadGetSignatureConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetSignatureConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetSignatureConfig, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:get-signature-config", + Version: Version, + Description: "Calls getSignatureConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.GetSignatureConfig, error) { + return c.GetSignatureConfig(opts, args) + }, + }) +} + +func NewReadGetAllowedFinalityConfig(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:get-allowed-finality-config", + Version: Version, + Description: "Calls getAllowedFinalityConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.GetAllowedFinalityConfig(opts) + }, + }) +} + +func NewReadGetFee(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[GetFeeArgs], gobindings.GetFee, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetFeeArgs, gobindings.GetFee, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:get-fee", + Version: Version, + Description: "Calls getFee on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args GetFeeArgs) (gobindings.GetFee, error) { + return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) + }, + }) +} + +func NewReadVersionTag(c gobindings.CommitteeVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.CommitteeVerifierInterface]{ + Name: "committee-verifier:version-tag", + Version: Version, + Description: "Calls versionTag on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CommitteeVerifierInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.VersionTag(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/erc20/erc20.go b/chains/evm/deployment/v2_0_0/operations/erc20/erc20.go index 4ae2649f39..e3b1b6ee2e 100644 --- a/chains/evm/deployment/v2_0_0/operations/erc20/erc20.go +++ b/chains/evm/deployment/v2_0_0/operations/erc20/erc20.go @@ -5,115 +5,55 @@ package erc20 import ( "math/big" - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cross_chain_token" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "CrossChainToken" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const CrossChainTokenABI = `[{"type":"constructor","inputs":[{"name":"args","type":"tuple","internalType":"struct BaseERC20.ConstructorParams","components":[{"name":"name","type":"string","internalType":"string"},{"name":"symbol","type":"string","internalType":"string"},{"name":"maxSupply","type":"uint256","internalType":"uint256"},{"name":"preMint","type":"uint256","internalType":"uint256"},{"name":"preMintRecipient","type":"address","internalType":"address"},{"name":"decimals","type":"uint8","internalType":"uint8"},{"name":"ccipAdmin","type":"address","internalType":"address"}]},{"name":"burnMintRoleAdmin","type":"address","internalType":"address"},{"name":"owner","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"BURNER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"BURN_MINT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MINTER_ROLE","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"acceptDefaultAdminTransfer","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"allowance","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"beginDefaultAdminTransfer","inputs":[{"name":"newAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"burn","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"burnFrom","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"cancelDefaultAdminTransfer","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"changeDefaultAdminDelay","inputs":[{"name":"newDelay","type":"uint48","internalType":"uint48"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"_decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"defaultAdmin","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"defaultAdminDelay","inputs":[],"outputs":[{"name":"","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"type":"function","name":"defaultAdminDelayIncreaseWait","inputs":[],"outputs":[{"name":"","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"type":"function","name":"getCCIPAdmin","inputs":[],"outputs":[{"name":"ccipAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantMintAndBurnRoles","inputs":[{"name":"burnAndMinter","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"grantRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"maxSupply","inputs":[],"outputs":[{"name":"_maxSupply","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"pendingDefaultAdmin","inputs":[],"outputs":[{"name":"newAdmin","type":"address","internalType":"address"},{"name":"schedule","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"type":"function","name":"pendingDefaultAdminDelay","inputs":[],"outputs":[{"name":"newDelay","type":"uint48","internalType":"uint48"},{"name":"schedule","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"type":"function","name":"renounceRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"name":"role","type":"bytes32","internalType":"bytes32"},{"name":"account","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"rollbackDefaultAdminDelay","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setCCIPAdmin","inputs":[{"name":"newAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"CCIPAdminTransferred","inputs":[{"name":"previousAdmin","type":"address","indexed":true,"internalType":"address"},{"name":"newAdmin","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DefaultAdminDelayChangeCanceled","inputs":[],"anonymous":false},{"type":"event","name":"DefaultAdminDelayChangeScheduled","inputs":[{"name":"newDelay","type":"uint48","indexed":false,"internalType":"uint48"},{"name":"effectSchedule","type":"uint48","indexed":false,"internalType":"uint48"}],"anonymous":false},{"type":"event","name":"DefaultAdminTransferCanceled","inputs":[],"anonymous":false},{"type":"event","name":"DefaultAdminTransferScheduled","inputs":[{"name":"newAdmin","type":"address","indexed":true,"internalType":"address"},{"name":"acceptSchedule","type":"uint48","indexed":false,"internalType":"uint48"}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"previousAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"newAdminRole","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"account","type":"address","indexed":true,"internalType":"address"},{"name":"sender","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlEnforcedDefaultAdminDelay","inputs":[{"name":"schedule","type":"uint48","internalType":"uint48"}]},{"type":"error","name":"AccessControlEnforcedDefaultAdminRules","inputs":[]},{"type":"error","name":"AccessControlInvalidDefaultAdmin","inputs":[{"name":"defaultAdmin","type":"address","internalType":"address"}]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"name":"account","type":"address","internalType":"address"},{"name":"neededRole","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"CannotRenounceCCIPAdmin","inputs":[]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"type":"error","name":"MaxSupplyExceeded","inputs":[{"name":"supplyAfterMint","type":"uint256","internalType":"uint256"},{"name":"maxSupply","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OnlyCCIPAdmin","inputs":[]},{"type":"error","name":"PreMintAddressNotSet","inputs":[]},{"type":"error","name":"PreMintRecipientSetWithZeroPreMint","inputs":[{"name":"preMintRecipient","type":"address","internalType":"address"}]},{"type":"error","name":"SafeCastOverflowedUintDowncast","inputs":[{"name":"bits","type":"uint8","internalType":"uint8"},{"name":"value","type":"uint256","internalType":"uint256"}]}]` - -type CrossChainTokenContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewCrossChainTokenContract( - address common.Address, - backend bind.ContractBackend, -) (*CrossChainTokenContract, error) { - parsed, err := abi.JSON(strings.NewReader(CrossChainTokenABI)) - if err != nil { - return nil, err - } - return &CrossChainTokenContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *CrossChainTokenContract) Address() common.Address { - return c.address -} - -func (c *CrossChainTokenContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *CrossChainTokenContract) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "approve", spender, value) -} - -func (c *CrossChainTokenContract) BalanceOf(opts *bind.CallOpts, args common.Address) (*big.Int, error) { - var out []any - err := c.contract.Call(opts, &out, "balanceOf", args) - if err != nil { - var zero *big.Int - return zero, err - } - return *abi.ConvertType(out[0], new(*big.Int)).(**big.Int), nil -} - -type ConstructorParams struct { - Name string - Symbol string - MaxSupply *big.Int - PreMint *big.Int - PreMintRecipient common.Address - Decimals uint8 - CcipAdmin common.Address -} - type ApproveArgs struct { - Spender common.Address - Value *big.Int + Spender common.Address `json:"spender"` + Value *big.Int `json:"value"` +} + +func NewWriteApprove(c gobindings.CrossChainTokenInterface) *cld_ops.Operation[contract.FunctionInput[ApproveArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApproveArgs, gobindings.CrossChainTokenInterface]{ + Name: "erc20:approve", + Version: Version, + Description: "Calls approve on the contract", + ContractType: ContractType, + ContractABI: gobindings.CrossChainTokenMetaData.ABI, + Contract: c, + IsAllowedCaller: contract.AllCallersAllowed[gobindings.CrossChainTokenInterface, ApproveArgs], + CallContract: func( + c gobindings.CrossChainTokenInterface, + opts *bind.TransactOpts, + args ApproveArgs, + ) (*types.Transaction, error) { + return c.Approve(opts, args.Spender, args.Value) + }, + }) +} + +func NewReadBalanceOf(c gobindings.CrossChainTokenInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], *big.Int, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[common.Address, *big.Int, gobindings.CrossChainTokenInterface]{ + Name: "erc20:balance-of", + Version: Version, + Description: "Calls balanceOf on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.CrossChainTokenInterface, opts *bind.CallOpts, args common.Address) (*big.Int, error) { + return c.BalanceOf(opts, args) + }, + }) } - -var Approve = contract.NewWrite(contract.WriteParams[ApproveArgs, *CrossChainTokenContract]{ - Name: "erc20:approve", - Version: Version, - Description: "Calls approve on the contract", - ContractType: ContractType, - ContractABI: CrossChainTokenABI, - NewContract: NewCrossChainTokenContract, - IsAllowedCaller: contract.AllCallersAllowed[*CrossChainTokenContract, ApproveArgs], - Validate: func(ApproveArgs) error { return nil }, - CallContract: func( - c *CrossChainTokenContract, - opts *bind.TransactOpts, - args ApproveArgs, - ) (*types.Transaction, error) { - return c.Approve(opts, args.Spender, args.Value) - }, -}) - -var BalanceOf = contract.NewRead(contract.ReadParams[common.Address, *big.Int, *CrossChainTokenContract]{ - Name: "erc20:balance-of", - Version: Version, - Description: "Calls balanceOf on the contract", - ContractType: ContractType, - NewContract: NewCrossChainTokenContract, - CallContract: func(c *CrossChainTokenContract, opts *bind.CallOpts, args common.Address) (*big.Int, error) { - return c.BalanceOf(opts, args) - }, -}) diff --git a/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box.go b/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box.go index 15220fb1f4..86d22a5ecb 100644 --- a/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box.go +++ b/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box.go @@ -3,148 +3,89 @@ package erc20_lock_box import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "ERC20LockBox" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const ERC20LockBoxABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"deposit","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"isTokenSupported","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"withdraw","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"depositor","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Withdrawal","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"RecipientCannotBeZeroAddress","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenAmountCannotBeZero","inputs":[]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnsupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const ERC20LockBoxBin = "0x60a0604052346101d9576113cf6020813803918261001c816101de565b9384928339810103126101d957516001600160a01b038116908190036101d957602090610048826101de565b9160008352600036813733156101c857600180546001600160a01b03191633179055610073816101de565b60008152600036813760408051949085016001600160401b038111868210176101b2576040528452808285015260005b815181101561010a576001906001600160a01b036100c18285610203565b5116846100cd82610245565b6100da575b5050016100a3565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138846100d2565b5050915160005b8151811015610182576001600160a01b0361012c8284610203565b5116908115610171577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef8583610163600195610343565b50604051908152a101610111565b6342bcdf7f60e11b60005260046000fd5b8280156101715760805260405161102b90816103a482396080518181816105f6015281816109960152610c060152f35b634e487b7160e01b600052604160045260246000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101b257604052565b80518210156102175760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b80548210156102175760005260206000200190600090565b600081815260036020526040902054801561033c57600019810181811161032657600254600019810191908211610326578082036102d5575b50505060025480156102bf576000190161029981600261022d565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61030e6102e66102f793600261022d565b90549060031b1c928392600261022d565b819391549060031b91821b91600019901b19161790565b9055600052600360205260406000205538808061027e565b634e487b7160e01b600052601160045260246000fd5b5050600090565b8060005260036020526040600020541560001461039d57600254680100000000000000008110156101b2576103846102f7826001859401600255600261022d565b9055600254906000526003602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b60003560e01c908163181f5a77146109ba5750806321df0da71461094b5780632451a6271461085d57806374fd18ac1461061b57806375151b631461058c57806379ba5097146104a35780638da5cb5b1461045157806391a2749a14610267578063a36a7fee146101825763f2fde38b1461008d57600080fd5b3461017d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d5773ffffffffffffffffffffffffffffffffffffffff6100d9610a89565b6100e1610cc8565b1633811461015357807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b600080fd5b3461017d5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d576101b9610a89565b6101c1610aac565b5073ffffffffffffffffffffffffffffffffffffffff604435916101e58382610bd3565b166102396040517f23b872dd00000000000000000000000000000000000000000000000000000000602082015233602482015230604482015283606482015260648152610233608482610b0e565b82610d56565b6040519182527f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6260203393a3005b3461017d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d5760043567ffffffffffffffff811161017d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261017d57604051906102e182610ac3565b806004013567ffffffffffffffff811161017d576103059060043691840101610b4f565b825260248101359067ffffffffffffffff821161017d57600461032b9236920101610b4f565b6020820190815261033a610cc8565b519060005b82518110156103b2578073ffffffffffffffffffffffffffffffffffffffff61036a60019386610d13565b511661037581610df9565b610381575b500161033f565b60207fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a18461037a565b505160005b815181101561044f5773ffffffffffffffffffffffffffffffffffffffff6103df8284610d13565b5116908115610425577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef602083610417600195610fbe565b50604051908152a1016103b7565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b005b3461017d5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461017d5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d5760005473ffffffffffffffffffffffffffffffffffffffff81163303610562577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b3461017d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d5760206105c5610a89565b73ffffffffffffffffffffffffffffffffffffffff604051911673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148152f35b3461017d5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d57610652610a89565b61065a610aac565b506044356064359173ffffffffffffffffffffffffffffffffffffffff831680930361017d57819061068c8382610bd3565b83156108335773ffffffffffffffffffffffffffffffffffffffff1691604051907f70a08231000000000000000000000000000000000000000000000000000000008252306004830152602082602481875afa918215610827576000926107d0575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107c8575b808211610797575060207f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63989161078e6040517fa9059cbb000000000000000000000000000000000000000000000000000000008482015286602482015282604482015260448152610788606482610b0e565b85610d56565b604051908152a3005b907fcf4791810000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b905080610716565b90916020823d60201161081f575b816107eb60209383610b0e565b8101031261081c575051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6106ee565b80fd5b3d91506107de565b6040513d6000823e3d90fd5b7fd87070520000000000000000000000000000000000000000000000000000000060005260046000fd5b3461017d5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d576040518060206002549283815201809260026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b81811061093557505050816108dc910382610b0e565b6040519182916020830190602084525180915260408301919060005b818110610906575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff168452859450602093840193909201916001016108f8565b82548452602090930192600192830192016108c6565b3461017d5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461017d5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017d576109f281610ac3565b601281527f45524332304c6f636b426f7820322e302e300000000000000000000000000000602082015260405190602082528181519182602083015260005b838110610a715750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b60208282018101516040878401015285935001610a31565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361017d57565b6024359067ffffffffffffffff8216820361017d57565b6040810190811067ffffffffffffffff821117610adf57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610adf57604052565b81601f8201121561017d5780359167ffffffffffffffff8311610adf578260051b9160405193610b826020850186610b0e565b845260208085019382010191821161017d57602001915b818310610ba65750505090565b823573ffffffffffffffffffffffffffffffffffffffff8116810361017d57815260209283019201610b99565b9015610c9e5773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168103610c71575033600052600360205260406000205415610c4357565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fbf16aab60000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7f8b1fa9dd0000000000000000000000000000000000000000000000000000000060005260046000fd5b73ffffffffffffffffffffffffffffffffffffffff600154163303610ce957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b8051821015610d275760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000602091828151910182855af115610827576000513d610dd8575073ffffffffffffffffffffffffffffffffffffffff81163b155b610d945750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415610d8d565b8054821015610d275760005260206000200190600090565b6000818152600360205260409020548015610fb7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111610f8857600254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211610f8857808203610f19575b5050506002548015610eea577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610ea7816002610de1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600255600052600360205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b610f70610f2a610f3b936002610de1565b90549060031b1c9283926002610de1565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b90556000526003602052604060002055388080610e6e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146110185760025468010000000000000000811015610adf57610fff610f3b8260018594016002556002610de1565b9055600254906000526003602052604060002055600190565b5060009056fea164736f6c634300081a000a" - -type ERC20LockBoxContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewERC20LockBoxContract( - address common.Address, - backend bind.ContractBackend, -) (*ERC20LockBoxContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20LockBoxABI)) - if err != nil { - return nil, err - } - return &ERC20LockBoxContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *ERC20LockBoxContract) Address() common.Address { - return c.address -} - -func (c *ERC20LockBoxContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *ERC20LockBoxContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *ERC20LockBoxContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *ERC20LockBoxContract) TransferOwnership(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "transferOwnership", args) -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - type ConstructorArgs struct { - Token common.Address + Token common.Address `json:"token"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "erc20-lock-box:deploy", - Version: Version, - Description: "Deploys the ERC20LockBox contract", - ContractMetadata: &bind.MetaData{ - ABI: ERC20LockBoxABI, - Bin: ERC20LockBoxBin, - }, + Name: "erc20-lock-box:deploy", + Version: Version, + Description: "Deploys the ERC20LockBox contract", + ContractMetadata: gobindings.ERC20LockBoxMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(ERC20LockBoxBin), + EVM: common.FromHex(gobindings.ERC20LockBoxMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *ERC20LockBoxContract]{ - Name: "erc20-lock-box:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: ERC20LockBoxABI, - NewContract: NewERC20LockBoxContract, - IsAllowedCaller: contract.OnlyOwner[*ERC20LockBoxContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *ERC20LockBoxContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.ERC20LockBoxInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.ERC20LockBoxInterface]{ + Name: "erc20-lock-box:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.ERC20LockBoxMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ERC20LockBoxInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ERC20LockBoxInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *ERC20LockBoxContract]{ - Name: "erc20-lock-box:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewERC20LockBoxContract, - CallContract: func(c *ERC20LockBoxContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) +func NewReadGetAllAuthorizedCallers(c gobindings.ERC20LockBoxInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.ERC20LockBoxInterface]{ + Name: "erc20-lock-box:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ERC20LockBoxInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} -var TransferOwnership = contract.NewWrite(contract.WriteParams[common.Address, *ERC20LockBoxContract]{ - Name: "erc20-lock-box:transfer-ownership", - Version: Version, - Description: "Calls transferOwnership on the contract", - ContractType: ContractType, - ContractABI: ERC20LockBoxABI, - NewContract: NewERC20LockBoxContract, - IsAllowedCaller: contract.OnlyOwner[*ERC20LockBoxContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *ERC20LockBoxContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.TransferOwnership(opts, args) - }, -}) +func NewWriteTransferOwnership(c gobindings.ERC20LockBoxInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.ERC20LockBoxInterface]{ + Name: "erc20-lock-box:transfer-ownership", + Version: Version, + Description: "Calls transferOwnership on the contract", + ContractType: ContractType, + ContractABI: gobindings.ERC20LockBoxMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ERC20LockBoxInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ERC20LockBoxInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.TransferOwnership(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box_custom_operations.go b/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box_custom_operations.go index 970a45ceb0..dc04853c59 100644 --- a/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box_custom_operations.go +++ b/chains/evm/deployment/v2_0_0/operations/erc20_lock_box/erc20_lock_box_custom_operations.go @@ -8,59 +8,69 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) +// DepositArgs is the input for the custom deposit operation. type DepositArgs struct { - Token common.Address - RemoteChainSelector uint64 - Amount *big.Int + Token common.Address `json:"token"` + RemoteChainSelector uint64 `json:"remoteChainSelector"` + Amount *big.Int `json:"amount"` } -func (c *ERC20LockBoxContract) Deposit(opts *bind.TransactOpts, token common.Address, arg1 uint64, amount *big.Int) (*types.Transaction, error) { - return c.contract.Transact(opts, "deposit", token, arg1, amount) +// NewReadOwner returns a read operation for the lock box owner. +func NewReadOwner(c gobindings.ERC20LockBoxInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.ERC20LockBoxInterface]{ + Name: "erc20-lock-box:owner", + Version: Version, + Description: "Calls owner on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ERC20LockBoxInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.Owner(opts) + }, + }) } -var Owner = contract.NewRead(contract.ReadParams[struct{}, common.Address, *ERC20LockBoxContract]{ - Name: "erc20-lock-box:owner", - Version: Version, - Description: "Calls owner on the contract", - ContractType: ContractType, - NewContract: NewERC20LockBoxContract, - CallContract: func(c *ERC20LockBoxContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.Owner(opts) - }, -}) - -var Deposit = contract.NewWrite(contract.WriteParams[DepositArgs, *ERC20LockBoxContract]{ - Name: "erc20-lock-box:deposit", - Version: Version, - Description: "Deposits tokens into the ERC20LockBox", - ContractType: ContractType, - ContractABI: ERC20LockBoxABI, - NewContract: NewERC20LockBoxContract, - IsAllowedCaller: func(erc20LockBox *ERC20LockBoxContract, opts *bind.CallOpts, caller common.Address, args DepositArgs) (bool, error) { - callers, err := erc20LockBox.GetAllAuthorizedCallers(opts) - if err != nil { - return false, err - } - for _, authorized := range callers { - if authorized == caller { - return true, nil +// NewWriteDeposit returns a write operation that deposits into the lock box for an authorized caller. +func NewWriteDeposit(c gobindings.ERC20LockBoxInterface) *cld_ops.Operation[contract.FunctionInput[DepositArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[DepositArgs, gobindings.ERC20LockBoxInterface]{ + Name: "erc20-lock-box:deposit", + Version: Version, + Description: "Deposits tokens into the ERC20LockBox", + ContractType: ContractType, + ContractABI: gobindings.ERC20LockBoxMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ERC20LockBoxInterface, opts *bind.CallOpts, caller common.Address, args DepositArgs) (bool, error) { + callers, err := c.GetAllAuthorizedCallers(opts) + if err != nil { + return false, err + } + for _, authorized := range callers { + if authorized == caller { + return true, nil + } + } + return false, nil + }, + Validate: func(args DepositArgs) error { + if args.Amount == nil || args.Amount.Sign() <= 0 { + return fmt.Errorf("amount must be greater than zero") } - } - return false, nil - }, - Validate: func(args DepositArgs) error { - if args.Amount == nil || args.Amount.Sign() <= 0 { - return fmt.Errorf("amount must be greater than zero") - } - if args.Token == (common.Address{}) { - return fmt.Errorf("token address must be set") - } - return nil - }, - CallContract: func(erc20LockBox *ERC20LockBoxContract, opts *bind.TransactOpts, args DepositArgs) (*types.Transaction, error) { - return erc20LockBox.Deposit(opts, args.Token, args.RemoteChainSelector, args.Amount) - }, -}) + if args.Token == (common.Address{}) { + return fmt.Errorf("token address must be set") + } + return nil + }, + CallContract: func( + c gobindings.ERC20LockBoxInterface, + opts *bind.TransactOpts, + args DepositArgs, + ) (*types.Transaction, error) { + return c.Deposit(opts, args.Token, args.RemoteChainSelector, args.Amount) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/executor/executor.go b/chains/evm/deployment/v2_0_0/operations/executor/executor.go index 1c7a447d09..7fe28deadc 100644 --- a/chains/evm/deployment/v2_0_0/operations/executor/executor.go +++ b/chains/evm/deployment/v2_0_0/operations/executor/executor.go @@ -3,244 +3,142 @@ package executor import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "Executor" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const ExecutorABI = `[{"type":"constructor","inputs":[{"name":"maxCCVsPerMsg","type":"uint8","internalType":"uint8"},{"name":"dynamicConfig","type":"tuple","internalType":"struct Executor.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"ccvAllowlistEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowedCCVUpdates","inputs":[{"name":"ccvsToRemove","type":"address[]","internalType":"address[]"},{"name":"ccvsToAdd","type":"address[]","internalType":"address[]"},{"name":"ccvAllowlistEnabled","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainUpdates","inputs":[{"name":"destChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"destChainSelectorsToAdd","type":"tuple[]","internalType":"struct Executor.RemoteChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"config","type":"tuple","internalType":"struct Executor.RemoteChainConfig","components":[{"name":"usdCentsFee","type":"uint16","internalType":"uint16"},{"name":"enabled","type":"bool","internalType":"bool"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowedCCVs","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getDestChains","inputs":[],"outputs":[{"name":"","type":"tuple[]","internalType":"struct Executor.RemoteChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"config","type":"tuple","internalType":"struct Executor.RemoteChainConfig","components":[{"name":"usdCentsFee","type":"uint16","internalType":"uint16"},{"name":"enabled","type":"bool","internalType":"bool"}]}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct Executor.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"ccvAllowlistEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"ccvs","type":"address[]","internalType":"address[]"},{"name":"","type":"bytes","internalType":"bytes"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"usdCentsFee","type":"uint16","internalType":"uint16"}],"stateMutability":"view"},{"type":"function","name":"getMaxCCVsPerMessage","inputs":[],"outputs":[{"name":"maxCCVsPerMsg","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct Executor.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"ccvAllowlistEnabled","type":"bool","internalType":"bool"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"CCVAdded","inputs":[{"name":"ccv","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"CCVAllowlistUpdated","inputs":[{"name":"enabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"CCVRemoved","inputs":[{"name":"ccv","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct Executor.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"ccvAllowlistEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"DestChainAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"config","type":"tuple","indexed":false,"internalType":"struct Executor.RemoteChainConfig","components":[{"name":"usdCentsFee","type":"uint16","internalType":"uint16"},{"name":"enabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"DestChainRemoved","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ExceedsMaxCCVs","inputs":[{"name":"provided","type":"uint256","internalType":"uint256"},{"name":"max","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidCCV","inputs":[{"name":"ccv","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidDestChain","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidMaxPossibleCCVsPerMsg","inputs":[{"name":"maxPossibleCCVsPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const ExecutorBin = "0x60a0604052346101b657604051611cc538819003601f8101601f191683016001600160401b038111848210176101bb57839282916040528339810103608081126101b657815160ff8116918282036101b657606090601f1901126101b65760405190606082016001600160401b038111838210176101bb5760405260208401516001600160a01b03811681036101b65782526040840151936001600160e01b0319851685036101b65760208301948552606001519283151584036101b6576040830193845233156101a557600180546001600160a01b031916331790558015610191576080829052825160028054875187516001600160c81b03199092166001600160a01b0394909416938417604091821c63ffffffff60a01b161791151560c01b60ff60c01b1691909117909155805191825286516001600160e01b031916602083015285511515908201527f7f91c2bbf73ab7b1f101e196b9e1c015a06bde52b3b65c75c1ccbcdb99bd9b9a90606090a1604051611af390816101d282396080518181816107660152610cd30152f35b631f3f959360e01b60005260045260246000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c908163181f5a771461122557508063240b96e914611052578063336e545a14610e0857806358c0bafd14610bbb5780635cb80c5d146109845780637437ff9f1461087357806379ba50971461078a578063845024141461072e5780638da5cb5b146106dc578063913682e014610469578063a68c61a61461037b578063cd4c50fb1461020f578063ec6ae7a7146101ae5763f2fde38b146100b957600080fd5b346101a95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95773ffffffffffffffffffffffffffffffffffffffff61010561142e565b61010d611517565b1633811461017f57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b600080fd5b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b346101a95760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a9577f7f91c2bbf73ab7b1f101e196b9e1c015a06bde52b3b65c75c1ccbcdb99bd9b9a61037660405161026e8161133f565b61027661142e565b81526102806113dc565b6020820190815261028f6113cd565b906040830191825261029f611517565b825160028054925193517fffffffffffffff0000000000000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff92909216918217604094851c77ffffffff0000000000000000000000000000000000000000161792151560c01b78ff000000000000000000000000000000000000000000000000169290921790915581519081526020808401517fffffffff000000000000000000000000000000000000000000000000000000001690820152918101511515908201529081906060820190565b0390a1005b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a9576040518060206003549283815201809260036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9060005b81811061045357505050816103fa91038261135b565b6040519182916020830190602084525180915260408301919060005b818110610424575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101610416565b82548452602090930192600192830192016103e4565b346101a95760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760043567ffffffffffffffff81116101a9576104b890369060040161139c565b6024359167ffffffffffffffff83116101a957366023840112156101a95782600401359167ffffffffffffffff83116101a95736602460608502860101116101a957610502611517565b60005b81811061066c57600085855b8083101561066a576000926060810283016024810167ffffffffffffffff61053882611502565b161561062c5761055967ffffffffffffffff61055383611502565b166119b1565b5067ffffffffffffffff61056c82611502565b1686526007602052604086209160448101359161ffff831680930361062857606484549201359384151592838603610624579867ffffffffffffffff61060d8694869460019b9c9d7f57ecbe7fefba319b9178ff7edc65aa2cfc028720fa679055210bf987a037eaf6997fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000062ff000060409b60101b16921617179055611502565b1695845193845250506020820152a2019190610511565b8980fd5b8780fd5b8567ffffffffffffffff610641602493611502565b7f020a07e500000000000000000000000000000000000000000000000000000000835216600452fd5b005b8067ffffffffffffffff61068b61068660019486886114d1565b611502565b1661069581611826565b6106a1575b5001610505565b806000526007602052600060408120557ff74668182f6a521d1a362a6bbc8344cac3a467bab207cdabbaf39e503edef6a1600080a28661069a565b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a957602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a957602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760005473ffffffffffffffffffffffffffffffffffffffff81163303610849577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a9576000604080516108b18161133f565b82815282602082015201526109806040516108cb8161133f565b60ff60025473ffffffffffffffffffffffffffffffffffffffff811683527fffffffff000000000000000000000000000000000000000000000000000000008160401b16602084015260c01c161515604082015260405191829182919091604080606083019473ffffffffffffffffffffffffffffffffffffffff81511684527fffffffff00000000000000000000000000000000000000000000000000000000602082015116602085015201511515910152565b0390f35b346101a95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760043567ffffffffffffffff81116101a9576109d390369060040161139c565b9073ffffffffffffffffffffffffffffffffffffffff60025416918215610b915760005b818110610a0057005b73ffffffffffffffffffffffffffffffffffffffff610a28610a238385876114d1565b6114e1565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa908115610b5157600091610b5d575b5080610a7e575b50506001016109f7565b60206000604051828101907fa9059cbb00000000000000000000000000000000000000000000000000000000825289602482015284604482015260448152610ac760648261135b565b519082865af115610b51576000513d610b485750813b155b610b1a5790857f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a39085610a74565b507f5274afe70000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60011415610adf565b6040513d6000823e3d90fd5b906020823d8211610b89575b81610b766020938361135b565b81010312610b8657505186610a6d565b80fd5b3d9150610b69565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101a95760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760043567ffffffffffffffff81168091036101a957610c076113dc565b60443567ffffffffffffffff81116101a957610c2790369060040161139c565b9160643567ffffffffffffffff81116101a957366023820112156101a957806004013567ffffffffffffffff81116101a957369101602401116101a957610c6c61140b565b50836000526007602052610c8360406000206114ac565b93602085015115610ddb575060ff90610cc5600254917fffffffff000000000000000000000000000000000000000000000000000000008360401b1690611562565b60c01c16610d3b575b5060ff7f00000000000000000000000000000000000000000000000000000000000000001690818111610d0b57602061ffff845116604051908152f35b7ff2d323530000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b60005b828110610d4b5750610cce565b604073ffffffffffffffffffffffffffffffffffffffff610d70610a238487876114d1565b1660009081526004602052205415610d8a57600101610d3e565b610a239073ffffffffffffffffffffffffffffffffffffffff93610dad936114d1565b7fa409d83e000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b7f020a07e50000000000000000000000000000000000000000000000000000000060005260045260246000fd5b346101a95760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760043567ffffffffffffffff81116101a957610e5790369060040161139c565b9060243567ffffffffffffffff81116101a957610e7890369060040161139c565b9091610e826113cd565b93610e8b611517565b60005b818110610fca5750505060005b818110610f2f5783600254901515908160ff8260c01c16151503610ebb57005b816020917fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff78ff0000000000000000000000000000000000000000000000007fd9e9ee812485edbbfab1d848c2c025cd0d1da3f7b9dcf38edf78c40ec4810ed89560c01b16911617600255604051908152a1005b73ffffffffffffffffffffffffffffffffffffffff610f52610a238385876114d1565b168015610f9d579081610f66600193611951565b610f72575b5001610e9b565b7fba540b0c7a674c7f1716e91e0e0a2390ebb27755267c72e0807812b93f3bf00e600080a285610f6b565b7fa409d83e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b80610ff973ffffffffffffffffffffffffffffffffffffffff610ff3610a2360019587896114d1565b16611661565b611004575b01610e8e565b73ffffffffffffffffffffffffffffffffffffffff611027610a238386886114d1565b167fbc743a2d04de950d86944633fbe825e492514eef584678e9fa97f3e939cf605e600080a2610ffe565b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95760055461108d81611451565b9061109b604051928361135b565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06110c882611451565b0160005b8181106111ec5750506005549060005b81811061114f578360405180916020820160208352815180915260206040840192019060005b818110611110575050500390f35b8251805167ffffffffffffffff168552602090810151805161ffff16828701528101511515604086015286955060609094019390920191600101611102565b6000838210156111bf5790604081602084600560019652200167ffffffffffffffff60009154166111808489611469565b515267ffffffffffffffff6111958489611469565b51511681526007602052206111b760206111af8489611469565b5101916114ac565b9052016110dc565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b6020906040516111fb816112f4565b6000815260405161120b816112f4565b6000815260008482015283820152828287010152016110cc565b346101a95760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a95761125d816112f4565b600e81527f4578656375746f7220322e302e30000000000000000000000000000000000000602082015260405190602082528181519182602083015260005b8381106112dc5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b6020828201810151604087840101528593500161129c565b6040810190811067ffffffffffffffff82111761131057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff82111761131057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761131057604052565b9181601f840112156101a95782359167ffffffffffffffff83116101a9576020808501948460051b0101116101a957565b6044359081151582036101a957565b602435907fffffffff00000000000000000000000000000000000000000000000000000000821682036101a957565b6084359073ffffffffffffffffffffffffffffffffffffffff821682036101a957565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036101a957565b67ffffffffffffffff81116113105760051b60200190565b805182101561147d5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906040516114b9816112f4565b915461ffff8116835260101c60ff1615156020830152565b919081101561147d5760051b0190565b3573ffffffffffffffffffffffffffffffffffffffff811681036101a95790565b3567ffffffffffffffff811681036101a95790565b73ffffffffffffffffffffffffffffffffffffffff60015416330361153857565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156116445761159581611a0b565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c16166116445761ffff8360e01c168015918215611633575b50506115df575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff1610905038806115d5565b505050565b805482101561147d5760005260206000200190600090565b600081815260046020526040902054801561181f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116117f057600354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116117f057818103611781575b5050506003548015611752577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161170f816003611649565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600355600052600460205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6117d86117926117a3936003611649565b90549060031b1c9283926003611649565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005260046020526040600020553880806116d6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5050600090565b600081815260066020526040902054801561181f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81018181116117f057600554907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019182116117f057818103611917575b5050506005548015611752577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016118d4816005611649565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600555600052600660205260006040812055600190565b6119396119286117a3936005611649565b90549060031b1c9283926005611649565b9055600052600660205260406000205538808061189b565b806000526004602052604060002054156000146119ab5760035468010000000000000000811015611310576119926117a38260018594016003556003611649565b9055600354906000526004602052604060002055600190565b50600090565b806000526006602052604060002054156000146119ab5760055468010000000000000000811015611310576119f26117a38260018594016005556005611649565b9055600554906000526006602052604060002055600190565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115611ae2577dffff00000000000000000000000000000000000000000000000000000000811615611ad95760ff60015b169060f01c80611aa3575b50600103611a765750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b60108110611ab45750611a6b565b6001811b8216611ac7575b600101611aa6565b91600181018091116117f05791611abf565b60ff6000611a60565b505056fea164736f6c634300081a000a" - -type ExecutorContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewExecutorContract( - address common.Address, - backend bind.ContractBackend, -) (*ExecutorContract, error) { - parsed, err := abi.JSON(strings.NewReader(ExecutorABI)) - if err != nil { - return nil, err - } - return &ExecutorContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *ExecutorContract) Address() common.Address { - return c.address -} - -func (c *ExecutorContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *ExecutorContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -func (c *ExecutorContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *ExecutorContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *ExecutorContract) GetDestChains(opts *bind.CallOpts) ([]RemoteChainConfigArgs, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChains") - if err != nil { - var zero []RemoteChainConfigArgs - return zero, err - } - return *abi.ConvertType(out[0], new([]RemoteChainConfigArgs)).(*[]RemoteChainConfigArgs), nil -} - -func (c *ExecutorContract) GetAllowedCCVs(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedCCVs") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *ExecutorContract) GetMaxCCVsPerMessage(opts *bind.CallOpts) (uint8, error) { - var out []any - err := c.contract.Call(opts, &out, "getMaxCCVsPerMessage") - if err != nil { - var zero uint8 - return zero, err - } - return *abi.ConvertType(out[0], new(uint8)).(*uint8), nil -} - -func (c *ExecutorContract) GetAllowedFinalityConfig(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedFinalityConfig") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -type DynamicConfig struct { - FeeAggregator common.Address - AllowedFinalityConfig [4]byte - CcvAllowlistEnabled bool -} - -type RemoteChainConfig struct { - UsdCentsFee uint16 - Enabled bool -} - -type RemoteChainConfigArgs struct { - DestChainSelector uint64 - Config RemoteChainConfig -} - type ConstructorArgs struct { - MaxCCVsPerMsg uint8 - DynamicConfig DynamicConfig + MaxCCVsPerMsg uint8 `json:"maxCCVsPerMsg"` + DynamicConfig gobindings.ExecutorDynamicConfig `json:"dynamicConfig"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "executor:deploy", - Version: Version, - Description: "Deploys the Executor contract", - ContractMetadata: &bind.MetaData{ - ABI: ExecutorABI, - Bin: ExecutorBin, - }, + Name: "executor:deploy", + Version: Version, + Description: "Deploys the Executor contract", + ContractMetadata: gobindings.ExecutorMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(ExecutorBin), + EVM: common.FromHex(gobindings.ExecutorMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *ExecutorContract]{ - Name: "executor:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: ExecutorABI, - NewContract: NewExecutorContract, - IsAllowedCaller: contract.OnlyOwner[*ExecutorContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *ExecutorContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) +func NewWriteSetDynamicConfig(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.ExecutorDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.ExecutorDynamicConfig, gobindings.ExecutorInterface]{ + Name: "executor:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.ExecutorMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, caller common.Address, args gobindings.ExecutorDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ExecutorInterface, + opts *bind.TransactOpts, + args gobindings.ExecutorDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *ExecutorContract]{ - Name: "executor:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: ExecutorABI, - NewContract: NewExecutorContract, - IsAllowedCaller: contract.OnlyOwner[*ExecutorContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *ExecutorContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) +func NewWriteWithdrawFeeTokens(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.ExecutorInterface]{ + Name: "executor:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.ExecutorMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ExecutorInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *ExecutorContract]{ - Name: "executor:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewExecutorContract, - CallContract: func(c *ExecutorContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, -}) +func NewReadGetDynamicConfig(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.ExecutorDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.ExecutorDynamicConfig, gobindings.ExecutorInterface]{ + Name: "executor:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, args struct{}) (gobindings.ExecutorDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} -var GetDestChains = contract.NewRead(contract.ReadParams[struct{}, []RemoteChainConfigArgs, *ExecutorContract]{ - Name: "executor:get-dest-chains", - Version: Version, - Description: "Calls getDestChains on the contract", - ContractType: ContractType, - NewContract: NewExecutorContract, - CallContract: func(c *ExecutorContract, opts *bind.CallOpts, args struct{}) ([]RemoteChainConfigArgs, error) { - return c.GetDestChains(opts) - }, -}) +func NewReadGetDestChains(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []gobindings.ExecutorRemoteChainConfigArgs, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []gobindings.ExecutorRemoteChainConfigArgs, gobindings.ExecutorInterface]{ + Name: "executor:get-dest-chains", + Version: Version, + Description: "Calls getDestChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, args struct{}) ([]gobindings.ExecutorRemoteChainConfigArgs, error) { + return c.GetDestChains(opts) + }, + }) +} -var GetAllowedCCVs = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *ExecutorContract]{ - Name: "executor:get-allowed-cc-vs", - Version: Version, - Description: "Calls getAllowedCCVs on the contract", - ContractType: ContractType, - NewContract: NewExecutorContract, - CallContract: func(c *ExecutorContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllowedCCVs(opts) - }, -}) +func NewReadGetAllowedCCVs(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.ExecutorInterface]{ + Name: "executor:get-allowed-cc-vs", + Version: Version, + Description: "Calls getAllowedCCVs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllowedCCVs(opts) + }, + }) +} -var GetMaxCCVsPerMessage = contract.NewRead(contract.ReadParams[struct{}, uint8, *ExecutorContract]{ - Name: "executor:get-max-cc-vs-per-message", - Version: Version, - Description: "Calls getMaxCCVsPerMessage on the contract", - ContractType: ContractType, - NewContract: NewExecutorContract, - CallContract: func(c *ExecutorContract, opts *bind.CallOpts, args struct{}) (uint8, error) { - return c.GetMaxCCVsPerMessage(opts) - }, -}) +func NewReadGetMaxCCVsPerMessage(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], uint8, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, uint8, gobindings.ExecutorInterface]{ + Name: "executor:get-max-cc-vs-per-message", + Version: Version, + Description: "Calls getMaxCCVsPerMessage on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, args struct{}) (uint8, error) { + return c.GetMaxCCVsPerMessage(opts) + }, + }) +} -var GetAllowedFinalityConfig = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *ExecutorContract]{ - Name: "executor:get-allowed-finality-config", - Version: Version, - Description: "Calls getAllowedFinalityConfig on the contract", - ContractType: ContractType, - NewContract: NewExecutorContract, - CallContract: func(c *ExecutorContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.GetAllowedFinalityConfig(opts) - }, -}) +func NewReadGetAllowedFinalityConfig(c gobindings.ExecutorInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.ExecutorInterface]{ + Name: "executor:get-allowed-finality-config", + Version: Version, + Description: "Calls getAllowedFinalityConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ExecutorInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.GetAllowedFinalityConfig(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/fee_quoter/fee_quoter.go b/chains/evm/deployment/v2_0_0/operations/fee_quoter/fee_quoter.go index a0857a1097..4f2ef692d0 100644 --- a/chains/evm/deployment/v2_0_0/operations/fee_quoter/fee_quoter.go +++ b/chains/evm/deployment/v2_0_0/operations/fee_quoter/fee_quoter.go @@ -3,357 +3,196 @@ package fee_quoter import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "FeeQuoter" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const FeeQuoterABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"}]},{"name":"priceUpdaters","type":"address[]","internalType":"address[]"},{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainConfigUpdates","inputs":[{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainConfig","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigSingleTokenArgs[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]}]},{"name":"tokensToUseDefaultFeeConfigs","type":"tuple[]","internalType":"struct FeeQuoter.TokenTransferFeeConfigRemoveArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"convertTokenAmount","inputs":[{"name":"fromToken","type":"address","internalType":"address"},{"name":"fromTokenAmount","type":"uint256","internalType":"uint256"},{"name":"toToken","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllDestChainConfigs","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"},{"name":"","type":"tuple[]","internalType":"struct FeeQuoter.DestChainConfig[]","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}],"stateMutability":"view"},{"type":"function","name":"getAllTokenTransferFeeConfigs","inputs":[],"outputs":[{"name":"destChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"transferTokens","type":"address[][]","internalType":"address[][]"},{"name":"tokenTransferFeeConfigs","type":"tuple[][]","internalType":"struct FeeQuoter.TokenTransferFeeConfig[][]","components":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}],"stateMutability":"view"},{"type":"function","name":"getDestinationChainGasPrice","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getFeeTokens","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct FeeQuoter.StaticConfig","components":[{"name":"maxFeeJuelsPerMsg","type":"uint96","internalType":"uint96"},{"name":"linkToken","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenAndGasPrices","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"tokenPrice","type":"uint224","internalType":"uint224"},{"name":"gasPriceValue","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"getTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Internal.TimestampedPackedUint224","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenPrices","inputs":[{"name":"tokens","type":"address[]","internalType":"address[]"}],"outputs":[{"name":"","type":"tuple[]","internalType":"struct Internal.TimestampedPackedUint224[]","components":[{"name":"value","type":"uint224","internalType":"uint224"},{"name":"timestamp","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"getValidatedFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getValidatedTokenPrice","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint224","internalType":"uint224"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"processMessageArgs","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"feeToken","type":"address","internalType":"address"},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"extraArgs","type":"bytes","internalType":"bytes"},{"name":"messageReceiver","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"isOutOfOrderExecution","type":"bool","internalType":"bool"},{"name":"convertedExtraArgs","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"processPoolReturnData","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"onRampTokenTransfers","type":"tuple[]","internalType":"struct Internal.EVM2AnyTokenTransfer[]","components":[{"name":"sourcePoolAddress","type":"address","internalType":"address"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"destExecData","type":"bytes","internalType":"bytes"}]},{"name":"sourceTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}],"outputs":[{"name":"destExecDataPerToken","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"quoteGasForExec","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"nonCalldataGas","type":"uint32","internalType":"uint32"},{"name":"calldataSize","type":"uint32","internalType":"uint32"},{"name":"feeToken","type":"address","internalType":"address"}],"outputs":[{"name":"totalGas","type":"uint32","internalType":"uint32"},{"name":"gasCostInUsdCents","type":"uint256","internalType":"uint256"},{"name":"feeTokenPrice","type":"uint256","internalType":"uint256"},{"name":"premiumPercentMultiplier","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"removeFeeTokens","inputs":[{"name":"feeTokensToRemove","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"resolveLegacyArgs","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"gasLimit","type":"uint32","internalType":"uint32"},{"name":"executorArgs","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updatePrices","inputs":[{"name":"priceUpdates","type":"tuple","internalType":"struct Internal.PriceUpdates","components":[{"name":"tokenPriceUpdates","type":"tuple[]","internalType":"struct Internal.TokenPriceUpdate[]","components":[{"name":"sourceToken","type":"address","internalType":"address"},{"name":"usdPerToken","type":"uint224","internalType":"uint224"}]},{"name":"gasPriceUpdates","type":"tuple[]","internalType":"struct Internal.GasPriceUpdate[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"usdPerUnitGas","type":"uint224","internalType":"uint224"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DestChainAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}],"anonymous":false},{"type":"event","name":"DestChainConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"destChainConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.DestChainConfig","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"maxDataBytes","type":"uint32","internalType":"uint32"},{"name":"maxPerMsgGasLimit","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destGasPerPayloadByteBase","type":"uint8","internalType":"uint8"},{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"},{"name":"defaultTokenFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"defaultTokenDestGasOverhead","type":"uint32","internalType":"uint32"},{"name":"defaultTxGasLimit","type":"uint32","internalType":"uint32"},{"name":"networkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"linkFeeMultiplierPercent","type":"uint8","internalType":"uint8"}]}],"anonymous":false},{"type":"event","name":"FeeTokenAdded","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FeeTokenRemoved","inputs":[{"name":"feeToken","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct FeeQuoter.TokenTransferFeeConfig","components":[{"name":"feeUSDCents","type":"uint32","internalType":"uint32"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"UsdPerTokenUpdated","inputs":[{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"UsdPerUnitGasUpdated","inputs":[{"name":"destChain","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"timestamp","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"DestinationChainNotEnabled","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"FeeTokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidChainFamilySelector","inputs":[{"name":"chainFamilySelector","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidDataLength","inputs":[{"name":"location","type":"uint8","internalType":"enum ExtraArgsCodec.EncodingErrorLocation"},{"name":"offset","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidDestBytesOverhead","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidEVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidExtraArgsData","inputs":[]},{"type":"error","name":"InvalidExtraArgsTag","inputs":[]},{"type":"error","name":"InvalidSVMExtraArgsWritableBitmap","inputs":[{"name":"accountIsWritableBitmap","type":"uint64","internalType":"uint64"},{"name":"numAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidStaticConfig","inputs":[]},{"type":"error","name":"InvalidTVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidTokenReceiver","inputs":[]},{"type":"error","name":"MessageComputeUnitLimitTooHigh","inputs":[]},{"type":"error","name":"MessageFeeTooHigh","inputs":[{"name":"msgFeeJuels","type":"uint256","internalType":"uint256"},{"name":"maxFeeJuelsPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MessageGasLimitTooHigh","inputs":[]},{"type":"error","name":"MessageTooLarge","inputs":[{"name":"maxSize","type":"uint256","internalType":"uint256"},{"name":"actualSize","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NoGasPriceAvailable","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"SourceTokenDataTooLarge","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenTransferConfigMustBeEnabled","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TooManySVMExtraArgsAccounts","inputs":[{"name":"numAccounts","type":"uint256","internalType":"uint256"},{"name":"maxAccounts","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"TooManySuiExtraArgsReceiverObjectIds","inputs":[{"name":"numReceiverObjectIds","type":"uint256","internalType":"uint256"},{"name":"maxReceiverObjectIds","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnsupportedNumberOfTokens","inputs":[{"name":"numberOfTokens","type":"uint256","internalType":"uint256"},{"name":"maxNumberOfTokensPerMsg","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const FeeQuoterBin = "0x60c060405234610aca57616e508038038061001981610c5c565b92833981019080820360a08112610aca57604013610aca57610039610c3d565b81516001600160601b0381168103610aca57815261005960208301610c81565b6020820190815260408301519093906001600160401b038111610aca5783019381601f86011215610aca5784519461009861009387610c95565b610c5c565b9560208088838152019160051b83010191848311610aca57602001905b828210610c255750505060608401516001600160401b038111610aca5784019382601f86011215610aca578451946100ef61009387610c95565b9560208088838152019160051b83010191858311610aca5760208101915b838310610ae557505050506080810151906001600160401b038211610aca570182601f82011215610aca5780519061014761009383610c95565b936020610180818786815201940283010191818311610aca57602001925b8284106109a05750505050331561098f57600180546001600160a01b0319163317905560209261019484610c5c565b926000845260003681376101a6610c3d565b968752838588015260005b8451811015610218576001906001600160a01b036101cf8288610cfb565b5116876101db82610f2a565b6101e8575b5050016101b1565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138876101e0565b508493508587519260005b8451811015610294576001600160a01b0361023e8287610cfb565b5116908115610283577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef8883610275600195610d7f565b50604051908152a101610223565b6342bcdf7f60e11b60005260046000fd5b50845186919086906001600160a01b031615801561097d575b61096c57516001600160a01b031660a052516001600160601b031660805260005b83518110156106ae576102e18185610cfb565b51826001600160401b036102f58488610cfb565b5151169101518115801561069b575b801561067d575b801561066d575b8015610657575b610642578161055c9160019493600052600a865263ffffffff60e01b60406000205460701b161560001461056357817f4efe320c85221c7c3684c54561bea5a9c4dcfad794c6ef9ff9e6b43fb307c0f86040518061041e858291909161014060ff8161016084019580511515855263ffffffff602082015116602086015263ffffffff604082015116604086015263ffffffff606082015116606086015282608082015116608086015263ffffffff60e01b60a08201511660a086015261ffff60c08201511660c086015263ffffffff60e08201511660e086015263ffffffff6101008201511661010086015261ffff61012082015116610120860152015116910152565b0390a25b6000828152600a875260409081902082518154848a0151938501516060860151608087015160a08089015160c0808b015160e0808d01516101008e01516101208f0151610140909f01517fff00000000000000000000000000000000000000000000000000000000000000909b1660ff9c15159c909c169b909b1760089d909d1b64ffffffff00169c909c1760289890981b68ffffffff0000000000169790971760489690961b6cffffffff000000000000000000169590951760689490941b6dff00000000000000000000000000169390931760709190911c63ffffffff60701b161760909390931b61ffff60901b16929092179690911b63ffffffff60a01b16959095179290941b63ffffffff60c01b16919091179390921b61ffff60e01b169290921760f09190911b60ff60f01b16179055610dbe565b50016102ce565b817f0c6380a4766d45f5d53ca170bf865bebfab44958dec379d5a90177264e6645b76040518061063a858291909161014060ff8161016084019580511515855263ffffffff602082015116602086015263ffffffff604082015116604086015263ffffffff606082015116606086015282608082015116608086015263ffffffff60e01b60a08201511660a086015261ffff60c08201511660c086015263ffffffff60e08201511660e086015263ffffffff6101008201511661010086015261ffff61012082015116610120860152015116910152565b0390a2610422565b5063c35aa79d60e01b60005260045260246000fd5b5060a08101516001600160e01b03191615610319565b5060ff6101408201511615610312565b5063ffffffff6101008201511663ffffffff6040830151161061030b565b5063ffffffff6101008201511615610304565b5060016106ba82610c5c565b9260008452600091610967575b81925b8151841015610892576106dd8483610cfb565b5180516001600160401b031692831561087e578285979201965b8751805182101561086e5761070d828692610cfb565b51015188516001600160a01b0390610726908490610cfb565b5151169060608101805115610857576040820163ffffffff8151168881106108405750608084938a9363ffffffff7f5c55501634b3b87e45686082d77f017b6639b436c21cb423ba6313d843f66ed194818f61081a8f9b60408360019f9e600c908e8067ffffffff000000009852600b825284842060018060a01b038716855282528484208d8d8c8c835116926cff0000000000000000000000006bffffffff000000000000000088875493019e8f518a1b1693518c1b169351151560601b16936cff000000000000000000000000199160018060601b0319161716171717905561081081610dbe565b5083525220610df7565b5081604051965116865251168d850152511660408301525115156060820152a3016106f7565b6312766e0160e11b8b52600485905260245260448afd5b604489848a632ce1527960e21b8352600452602452fd5b50509250945092600101926106ca565b63c35aa79d60e01b85526004849052602485fd5b849150825b825181101561092a576001906001600160401b036108b58286610cfb565b515116828060a01b03846108c98488610cfb565b5101511690808752600b855260408720848060a01b03831688528552866040812055808752600c85526108ff8260408920610e74565b507f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b8780a301610897565b604051615e919081610fbf823960805181818161045c01526110a0015260a0518181816104840152818161103701528181611dd001526124bb0152f35b6106c7565b63d794ef9560e01b60005260046000fd5b5081516001600160601b0316156102ad565b639b15e16f60e01b60005260046000fd5b8382036101808112610aca576101606109b7610c3d565b916109c187610cac565b8352601f190112610aca576040519161016083016001600160401b03811184821017610acf576040526109f660208701610cd1565b8352610a0460408701610cc0565b6020840152610a1560608701610cc0565b6040840152610a2660808701610cc0565b6060840152610a3760a08701610cde565b608084015260c0860151916001600160e01b031983168303610aca578360209360a0610180960152610a6b60e08901610cec565b60c0820152610a7d6101008901610cc0565b60e0820152610a8f6101208901610cc0565b610100820152610aa26101408901610cec565b610120820152610ab56101608901610cde565b61014082015283820152815201930192610165565b600080fd5b634e487b7160e01b600052604160045260246000fd5b82516001600160401b038111610aca5782016040818903601f190112610aca57610b0d610c3d565b90610b1a60208201610cac565b825260408101516001600160401b038111610aca57602091010188601f82011215610aca578051610b4d61009382610c95565b91602060a08185858152019302820101908b8211610aca57602001915b818310610b89575050509181602093848094015281520192019161010d565b828c0360a08112610aca576080610b9e610c3d565b91610ba886610c81565b8352601f190112610aca576040519160808301916001600160401b03831184841017610acf5760a093602093604052610be2848801610cc0565b8152610bf060408801610cc0565b84820152610c0060608801610cc0565b6040820152610c1160808801610cd1565b606082015283820152815201920191610b6a565b60208091610c3284610c81565b8152019101906100b5565b60408051919082016001600160401b03811183821017610acf57604052565b6040519190601f01601f191682016001600160401b03811183821017610acf57604052565b51906001600160a01b0382168203610aca57565b6001600160401b038111610acf5760051b60200190565b51906001600160401b0382168203610aca57565b519063ffffffff82168203610aca57565b51908115158203610aca57565b519060ff82168203610aca57565b519061ffff82168203610aca57565b8051821015610d0f5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b8054821015610d0f5760005260206000200190600090565b80549068010000000000000000821015610acf5781610d64916001610d7b94018155610d25565b819391549060031b91821b91600019901b19161790565b9055565b80600052600360205260406000205415600014610db857610da1816002610d3d565b600254906000526003602052604060002055600190565b50600090565b80600052600960205260406000205415600014610db857610de0816008610d3d565b600854906000526009602052604060002055600190565b6000828152600182016020526040902054610e2e5780610e1983600193610d3d565b80549260005201602052604060002055600190565b5050600090565b80548015610e5e576000190190610e4c8282610d25565b8154906000199060031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b906001820191816000528260205260406000205490811515600014610f2157600019820191808311610f0b5781546000198101908111610f0b578381610ec29503610ed4575b505050610e35565b60005260205260006040812055600190565b610ef4610ee4610d649386610d25565b90549060031b1c92839286610d25565b905560005284602052604060002055388080610eba565b634e487b7160e01b600052601160045260246000fd5b50505050600090565b6000818152600360205260409020548015610e2e576000198101818111610f0b57600254600019810191908211610f0b57808203610f84575b505050610f706002610e35565b600052600360205260006040812055600190565b610fa6610f95610d64936002610d25565b90549060031b1c9283926002610d25565b90556000526003602052604060002055388080610f6356fe6080604052600436101561001257600080fd5b60003560e01c806241e5be146101d657806301447eaa146101d157806306285c69146101cc578063080d711a146101c757806315c34d5b146101c2578063181f5a77146101bd5780632451a627146101b85780633937306f146101b35780633a49bb49146101ae5780633f37a52c146101a957806345ac924d146101a45780634ab35b0b1461019f578063514e8cff1461019a5780636def4ce71461019557806379ba50971461019057806382b49eb01461018b57806389933a51146101865780638da5cb5b14610181578063910d8f591461017c57806391a2749a1461017757806391b2f60714610172578063947f82171461016d5780639cc1999614610168578063cdc73d5114610163578063d02641a01461015e578063d8694ccd14610159578063f2fde38b146101545763ffdb4b371461014f57600080fd5b6127dd565b612707565b61236e565b612312565b61229b565b612221565b6121d2565b61204e565b611f70565b611c27565b611bf3565b611b06565b6119f3565b6118e5565b6117c0565b611638565b6115eb565b611522565b6112a8565b610fc5565b610b9a565b610b17565b610a5a565b61082c565b61063a565b61040f565b610370565b6101fe565b73ffffffffffffffffffffffffffffffffffffffff8116036101f957565b600080fd5b346101f95760606003193601126101f9576020610235600435610220816101db565b60243560443591610230836101db565b6129a4565b604051908152f35b6004359067ffffffffffffffff821682036101f957565b6024359067ffffffffffffffff821682036101f957565b359067ffffffffffffffff821682036101f957565b9181601f840112156101f95782359167ffffffffffffffff83116101f9576020808501948460051b0101116101f957565b919082519283825260005b8481106102dd575050601f19601f8460006020809697860101520116010190565b806020809284010151828286010152016102bc565b602081016020825282518091526040820191602060408360051b8301019401926000915b83831061032557505050505090565b9091929394602080610361837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0866001960301875289516102b1565b97019301930191939290610316565b346101f95760606003193601126101f95761038961023d565b60243567ffffffffffffffff81116101f9576103a9903690600401610280565b6044929192359167ffffffffffffffff83116101f957366023840112156101f95782600401359167ffffffffffffffff83116101f9573660248460061b860101116101f95761040b9460246103ff950192612ba2565b604051918291826102f2565b0390f35b346101f95760006003193601126101f957610428612de6565b5060408051610436816104e3565b73ffffffffffffffffffffffffffffffffffffffff60206bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169283815201817f0000000000000000000000000000000000000000000000000000000000000000168152835192835251166020820152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176104ff57604052565b6104b4565b6080810190811067ffffffffffffffff8211176104ff57604052565b610160810190811067ffffffffffffffff8211176104ff57604052565b60a0810190811067ffffffffffffffff8211176104ff57604052565b90601f601f19910116810190811067ffffffffffffffff8211176104ff57604052565b6040519061058b604083610559565b565b6040519061058b61016083610559565b6040519061058b606083610559565b6040519061058b602083610559565b67ffffffffffffffff81116104ff5760051b60200190565b9080601f830112156101f95781356105ea816105bb565b926105f86040519485610559565b81845260208085019260051b8201019283116101f957602001905b8282106106205750505090565b60208091833561062f816101db565b815201910190610613565b346101f95760206003193601126101f95760043567ffffffffffffffff81116101f95761066b9036906004016105d3565b610673614108565b60005b815181101561074e57806106ab73ffffffffffffffffffffffffffffffffffffffff6106a460019486612b8e565b5116615920565b610703575b60006106fc73ffffffffffffffffffffffffffffffffffffffff6106d48487612b8e565b511673ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b5501610676565b73ffffffffffffffffffffffffffffffffffffffff6107228285612b8e565b51167f1795838dc8ab2ffc5f431a1729a6afa0b587f982f7b2be0b9d7187a1ef547f91600080a26106b0565b005b6024359063ffffffff821682036101f957565b6044359063ffffffff821682036101f957565b359063ffffffff821682036101f957565b801515036101f957565b359061058b82610787565b81601f820112156101f9578035906107b3826105bb565b926107c16040519485610559565b82845260208085019360061b830101918183116101f957602001925b8284106107eb575050505090565b6040848303126101f95760206040918251610805816104e3565b61080e8761026b565b81528287013561081d816101db565b838201528152019301926107dd565b346101f95760406003193601126101f95760043567ffffffffffffffff81116101f957366023820112156101f9578060040135610868816105bb565b916108766040519384610559565b8183526024602084019260051b820101903682116101f95760248101925b8284106108c5576024358567ffffffffffffffff82116101f9576108bf61074e92369060040161079c565b90612dff565b833567ffffffffffffffff81116101f957820160407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc82360301126101f95760405190610911826104e3565b61091d6024820161026b565b8252604481013567ffffffffffffffff81116101f957602491010136601f820112156101f957803561094e816105bb565b9161095c6040519384610559565b818352602060a08185019302820101903682116101f957602001915b8183106109975750505091816020938480940152815201930192610894565b82360360a081126101f9576080601f19604051926109b4846104e3565b86356109bf816101db565b845201126101f95760a0916020916040516109d981610504565b6109e4848801610776565b81526109f260408801610776565b84820152610a0260608801610776565b60408201526080870135610a1581610787565b606082015283820152815201920191610978565b67ffffffffffffffff81116104ff57601f01601f191660200190565b60405190610a54602083610559565b60008252565b346101f95760006003193601126101f95761040b6040805190610a7d8183610559565b600f82527f46656551756f74657220322e302e3000000000000000000000000000000000006020830152519182916020835260208301906102b1565b906020808351928381520192019060005b818110610ad75750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101610aca565b906020610b14928181520190610ab9565b90565b346101f95760006003193601126101f95760405180602060025491828152019060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b818110610b845761040b85610b7881870382610559565b60405191829182610b03565b8254845260209093019260019283019201610b61565b346101f95760206003193601126101f95760043567ffffffffffffffff81116101f9578060040190604060031982360301126101f957610bd8614173565b610be282806131c0565b4263ffffffff1692915060005b818110610dbc57505060240190610c0682846131c0565b92905060005b838110610c1557005b80610c34610c2f600193610c29868a6131c0565b90612a62565b613274565b7fdd84a3fa9ef9409f550d54d6affec7e9c480c878c6ab27b78912a03e1b371c6e67ffffffffffffffff610d83610d606020850194610d52610c9287517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b610cc1610c9d61057c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252565b63ffffffff8c166020820152610cfc610ce2845167ffffffffffffffff1690565b67ffffffffffffffff166000526004602052604060002090565b815160209092015160e01b7fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5167ffffffffffffffff1690565b93517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9290921682524260208301529190931692a201610c0c565b80610dd5610dd0600193610c2989806131c0565b61323d565b7f52f50aa6d1a95a4595361ecf953d095f125d442e4673716dede699e049de148a73ffffffffffffffffffffffffffffffffffffffff610ee2610d606020850194610e9d610e3f87517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b610e4a610c9d61057c565b63ffffffff8d166020820152610cfc610e77845173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b610ec3610ebe825173ffffffffffffffffffffffffffffffffffffffff1690565b6141b7565b610f1b575b5173ffffffffffffffffffffffffffffffffffffffff1690565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9290921682524260208301529190931692a201610bef565b83610f3a825173ffffffffffffffffffffffffffffffffffffffff1690565b167fdf1b1bd32a69711488d71554706bb130b1fc63a5fa1a2cd85e8440f84065ba23600080a2610ec8565b9181601f840112156101f95782359167ffffffffffffffff83116101f957602083818601950101116101f957565b92610b149492610fb7928552151560208501526080604085015260808401906102b1565b9160608184039101526102b1565b346101f95760a06003193601126101f957610fde61023d565b60243590610feb826101db565b6044359160643567ffffffffffffffff81116101f95761100f903690600401610f65565b93909160843567ffffffffffffffff81116101f957611032903690600401610f65565b9290917f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff821673ffffffffffffffffffffffffffffffffffffffff82161460001461111c575050935b6bffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168086116110eb5750926110da926001969261040b956141f8565b919390509260405194859485610f93565b857f6a92a4830000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b91611126926129a4565b93611091565b906020808351928381520192019060005b81811061114a5750505090565b825167ffffffffffffffff1684526020938401939092019160010161113d565b9061117d9060608352606083019061112c565b8181036020830152825180825260208201916020808360051b8301019501926000915b8383106112755750505050506040818303910152815180825260208201906020808260051b8501019401916000905b8282106111de57505050505090565b909192939594601f19878203018252845190602080835192838152019201906000905b80821061122357505050602080600192960192019201909291959394956111cf565b909192602060808261126a60019488516060809163ffffffff815116845263ffffffff602082015116602085015263ffffffff604082015116604085015201511515910152565b019401920190611201565b9091929397969560208061129583601f1986600196030187528c51610ab9565b9a019301930191939290979596976111a0565b346101f95760006003193601126101f9576008546112c581613299565b6112ce826129ea565b916112d8816129ea565b906000905b8082106112f657505061040b906040519384938461116a565b61132b61131261130584615d88565b67ffffffffffffffff1690565b61131c8487612b8e565b9067ffffffffffffffff169052565b61135e61135861133e610d528588612b8e565b67ffffffffffffffff16600052600c602052604060002090565b54613299565b6113688387612b8e565b526113738286612b8e565b5061138d61138761133e610d528588612b8e565b546132ef565b6113978385612b8e565b526113a28284612b8e565b5060005b85856113b861133e610d528784612b8e565b548310156114a3578261147883611454610ec88461140e8b61144e611434610d52838c60019f9e61142f9061149c9f8a61140e866114088361140361133e610d528561141499612b8e565b6144ca565b94612b8e565b51612b8e565b9073ffffffffffffffffffffffffffffffffffffffff169052565b612b8e565b67ffffffffffffffff16600052600b602052604060002090565b95612b8e565b73ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b61148c611485888a612b8e565b5191612b49565b6114968383612b8e565b52612b8e565b50016113a6565b50505090600101906112dd565b602060408183019282815284518094520192019060005b8181106114d45750505090565b9091926020604082611517600194885163ffffffff602080927bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8151168552015116910152565b0194019291016114c7565b346101f95760206003193601126101f95760043567ffffffffffffffff81116101f957611553903690600401610280565b61155c816105bb565b9161156a6040519384610559565b818352601f19611579836105bb565b0160005b8181106115d457505060005b828110156115c6576001906115aa6115a58260051b8501612a77565b613db9565b6115b48287612b8e565b526115bf8186612b8e565b5001611589565b6040518061040b86826114b0565b6020906115df612de6565b8282880101520161157d565b346101f95760206003193601126101f957602061161260043561160d816101db565b613378565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff60405191168152f35b346101f95760206003193601126101f95767ffffffffffffffff61165a61023d565b611662612de6565b5016600052600460205260406000206040519061167e826104e3565b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116825260e01c6020820152604051809161040b82604081019263ffffffff602080927bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8151168552015116910152565b906101408061058b936116fe84825115159052565b60208181015163ffffffff169085015260408181015163ffffffff169085015260608181015163ffffffff169085015260808181015160ff169085015260a0818101517fffffffff00000000000000000000000000000000000000000000000000000000169085015260c08181015161ffff169085015260e08181015163ffffffff16908501526101008181015163ffffffff16908501526101208181015161ffff1690850152015160ff16910152565b6101608101929161058b91906116e9565b346101f95760206003193601126101f95767ffffffffffffffff6117e261023d565b6117ea613476565b5016600052600a60205261040b60406000206118d96118ce6040519261180f84610520565b5461181e60ff82165b15158552565b63ffffffff600882901c16602085015263ffffffff602882901c16604085015263ffffffff604882901c16606085015260ff606882901c1660808501527fffffffff00000000000000000000000000000000000000000000000000000000607082901b1660a085015261ffff609082901c1660c085015263ffffffff60a082901c1660e085015263ffffffff60c082901c1661010085015261ffff60e082901c1661012085015260f01c60ff1690565b60ff16610140830152565b604051918291826117af565b346101f95760006003193601126101f95760005473ffffffffffffffffffffffffffffffffffffffff81163303611986577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b61058b9092919260808101936060809163ffffffff815116845263ffffffff602082015116602085015263ffffffff604082015116604085015201511515910152565b346101f95760406003193601126101f9576080611a6b611a66611a1461023d565b67ffffffffffffffff60243591611a2a836101db565b611a326132ca565b5016600052600b60205260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b612b49565b611aaa60405180926060809163ffffffff815116845263ffffffff602082015116602085015263ffffffff604082015116604085015201511515910152565bf35b90611abf9060408352604083019061112c565b9060208183039101526020808351928381520192019060005b818110611ae55750505090565b909192602061016082611afb60019488516116e9565b019401929101611ad8565b346101f95760006003193601126101f957600854611b23816105bb565b90611b316040519283610559565b808252601f19611b40826105bb565b0160005b818110611bdc575050611b5681613299565b9060005b818110611b7257505061040b60405192839283611aac565b80611b8e611b84611305600194615d88565b61131c8387612b8e565b611bc0611bbb611ba1610d528488612b8e565b67ffffffffffffffff16600052600a602052604060002090565b6134c8565b611bca8287612b8e565b52611bd58186612b8e565b5001611b5a565b602090611be7613476565b82828701015201611b44565b346101f95760006003193601126101f957602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346101f95760806003193601126101f957611c4061023d565b611c48610750565b611c50610763565b9060643591611c5e836101db565b611c7f611bbb8567ffffffffffffffff16600052600a602052604060002090565b91611c91611c8d8451151590565b1590565b611f3857611cbf90611cb9611cb3611cad608087015160ff1690565b60ff1690565b846134f6565b90613513565b93611cdd611cd4604085015163ffffffff1690565b63ffffffff1690565b9163ffffffff8616928311611f0e57602084015163ffffffff1663ffffffff811663ffffffff831611611ed5575050611d32611d2d8267ffffffffffffffff166000526004602052604060002090565b61333e565b9063ffffffff611d49602084015163ffffffff1690565b1615611e9a575091611db8611dab611da660ff9794611da0611d8d611d8d61040b99517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b6dffffffffffffffffffffffffffff1690565b90612958565b61352d565b662386f26fc10000900490565b9073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861614600014611e7157611e44611e3e6101407bffffffffffffffffffffffffffffffffffffffffffffffffffffffff93015160ff1690565b95613378565b16906040519586951692859094939260609263ffffffff6080840197168352602083015260408201520152565b507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff611e44606495613378565b7fa96740690000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b6000fd5b7f869337890000000000000000000000000000000000000000000000000000000060005263ffffffff9081166004521660245260446000fd5b7f4c4fc93a0000000000000000000000000000000000000000000000000000000060005260046000fd5b7f99ac52f20000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff851660045260246000fd5b346101f95760206003193601126101f95760043567ffffffffffffffff81116101f957604060031982360301126101f957604051611fad816104e3565b816004013567ffffffffffffffff81116101f957611fd190600436918501016105d3565b8152602482013567ffffffffffffffff81116101f95761074e926004611ffa92369201016105d3565b6020820152613578565b359060ff821682036101f957565b35907fffffffff00000000000000000000000000000000000000000000000000000000821682036101f957565b359061ffff821682036101f957565b346101f95760206003193601126101f95760043567ffffffffffffffff81116101f957366023820112156101f95780600401359061208b826105bb565b906120996040519283610559565b8282526024610180602084019402820101903682116101f957602401925b8184106120c75761074e83613718565b83360361018081126101f957610160601f19604051926120e6846104e3565b6120ef8861026b565b845201126101f9576101809160209161210661058d565b612111848901610791565b815261211f60408901610776565b8482015261212f60608901610776565b604082015261214060808901610776565b606082015261215160a08901612004565b608082015261216260c08901612012565b60a082015261217360e0890161203f565b60c08201526121856101008901610776565b60e08201526121976101208901610776565b6101008201526121aa610140890161203f565b6101208201526121bd6101608901612004565b610140820152838201528152019301926120b7565b346101f95760406003193601126101f957606063ffffffff806122086121f661023d565b60243590612203826101db565b613943565b9193908160405195168552166020840152166040820152f35b346101f95760406003193601126101f95761223a61023d565b6024359067ffffffffffffffff82116101f95761226b61040b91612265612287943690600401610f65565b916139f2565b63ffffffff6040949394519586956060875260608701906102b1565b9216602085015283820360408501526102b1565b346101f95760006003193601126101f95760405180602060065491828152019060066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9060005b8181106122fc5761040b85610b7881870382610559565b82548452602090930192600192830192016122e5565b346101f95760206003193601126101f95760406123346004356115a5816101db565b611aaa8251809263ffffffff602080927bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8151168552015116910152565b346101f95760406003193601126101f95761238761023d565b60243567ffffffffffffffff81116101f957806004019160a060031983360301126101f9576123cd611bbb8267ffffffffffffffff16600052600a602052604060002090565b906123db611c8d8351151590565b6126d057606483019161241f611c8d6123f385612a77565b73ffffffffffffffffffffffffffffffffffffffff166000526001600601602052604060002054151590565b6126825761242e858284614ed1565b909161243c61160d86612a77565b96604487019660008061244f8a856131c0565b15905061265257505061249961ffff8798996124a39861247460c088015161ffff1690565b9161249061248960e08a015163ffffffff1690565b91886131c0565b949093166155e2565b9099909790612a77565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691161460001461261b576101408401516124f79060ff166128c9565b61250091612958565b9761255d60606125516125406125679a63ffffffff6125386125629b6125316125629b6024611cd49c5b0190612ac1565b905061356b565b91169061356b565b611da0611cad60808a015160ff1690565b95015163ffffffff1690565b613513565b61356b565b90612589611d2d8267ffffffffffffffff166000526004602052604060002090565b9061259e611cd4602084015163ffffffff1690565b15611e9a5761040b61260b867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff612603886125626125fe8a611da0611d8d611d8d8d517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b6128f0565b91169061296b565b6040519081529081906020820190565b612624906128f0565b9761255d60606125516125406125679a63ffffffff6125386125629b6125316125629b6024611cd49c61252a565b96979098506124a361267c61267761267061012088015161ffff1690565b61ffff1690565b6128c9565b91612a77565b611ed161268e84612a77565b7f2502348c0000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff16600452602490565b7f99ac52f20000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b346101f95760206003193601126101f95773ffffffffffffffffffffffffffffffffffffffff600435612739816101db565b612741614108565b163381146127b357807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b346101f95760406003193601126101f9576004356127fa816101db565b67ffffffffffffffff61280b610254565b169081600052600a60205260ff604060002054161561286c5761282d90613378565b6000918252600460209081526040928390205483517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9384168152921690820152f35b507f99ac52f20000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90662386f26fc10000820291808304662386f26fc1000014901517156128eb57565b61289a565b90670de0b6b3a7640000820291808304670de0b6b3a764000014901517156128eb57565b908160051b91808304602014901517156128eb57565b9061012c82029180830461012c14901517156128eb57565b90606c820291808304606c14901517156128eb57565b818102929181159184041417156128eb57565b8115612975570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6129e36129dd610b1494937bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6129d68195613378565b1690612958565b92613378565b169061296b565b906129f4826105bb565b612a016040519182610559565b8281526020601f19612a1383956105bb565b01910160005b828110612a2557505050565b606082820152602001612a19565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015612a725760061b0190565b612a33565b35610b14816101db565b9190811015612a725760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61813603018212156101f9570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101f9570180359067ffffffffffffffff82116101f9576020019181360383136101f957565b929192612b1e82610a29565b91612b2c6040519384610559565b8294818452818301116101f9578281602093846000960137010152565b90604051612b5681610504565b606060ff82945463ffffffff8116845263ffffffff8160201c16602085015263ffffffff8160401c166040850152821c161515910152565b8051821015612a725760209160051b010190565b909291612bef612bc68367ffffffffffffffff16600052600a602052604060002090565b5460701b7fffffffff000000000000000000000000000000000000000000000000000000001690565b90612bf9816129ea565b9560005b828110612c0e575050505050505090565b612c21612c1c828489612a62565b612a77565b8388612c3b612c31858484612a81565b6040810190612ac1565b905060208111612d5e575b508392612c7c612c76612c6f612c65600198612cbf97611a6697612a81565b6020810190612ac1565b3691612b12565b89613e20565b612c9a8967ffffffffffffffff16600052600b602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b606081015115612d2457612d08612ce06020612cfa93015163ffffffff1690565b6040805163ffffffff909216602083015290928391820190565b03601f198101835282610559565b612d12828b612b8e565b52612d1d818a612b8e565b5001612bfd565b50612cfa612d08612d59612d4c8967ffffffffffffffff16600052600a602052604060002090565b5460a01c63ffffffff1690565b612ce0565b915050612d96611cd4612d8984612c9a8b67ffffffffffffffff16600052600b602052604060002090565b5460401c63ffffffff1690565b10612da357838838612c46565b7f36f536ca0000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff1660045260246000fd5b60405190612df3826104e3565b60006020838281520152565b612e07614108565b6000915b81518310156130ca57612e1e8383612b8e565b51805167ffffffffffffffff1694859283156130925760206000959301945b8551805182101561307e57612e5482602092612b8e565b510151612e80612e65838951612b8e565b515173ffffffffffffffffffffffffffffffffffffffff1690565b612e90611c8d6060840151151590565b61302d57604082015163ffffffff1660208110612fdf575090867f5c55501634b3b87e45686082d77f017b6639b436c21cb423ba6313d843f66ed173ffffffffffffffffffffffffffffffffffffffff84612fc4818f80612f9b89612f1360019d9c612c9a612fbf9667ffffffffffffffff16600052600b602052604060002090565b815181546020808501516040808701516060978801517fffffffffffffffffffffffffffffffffffffff0000000000000000000000000090951663ffffffff96909616959095179190921b67ffffffff00000000161792901b6bffffffff0000000000000000169190911790151590921b6cff00000000000000000000000016919091179055565b612fa488615b41565b5067ffffffffffffffff16600052600c602052604060002090565b6141d8565b50612fd66040519283921695826119b0565b0390a301612e3d565b7f24ecdc020000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff90911660045263ffffffff1660245260446000fd5b7fb38549e40000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff8a1660045273ffffffffffffffffffffffffffffffffffffffff1660245260446000fd5b505095509250926001915001919092612e0b565b7fc35aa79d0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff871660045260246000fd5b91505060005b81518110156131bc57806130f86130e960019385612b8e565b515167ffffffffffffffff1690565b67ffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff61314160206131258689612b8e565b51015173ffffffffffffffffffffffffffffffffffffffff1690565b600061316582612c9a8767ffffffffffffffff16600052600b602052604060002090565b5561318d816131888667ffffffffffffffff16600052600c602052604060002090565b614153565b501691167f4de5b1bcbca6018c11303a2c3f4a4b4f22a1c741d8c4ba430d246ac06c5ddf8b600080a3016130d0565b5050565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156101f9570180359067ffffffffffffffff82116101f957602001918160061b360383136101f957565b35907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff821682036101f957565b6040813603126101f95761326c602060405192613259846104e3565b8035613264816101db565b845201613214565b602082015290565b6040813603126101f95761326c602060405192613290846104e3565b6132648161026b565b906132a3826105bb565b6132b06040519182610559565b828152601f196132c082946105bb565b0190602036910137565b604051906132d782610504565b60006060838281528260208201528260408201520152565b906132f9826105bb565b6133066040519182610559565b828152601f1961331682946105bb565b019060005b82811061332757505050565b6020906133326132ca565b8282850101520161331b565b9060405161334b816104e3565b91547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116835260e01c6020830152565b73ffffffffffffffffffffffffffffffffffffffff81166000526005602052604060002090604051916133aa836104e3565b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811680845260e09190911c602084018190521590811561344f575b5061340b5750517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff907f06439c6b000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16159050386133e3565b6040519061348382610520565b6000610140838281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b9061058b6040516134d881610520565b6101406134ee82955461181e6118188260ff1690565b60ff16910152565b9063ffffffff8091169116029063ffffffff82169182036128eb57565b9063ffffffff8091169116019063ffffffff82116128eb57565b90662386f26fc0ffff82018092116128eb57565b90600282018092116128eb57565b90602082018092116128eb57565b90600182018092116128eb57565b919082018092116128eb57565b613580614108565b60208101519160005b835181101561363457806135a2610ec860019387612b8e565b6135de6135d973ffffffffffffffffffffffffffffffffffffffff83165b73ffffffffffffffffffffffffffffffffffffffff1690565b615dbd565b6135ea575b5001613589565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a1386135e3565b5091505160005b81518110156131bc57613651610ec88284612b8e565b9073ffffffffffffffffffffffffffffffffffffffff8216156136ee577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef6136e5836136bd6136b86135c060019773ffffffffffffffffffffffffffffffffffffffff1690565b615b7c565b5060405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390a10161363b565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b90613721614108565b60005b825181101561393e576137378184612b8e565b5160206137476130e98487612b8e565b91015167ffffffffffffffff8216918215801561391f575b80156138f1575b80156138d8575b80156138a1575b61386a579161382661382b92613821856137d06137ab612bc660019a9967ffffffffffffffff16600052600a602052604060002090565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b61383257847f4efe320c85221c7c3684c54561bea5a9c4dcfad794c6ef9ff9e6b43fb307c0f86040518061380487826117af565b0390a267ffffffffffffffff16600052600a602052604060002090565b6144f4565b615b41565b5001613724565b847f0c6380a4766d45f5d53ca170bf865bebfab44958dec379d5a90177264e6645b76040518061386287826117af565b0390a2611ba1565b7fc35aa79d0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b506138d26137ab60a08401517fffffffff000000000000000000000000000000000000000000000000000000001690565b15613774565b5060ff6138ea61014084015160ff1690565b161561376d565b5061010082015163ffffffff1663ffffffff613917611cd4604086015163ffffffff1690565b911611613766565b5063ffffffff61393761010084015163ffffffff1690565b161561375f565b509050565b9190611a666139899167ffffffffffffffff8516600052600b60205260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b9160608301516139d0576139b391925067ffffffffffffffff16600052600a602052604060002090565b54609081901c61ffff169160a09190911c63ffffffff1690602090565b5063ffffffff8251169063ffffffff6040816020860151169401511691929190565b611bbb613a169194929467ffffffffffffffff16600052600a602052604060002090565b9260a08401927fffffffff00000000000000000000000000000000000000000000000000000000613a6785517fffffffff000000000000000000000000000000000000000000000000000000001690565b167f2812d52c000000000000000000000000000000000000000000000000000000008114908115613d8f575b8115613d65575b50613d11577f1e10bdc4000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000613b0b86517fffffffff000000000000000000000000000000000000000000000000000000001690565b1614613c78577fc4e05953000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000613b7d86517fffffffff000000000000000000000000000000000000000000000000000000001690565b1614613bfe57611ed1613bb085517fffffffff000000000000000000000000000000000000000000000000000000001690565b7f2ee82075000000000000000000000000000000000000000000000000000000006000527fffffffff0000000000000000000000000000000000000000000000000000000016600452602490565b613c3e9350613c1b611cd46040613c219597015163ffffffff1690565b91614d83565b91613c4c6040840151604051938491602083019190602083019252565b03601f198101845283610559565b613c726060613c5f855163ffffffff1690565b940151613c6a6105ac565b908152614e19565b91929190565b613c3e9350613c95611cd46040613c9b9597015163ffffffff1690565b91614a5e565b91613cb86060840151604051938491602083019190602083019252565b613c72613cc9845163ffffffff1690565b93613ce46020608083015192015167ffffffffffffffff1690565b90613d07613cf061059d565b6000815267ffffffffffffffff9093166020840152565b6040820152614c5c565b613d52935093613d489294613d42611cd46040613d3661010086015163ffffffff1690565b94015163ffffffff1690565b926148b8565b5163ffffffff1690565b90613d5b610a45565b9190610b14610a45565b7f647e2ba90000000000000000000000000000000000000000000000000000000091501438613a9a565b7fac77ffec0000000000000000000000000000000000000000000000000000000081149150613a93565b73ffffffffffffffffffffffffffffffffffffffff90613dd7612de6565b50166000526005602052604060002060405190613df3826104e3565b547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116825260e01c602082015290565b7fffffffff000000000000000000000000000000000000000000000000000000001691907f2812d52c000000000000000000000000000000000000000000000000000000008314613f68577f1e10bdc4000000000000000000000000000000000000000000000000000000008314613f5a577fac77ffec000000000000000000000000000000000000000000000000000000008314613f4f577f647e2ba9000000000000000000000000000000000000000000000000000000008314613f44577fc4e05953000000000000000000000000000000000000000000000000000000008314613f3557827f2ee820750000000000000000000000000000000000000000000000000000000060005260045260246000fd5b61058b91925061dee990615785565b61058b9192506157e6565b61058b919250615722565b61058b919250600190615785565b61058b919250615692565b917fffffffff0000000000000000000000000000000000000000000000000000000083167f2812d52c0000000000000000000000000000000000000000000000000000000081146140fc577f1e10bdc40000000000000000000000000000000000000000000000000000000081146140dc577fac77ffec0000000000000000000000000000000000000000000000000000000081146140d0577f647e2ba90000000000000000000000000000000000000000000000000000000081146140c4577fc4e0595300000000000000000000000000000000000000000000000000000000146140a9577f2ee82075000000000000000000000000000000000000000000000000000000006000527fffffffff00000000000000000000000000000000000000000000000000000000831660045260246000fd5b61058b9250156140bc5761dee990615785565b600090615785565b505061058b91506157e6565b505061058b9150615722565b5061058b9250156140f35760ff60015b1690615785565b60ff60006140ec565b505061058b9150615692565b73ffffffffffffffffffffffffffffffffffffffff60015416330361412957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b73ffffffffffffffffffffffffffffffffffffffff610b14921690615a04565b3360005260036020526040600020541561418957565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff610b1491166006615bb1565b73ffffffffffffffffffffffffffffffffffffffff610b14921690615bb1565b611bbb61421f9196949395929667ffffffffffffffff16600052600a602052604060002090565b9460a08601947fffffffff0000000000000000000000000000000000000000000000000000000061427087517fffffffff000000000000000000000000000000000000000000000000000000001690565b167f2812d52c0000000000000000000000000000000000000000000000000000000081149081156144a0575b8115614476575b5061443d5750507fc4e05953000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000061431686517fffffffff000000000000000000000000000000000000000000000000000000001690565b1614614412577f1e10bdc4000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000061438886517fffffffff000000000000000000000000000000000000000000000000000000001690565b16146143bb57611ed1613bb085517fffffffff000000000000000000000000000000000000000000000000000000001690565b6143fd9350612c6f60606143e76143e0611cd4604061440b989a015163ffffffff1690565b8486614a5e565b0151604051958691602083019190602083019252565b03601f198101865285610559565b9160019190565b6143fd9350612c6f60406143e7614436611cd48361440b989a015163ffffffff1690565b8486614d83565b945094610b149261446b92614460611cd461010061446695015163ffffffff1690565b91615c11565b615d3e565b936001933691612b12565b7f647e2ba900000000000000000000000000000000000000000000000000000000915014386142a3565b7fac77ffec000000000000000000000000000000000000000000000000000000008114915061429c565b73ffffffffffffffffffffffffffffffffffffffff916144e991615839565b90549060031b1c1690565b61486961014061058b9361453c61450b8251151590565b859060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b614586614550602083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff1660089190911b64ffffffff0016178555565b6145d461459a604083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff1660289190911b68ffffffff000000000016178555565b6146266145e8606083015163ffffffff1690565b85547fffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffffff1660489190911b6cffffffff00000000000000000016178555565b614676614637608083015160ff1690565b85547fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff1660689190911b6dff0000000000000000000000000016178555565b6146e96146a660a08301517fffffffff000000000000000000000000000000000000000000000000000000001690565b85547fffffffffffffffffffffffffffff00000000ffffffffffffffffffffffffffff1660709190911c71ffffffff000000000000000000000000000016178555565b6147406146fb60c083015161ffff1690565b85547fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1660909190911b73ffff00000000000000000000000000000000000016178555565b61479d61475460e083015163ffffffff1690565b85547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff1660a09190911b77ffffffff000000000000000000000000000000000000000016178555565b6147ff6147b261010083015163ffffffff1690565b85547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1660c09190911b7bffffffff00000000000000000000000000000000000000000000000016178555565b61486161481261012083015161ffff1690565b85547fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e09190911b7dffff0000000000000000000000000000000000000000000000000000000016178555565b015160ff1690565b7fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7eff00000000000000000000000000000000000000000000000000000000000083549260f01b169116179055565b9063ffffffff6148d2936148ca612de6565b501691615c11565b90815111611f0e5790565b906004116101f95790600490565b90929192836004116101f95783116101f957600401916003190190565b919091357fffffffff000000000000000000000000000000000000000000000000000000008116926004811061493c575050565b7fffffffff00000000000000000000000000000000000000000000000000000000929350829060040360031b1b161690565b9080601f830112156101f9578135614985816105bb565b926149936040519485610559565b81845260208085019260051b8201019283116101f957602001905b8282106149bb5750505090565b81358152602091820191016149ae565b6020818303126101f95780359067ffffffffffffffff82116101f9570160a0818303126101f957604051916149ff8361053d565b614a0882610776565b8352614a166020830161026b565b60208401526040820135614a2981610787565b604084015260608201356060840152608082013567ffffffffffffffff81116101f957614a56920161496e565b608082015290565b60606080604051614a6e8161053d565b600081526000602082015260006040820152600083820152015260048210614b72577f1f3b3aba000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000614ae5614adf85856148dd565b90614908565b1603614b485781614b0192614af9926148eb565b8101906149cb565b9063ffffffff614b15835163ffffffff1690565b1611614b1e5790565b7f2e2b0c290000000000000000000000000000000000000000000000000000000060005260046000fd5b7f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fb00b53dc0000000000000000000000000000000000000000000000000000000060005260046000fd5b805160209091019060005b818110614bb45750505090565b8251845260209384019390920191600101614ba7565b90610b1494937fffffffffffffffff000000000000000000000000000000000000000000000000600e947fff0000000000000000000000000000000000000000000000000000000000000080947f1a2b3c4d00000000000000000000000000000000000000000000000000000000875260f81b16600486015260c01b16600584015260f81b16600d8201520190614b9c565b604081019081515160ff8111614cd4578151916003831015614ca5576020015160ff93610b1493612cfa9267ffffffffffffffff16915191604051968795169160208601614bca565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7fd9437f9d00000000000000000000000000000000000000000000000000000000600052600d600452600060245260446000fd5b6020818303126101f95780359067ffffffffffffffff82116101f957016080818303126101f95760405191614d3c83610504565b813583526020820135614d4e81610787565b602084015260408201356040840152606082013567ffffffffffffffff81116101f957614d7b920161496e565b606082015290565b606080604051614d9281610504565b600081526000602082015260006040820152015260048210614b72577f21ea4ca9000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000614dfd614adf85856148dd565b1603614b4857816148d292614e11926148eb565b810190614d08565b8051519060ff8211614e8e577fff0000000000000000000000000000000000000000000000000000000000000091612cfa610b1492516040519485937f5e6f7a8b00000000000000000000000000000000000000000000000000000000602086015260f81b1660248401526025830190614b9c565b7fd9437f9d00000000000000000000000000000000000000000000000000000000600052600e600452600060245260446000fd5b908160209103126101f9573590565b909291600093614ee46020830183612ac1565b90506040830193614ef585856131c0565b90506020840190614f0d611cd4835163ffffffff1690565b8085116155b057506001811161557e5760a0850196614f4c88517fffffffff000000000000000000000000000000000000000000000000000000001690565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f2812d52c0000000000000000000000000000000000000000000000000000000081148015615555575b801561552c575b1561502257505050505050509181615018612c6f614fe761501196614fcb608061501e980186612ac1565b613d42611cd46040613d36610100879697015163ffffffff1690565b51958694517fffffffff000000000000000000000000000000000000000000000000000000001690565b9280612ac1565b90613f73565b9190565b7fc4e0595300000000000000000000000000000000000000000000000000000000819c94979b9a9395989c999699146000146152b15750506150c26150896150b5999a9b6040613c1b611cd461507b60808b018b612ac1565b939094015163ffffffff1690565b918251998a91517fffffffff000000000000000000000000000000000000000000000000000000001690565b615018612c6f8880612ac1565b606081015151908a6150df6150d78780612ac1565b810190614ec2565b61528c575081615256575b8515159081615249575b5061521f57604081116151ed57506151239061511d6151168695949896612942565b809261356b565b9961356b565b946000935b838510615182575050505050611cd4615145915163ffffffff1690565b8082116151525750509190565b7f869337890000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b90919293956001906151c2611cd4612d896151b18667ffffffffffffffff16600052600b602052604060002090565b611454612c1c8d610c298b8d6131c0565b80156151dd576151d19161356b565b965b0193929190615128565b506151e79061354f565b966151d3565b7fc327a56c00000000000000000000000000000000000000000000000000000000600052600452604060245260446000fd5b7f5bed51920000000000000000000000000000000000000000000000000000000060005260046000fd5b60409150015115386150f4565b611ed1827fc327a56c00000000000000000000000000000000000000000000000000000000600052906044916004526000602452565b925099506152ab6152a461529f8361355d565b612914565b809361356b565b996150ea565b7f1e10bdc400000000000000000000000000000000000000000000000000000000036154dd57506153346152f96150b5999a9b6040613c95611cd461507b60808b018b612ac1565b9161530b611cd4845163ffffffff1690565b998a91517fffffffff000000000000000000000000000000000000000000000000000000001690565b608081015151908a6153496150d78780612ac1565b6154c457508161548e575b85151580615482575b61521f576040821161544e576020015167ffffffffffffffff9081169081831c166154145750506153989061511d615116869594989661292a565b946000935b8385106153ba575050505050611cd4615145915163ffffffff1690565b90919293956001906153e9611cd4612d896151b18667ffffffffffffffff16600052600b602052604060002090565b8015615404576153f89161356b565b965b019392919061539d565b5061540e9061354f565b966153fa565b7fafa933080000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260245260446000fd5b7f8a0d71f7000000000000000000000000000000000000000000000000000000006000526004829052604060245260446000fd5b5060608101511561535d565b611ed1827f8a0d71f700000000000000000000000000000000000000000000000000000000600052906044916004526000602452565b925099506154d76152a461529f83613541565b99615354565b7f2ee82075000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000001660045260246000fd5b507f647e2ba9000000000000000000000000000000000000000000000000000000008114614fa0565b507fac77ffec000000000000000000000000000000000000000000000000000000008114614f99565b7fd88dddd600000000000000000000000000000000000000000000000000000000600052600452600160245260446000fd5b7f8693378900000000000000000000000000000000000000000000000000000000600052600452602484905260446000fd5b94939192909282156156725767ffffffffffffffff16600052600b60205260406000209115612a725761561e91611a66913590612c9a826101db565b9261562f611c8d6060860151151590565b615660575050615649612677611cd4845163ffffffff1690565b90613c726040613d36602086015163ffffffff1690565b61566b9193506128c9565b9190602090565b505050509050600090600090600090565b908160209103126101f9575190565b60208151036156d5576156ae6020825183010160208301615683565b73ffffffffffffffffffffffffffffffffffffffff8111908115615716575b506156d55750565b615712906040519182917f8d666f6000000000000000000000000000000000000000000000000000000000835260206004840181815201906102b1565b0390fd5b610400915010386156cd565b602081510361574857600b6157406020835184010160208401615683565b106157485750565b615712906040519182917fe0d7fb0200000000000000000000000000000000000000000000000000000000835260206004840181815201906102b1565b9060208251036157ab5780615798575050565b6157406020835184010160208401615683565b6040517fe0d7fb02000000000000000000000000000000000000000000000000000000008152602060048201528061571260248201856102b1565b60248151036157fc576022810151156157fc5750565b615712906040519182917f373b0e4400000000000000000000000000000000000000000000000000000000835260206004840181815201906102b1565b8054821015612a725760005260206000200190600090565b91615889918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b805480156158f1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906158c28282615839565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000818152600760205260409020549081156159fd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201908282116128eb57600654927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84019384116128eb5783836000956159bc95036159c2575b5050506159ab600661588d565b600790600052602052604060002090565b55600190565b6159ab6159ee916159e46159da6159f4956006615839565b90549060031b1c90565b9283916006615839565b90615851565b5538808061599e565b5050600090565b6001810191806000528260205260406000205492831515600014615adc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84018481116128eb578354937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85019485116128eb5760009585836159bc97615a949503615aa3575b50505061588d565b90600052602052604060002090565b615ac36159ee91615aba6159da615ad39588615839565b92839187615839565b8590600052602052604060002090565b55388080615a8c565b50505050600090565b805490680100000000000000008210156104ff5781615b0c91600161588994018155615839565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b600081815260096020526040902054615b7657615b5f816008615ae5565b600854906000526009602052604060002055600190565b50600090565b600081815260036020526040902054615b7657615b9a816002615ae5565b600254906000526003602052604060002055600190565b60008281526001820160205260409020546159fd5780615bd383600193615ae5565b80549260005201602052604060002055600190565b908160409103126101f957602060405191615c02836104e3565b80518352015161326c81610787565b91615c1a612de6565b5060048210615d1c5750615c5d612c6f8280615c577fffffffff000000000000000000000000000000000000000000000000000000009587614908565b956148eb565b91167f181dcf10000000000000000000000000000000000000000000000000000000008103615ca4575080602080615c9a93518301019101615be8565b6001602082015290565b7f97a657c90000000000000000000000000000000000000000000000000000000014615cf4577f5247fdce0000000000000000000000000000000000000000000000000000000060005260046000fd5b80602080615d0793518301019101615683565b615d0f61057c565b9081526001602082015290565b91505067ffffffffffffffff615d3061057c565b911681526001602082015290565b6020604051917f181dcf1000000000000000000000000000000000000000000000000000000000828401528051602484015201511515604482015260448152610b14606482610559565b600854811015612a725760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3015490565b6000818152600360205260409020549081156159fd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201908282116128eb57600254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84019384116128eb5783836159bc9460009603615e59575b505050615e48600261588d565b600390600052602052604060002090565b615e486159ee91615e716159da615e7b956002615839565b9283916002615839565b55388080615e3b56fea164736f6c634300081a000a" - -type FeeQuoterContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewFeeQuoterContract( - address common.Address, - backend bind.ContractBackend, -) (*FeeQuoterContract, error) { - parsed, err := abi.JSON(strings.NewReader(FeeQuoterABI)) - if err != nil { - return nil, err - } - return &FeeQuoterContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *FeeQuoterContract) Address() common.Address { - return c.address -} - -func (c *FeeQuoterContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *FeeQuoterContract) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, args []DestChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyDestChainConfigUpdates", args) -} - -func (c *FeeQuoterContract) UpdatePrices(opts *bind.TransactOpts, args PriceUpdates) (*types.Transaction, error) { - return c.contract.Transact(opts, "updatePrices", args) -} - -func (c *FeeQuoterContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *FeeQuoterContract) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, tokensToUseDefaultFeeConfigs) -} - -func (c *FeeQuoterContract) GetDestChainConfig(opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChainConfig", args) - if err != nil { - var zero DestChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DestChainConfig)).(*DestChainConfig), nil -} - -func (c *FeeQuoterContract) GetDestinationChainGasPrice(opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestinationChainGasPrice", args) - if err != nil { - var zero TimestampedPackedUint224 - return zero, err - } - return *abi.ConvertType(out[0], new(TimestampedPackedUint224)).(*TimestampedPackedUint224), nil -} - -func (c *FeeQuoterContract) GetTokenTransferFeeConfig(opts *bind.CallOpts, destChainSelector uint64, token common.Address) (TokenTransferFeeConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenTransferFeeConfig", destChainSelector, token) - if err != nil { - var zero TokenTransferFeeConfig - return zero, err - } - return *abi.ConvertType(out[0], new(TokenTransferFeeConfig)).(*TokenTransferFeeConfig), nil -} - -func (c *FeeQuoterContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *FeeQuoterContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type DestChainConfig struct { - IsEnabled bool - MaxDataBytes uint32 - MaxPerMsgGasLimit uint32 - DestGasOverhead uint32 - DestGasPerPayloadByteBase uint8 - ChainFamilySelector [4]byte - DefaultTokenFeeUSDCents uint16 - DefaultTokenDestGasOverhead uint32 - DefaultTxGasLimit uint32 - NetworkFeeUSDCents uint16 - LinkFeeMultiplierPercent uint8 -} - -type DestChainConfigArgs struct { - DestChainSelector uint64 - DestChainConfig DestChainConfig -} - -type GasPriceUpdate struct { - DestChainSelector uint64 - UsdPerUnitGas *big.Int -} - -type PriceUpdates struct { - TokenPriceUpdates []TokenPriceUpdate - GasPriceUpdates []GasPriceUpdate -} - -type StaticConfig struct { - MaxFeeJuelsPerMsg *big.Int - LinkToken common.Address -} - -type TimestampedPackedUint224 struct { - Value *big.Int - Timestamp uint32 -} - -type TokenPriceUpdate struct { - SourceToken common.Address - UsdPerToken *big.Int -} - -type TokenTransferFeeConfig struct { - FeeUSDCents uint32 - DestGasOverhead uint32 - DestBytesOverhead uint32 - IsEnabled bool -} - -type TokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - TokenTransferFeeConfigs []TokenTransferFeeConfigSingleTokenArgs -} - -type TokenTransferFeeConfigRemoveArgs struct { - DestChainSelector uint64 - Token common.Address -} - -type TokenTransferFeeConfigSingleTokenArgs struct { - Token common.Address - TokenTransferFeeConfig TokenTransferFeeConfig -} - type ApplyTokenTransferFeeConfigUpdatesArgs struct { - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - TokensToUseDefaultFeeConfigs []TokenTransferFeeConfigRemoveArgs + TokenTransferFeeConfigArgs []gobindings.FeeQuoterTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + TokensToUseDefaultFeeConfigs []gobindings.FeeQuoterTokenTransferFeeConfigRemoveArgs `json:"tokensToUseDefaultFeeConfigs"` } type GetTokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - Token common.Address + DestChainSelector uint64 `json:"destChainSelector"` + Token common.Address `json:"token"` } type ConstructorArgs struct { - StaticConfig StaticConfig - PriceUpdaters []common.Address - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - DestChainConfigArgs []DestChainConfigArgs + StaticConfig gobindings.FeeQuoterStaticConfig `json:"staticConfig"` + PriceUpdaters []common.Address `json:"priceUpdaters"` + TokenTransferFeeConfigArgs []gobindings.FeeQuoterTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + DestChainConfigArgs []gobindings.FeeQuoterDestChainConfigArgs `json:"destChainConfigArgs"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "fee-quoter:deploy", - Version: Version, - Description: "Deploys the FeeQuoter contract", - ContractMetadata: &bind.MetaData{ - ABI: FeeQuoterABI, - Bin: FeeQuoterBin, - }, + Name: "fee-quoter:deploy", + Version: Version, + Description: "Deploys the FeeQuoter contract", + ContractMetadata: gobindings.FeeQuoterMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(FeeQuoterBin), + EVM: common.FromHex(gobindings.FeeQuoterMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyDestChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]DestChainConfigArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-dest-chain-config-updates", - Version: Version, - Description: "Calls applyDestChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, []DestChainConfigArgs], - Validate: func([]DestChainConfigArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args []DestChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyDestChainConfigUpdates(opts, args) - }, -}) - -var UpdatePrices = contract.NewWrite(contract.WriteParams[PriceUpdates, *FeeQuoterContract]{ - Name: "fee-quoter:update-prices", - Version: Version, - Description: "Calls updatePrices on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, PriceUpdates], - Validate: func(PriceUpdates) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args PriceUpdates, - ) (*types.Transaction, error) { - return c.UpdatePrices(opts, args) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var ApplyTokenTransferFeeConfigUpdates = contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, *FeeQuoterContract]{ - Name: "fee-quoter:apply-token-transfer-fee-config-updates", - Version: Version, - Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: FeeQuoterABI, - NewContract: NewFeeQuoterContract, - IsAllowedCaller: contract.OnlyOwner[*FeeQuoterContract, ApplyTokenTransferFeeConfigUpdatesArgs], - Validate: func(ApplyTokenTransferFeeConfigUpdatesArgs) error { return nil }, - CallContract: func( - c *FeeQuoterContract, - opts *bind.TransactOpts, - args ApplyTokenTransferFeeConfigUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) - }, -}) - -var GetDestChainConfig = contract.NewRead(contract.ReadParams[uint64, DestChainConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-dest-chain-config", - Version: Version, - Description: "Calls getDestChainConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - return c.GetDestChainConfig(opts, args) - }, }) -var GetDestinationChainGasPrice = contract.NewRead(contract.ReadParams[uint64, TimestampedPackedUint224, *FeeQuoterContract]{ - Name: "fee-quoter:get-destination-chain-gas-price", - Version: Version, - Description: "Calls getDestinationChainGasPrice on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args uint64) (TimestampedPackedUint224, error) { - return c.GetDestinationChainGasPrice(opts, args) - }, -}) - -var GetTokenTransferFeeConfig = contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, TokenTransferFeeConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-token-transfer-fee-config", - Version: Version, - Description: "Calls getTokenTransferFeeConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (TokenTransferFeeConfig, error) { - return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) - }, -}) - -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *FeeQuoterContract]{ - Name: "fee-quoter:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *FeeQuoterContract]{ - Name: "fee-quoter:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewFeeQuoterContract, - CallContract: func(c *FeeQuoterContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) +func NewWriteApplyDestChainConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.FeeQuoterDestChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.FeeQuoterDestChainConfigArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-dest-chain-config-updates", + Version: Version, + Description: "Calls applyDestChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.FeeQuoterDestChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args []gobindings.FeeQuoterDestChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyDestChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteUpdatePrices(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.InternalPriceUpdates], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.InternalPriceUpdates, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:update-prices", + Version: Version, + Description: "Calls updatePrices on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.InternalPriceUpdates) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.InternalPriceUpdates, + ) (*types.Transaction, error) { + return c.UpdatePrices(opts, args) + }, + }) +} + +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} + +func NewWriteApplyTokenTransferFeeConfigUpdates(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[ApplyTokenTransferFeeConfigUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:apply-token-transfer-fee-config-updates", + Version: Version, + Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.FeeQuoterMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, caller common.Address, args ApplyTokenTransferFeeConfigUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.FeeQuoterInterface, + opts *bind.TransactOpts, + args ApplyTokenTransferFeeConfigUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.TokensToUseDefaultFeeConfigs) + }, + }) +} + +func NewReadGetDestChainConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.FeeQuoterDestChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.FeeQuoterDestChainConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-dest-chain-config", + Version: Version, + Description: "Calls getDestChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.FeeQuoterDestChainConfig, error) { + return c.GetDestChainConfig(opts, args) + }, + }) +} + +func NewReadGetDestinationChainGasPrice(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.InternalTimestampedPackedUint224, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.InternalTimestampedPackedUint224, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-destination-chain-gas-price", + Version: Version, + Description: "Calls getDestinationChainGasPrice on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args uint64) (gobindings.InternalTimestampedPackedUint224, error) { + return c.GetDestinationChainGasPrice(opts, args) + }, + }) +} + +func NewReadGetTokenTransferFeeConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[GetTokenTransferFeeConfigArgs], gobindings.FeeQuoterTokenTransferFeeConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, gobindings.FeeQuoterTokenTransferFeeConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-token-transfer-fee-config", + Version: Version, + Description: "Calls getTokenTransferFeeConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (gobindings.FeeQuoterTokenTransferFeeConfig, error) { + return c.GetTokenTransferFeeConfig(opts, args.DestChainSelector, args.Token) + }, + }) +} + +func NewReadGetStaticConfig(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.FeeQuoterStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.FeeQuoterStaticConfig, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) (gobindings.FeeQuoterStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} + +func NewReadGetAllAuthorizedCallers(c gobindings.FeeQuoterInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.FeeQuoterInterface]{ + Name: "fee-quoter:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.FeeQuoterInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool/lock_release_token_pool.go b/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool/lock_release_token_pool.go index cded7f883f..59c6eb7b31 100644 --- a/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool/lock_release_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool/lock_release_token_pool.go @@ -3,102 +3,50 @@ package lock_release_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lock_release_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "LockReleaseTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const LockReleaseTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"lockBox","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getLockBox","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const LockReleaseTokenPoolBin = "0x610100806040523461037a5760c081616038803803809161002082856103ba565b83398101031261037a5780516001600160a01b0381169182820361037a5761004a602082016103f3565b9061005760408201610401565b61006360608301610401565b9261007c60a061007560808601610401565b9401610401565b9333156103a957600180546001600160a01b0319163317905586158015610398575b8015610387575b6102df578560805260c0523086036102f0575b60a052600380546001600160a01b03199081166001600160a01b03938416179091556002805490911692821692909217909155169182156102df576040516375151b6360e01b815260048101829052602081602481875afa9081156102d357600091610291575b501561027d57604051906020600081840163095ea7b360e01b815286602486015281196044860152604485526101566064866103ba565b84519082875af1903d600051908361025e575b50505015610219575b8260e052604051615bc79081610471823960805181818161024a015281816121d3015281816129c701528181612c3a015281816130e8015281816137140152818161376e0152614f0c015260a0518181816135da015281816148ed015281816149370152614f60015260c0518181816102e50152818161134d0152818161226d01528181612a620152613183015260e0518181816126cf01528181612bc10152614e910152f35b6102579161025260405163095ea7b360e01b6020820152856024820152600060448201526044815261024c6064826103ba565b82610415565b610415565b3880610172565b9192509061027357503b15155b388080610169565b600191501461026b565b63961c9a4f60e01b60005260045260246000fd5b6020813d6020116102cb575b816102aa602093836103ba565b810103126102c757519081151582036102c457503861011f565b80fd5b5080fd5b3d915061029d565b6040513d6000823e3d90fd5b630a64406560e11b60005260046000fd5b60405163313ce56760e01b81526020816004818a5afa60009181610346575b5061031b575b506100b8565b60ff1660ff821681810361032f5750610315565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d60201161037f575b81610362602093836103ba565b8101031261037a57610373906103f3565b903861030f565b600080fd5b3d9150610355565b506001600160a01b038116156100a5565b506001600160a01b0384161561009e565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b038211908210176103dd57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff8216820361037a57565b51906001600160a01b038216820361037a57565b906000602091828151910182855af1156102d3576000513d61046757506001600160a01b0381163b155b6104465750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b6001141561043f56fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461398f5750806306b859ef146138aa578063181f5a77146138495780631826b1e71461379257806321df0da714613741578063240028e8146136dd5780632422ac45146135fe57806324f65ee7146135c05780632cab0fb61461304d57806337a3210d14613019578063390775371461291c5780634c5ef0ed146128d557806362ddd3c41461284e5780637437ff9f1461280057806379ba5097146127395780638926f54f146126f35780638c6894fb146126a25780638da5cb5b1461266e5780639a4575b91461215a578063a42a7b8b14611ff3578063acfecf9114611efb578063ae39a25714611d70578063b6cfa3b714611cb5578063b794658014611c7d578063bfeffd3f14611bd1578063c4bffe2b14611aa6578063c7230a60146117f5578063dc04fa1f14611371578063dc0bd97114611320578063dcbd41bc1461111c578063e8a1da1714610a44578063ea6396db14610906578063ec6ae7a7146108c3578063f2fde38b146107f45763fbc801a7146101a257600080fd5b34610668576060600319360112610668576004359067ffffffffffffffff8211610668578160040160a060031984360301126107f0576101e0613ac1565b9160443567ffffffffffffffff81116107f0579061020661022393923690600401613bec565b93906102106145a9565b5061021b86856151c4565b943691613d66565b93608486019461023286614536565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116036107a657602487019677ffffffffffffffff0000000000000000000000000000000061029889614557565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610719578591610777575b5061074f5767ffffffffffffffff61032c89614557565b16610344816000526007602052604060002054151590565b1561072457602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156107195785906106c8575b73ffffffffffffffffffffffffffffffffffffffff915016330361069c576064810135946103d38787613f4d565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561067a5761042f907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614a41565b61044b8161043c8b614536565b6104458d614557565b906154ac565b73ffffffffffffffffffffffffffffffffffffffff600354169384610549575b61053f8a61050e6105098e6104808e8e613f4d565b936104938561048e84614557565b614e7a565b7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff6104cf6104c985614557565b93614536565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252336020830152810188905292169180606081015b0390a2614557565b61471a565b90610517614f59565b6040519261052484613cd1565b83526020830152604051928392604084526040840190613e2e565b9060208301520390f35b843b15610676578694928a949286928d604051998a98899788967fa8027c0f00000000000000000000000000000000000000000000000000000000885260048801608090528061059891615416565b6084890160a090526101248901906105af92613f7b565b936105b990613bd7565b67ffffffffffffffff1660a48801526044016105d490613b88565b73ffffffffffffffffffffffffffffffffffffffff1660c48701528d60e48701526105fe90613b88565b73ffffffffffffffffffffffffffffffffffffffff16610104860152602485015283810360031901604485015261063491613c1a565b90606483015203925af1801561066b57610653575b808080808061046b565b61065e828092613d25565b6106685780610649565b80fd5b6040513d84823e3d90fd5b8680fd5b50610697816106888b614536565b6106918d614557565b90615466565b61044b565b6024847f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d602011610711575b816106e260209383613d25565b8101031261070d5761070873ffffffffffffffffffffffffffffffffffffffff91613f5a565b6103a5565b8480fd5b3d91506106d5565b6040513d87823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008552600452602484fd5b6004847f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b610799915060203d60201161079f575b6107918183613d25565b810190614bad565b38610315565b503d610787565b60248373ffffffffffffffffffffffffffffffffffffffff6107c789614536565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b5080fd5b50346106685760206003193601126106685773ffffffffffffffffffffffffffffffffffffffff610823613b1f565b61082b614bc5565b1633811461089b57807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b503461066857806003193601126106685760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b503461066857608060031936011261066857610920613b1f565b50610929613ba9565b610931613af0565b5060643567ffffffffffffffff8111610a40579167ffffffffffffffff60409261096160e0953690600401613bec565b50508260c0855161097181613d09565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b60205220604051906109a982613d09565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346106685760406003193601126106685760043567ffffffffffffffff81116107f057610a76903690600401613e58565b9060243567ffffffffffffffff81116111185790610a9984923690600401613e58565b939091610aa4614bc5565b83905b828210610f595750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015610f55578060051b8301358581121561070d5783016101208136031261070d5760405194610b0b86613ced565b610b1482613bd7565b8652602082013567ffffffffffffffff81116107f05782019436601f870112156107f057853595610b4487613eba565b96610b526040519889613d25565b80885260208089019160051b8301019036821161070d5760208301905b828210610f26575050505060208701958652604083013567ffffffffffffffff8111610a4057610ba29036908501613dcb565b9160408801928352610bcc610bba36606087016147c6565b9460608a0195865260c03691016147c6565b956080890196875283515115610efe57610bf067ffffffffffffffff8a5116615849565b15610ec75767ffffffffffffffff8951168252600860205260408220610c17865182614f94565b610c25885160028301614f94565b6004855191019080519067ffffffffffffffff8211610e9a57610c488354614605565b601f8111610e5f575b50602090601f8311600114610dc057610c9f9291869183610db5575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b90555b815b88518051821015610cd95790610cd3600192610ccc8367ffffffffffffffff8f5116926145c2565b5190614c10565b01610ca4565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610da767ffffffffffffffff6001979694985116925193519151610d73610d3e60405196879687526101006020880152610100870190613c1a565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610ada565b015190508e80610c6d565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610e475750908460019594939210610e10575b505050811b019055610ca2565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558d8080610e03565b92936020600181928786015181550195019301610ded565b610e8a9084875260208720601f850160051c81019160208610610e90575b601f0160051c0190614862565b8d610c51565b9091508190610e7d565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff811161067657602091610f4a8392833691890101613dcb565b815201910190610b6f565b8380f35b9267ffffffffffffffff610f7b610f768486889a9699979a614799565b614557565b1691610f868361557f565b156110ec578284526008602052610fa26005604086200161551c565b94845b8651811015610fdb576001908587526008602052610fd460056040892001610fcd838b6145c2565b5190615715565b5001610fa5565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110178154614605565b806110ab575b505050018054908881558161108d575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610aa7565b885260208820908101905b8181101561102d57888155600101611098565b601f81116001146110c15750555b888a8061101d565b818352602083206110dc91601f01861c810190600101614862565b80825281602081209155556110b9565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b8380fd5b50346106685760206003193601126106685760043567ffffffffffffffff81116107f05761114e903690600401613e89565b73ffffffffffffffffffffffffffffffffffffffff600a5416331415806112fe575b6112d257825b818110611181578380f35b61118c81838561473c565b67ffffffffffffffff61119e82614557565b16906111b7826000526007602052604060002054151590565b156112a657907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e083611266611240602060019897018b6111f88261474c565b1561126d57879052600460205261121f60408d2061121936604088016147c6565b90614f94565b868c52600560205261123b60408d206112193660a088016147c6565b61474c565b916040519215158352611259602084016040830161481e565b60a060808401910161481e565ba201611176565b60026040828a61123b9452600860205261128f82822061121936858c016147c6565b8a8152600860205220016112193660a088016147c6565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff60015416331415611170565b5034610668578060031936011261066857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106685760406003193601126106685760043567ffffffffffffffff81116107f0576113a3903690600401613e89565b60243567ffffffffffffffff8111611118576113c3903690600401613e58565b9190926113ce614bc5565b845b82811061143a57505050825b8181106113e7578380f35b8067ffffffffffffffff611401610f766001948688614799565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a2016113dc565b67ffffffffffffffff611451610f7683868661473c565b16611469816000526007602052604060002054151590565b156117ca5761147982858561473c565b602081019060e081019061148c8261474c565b1561179e5760a0810161271061ffff6114a483614759565b16101561178f5760c082019161271061ffff6114bf85614759565b1610156117575763ffffffff6114d486614768565b161561172b57858c52600b60205260408c206114ef86614768565b63ffffffff1690805490604084019161150783614768565b60201b67ffffffff000000001693606086019461152386614768565b60401b6bffffffff000000000000000016966080019661154288614768565b60601b6fffffffff00000000000000000000000016916115618a614759565b60801b71ffff0000000000000000000000000000000016936115828c614759565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556116358761474c565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661168690614779565b63ffffffff16875261169790614779565b63ffffffff1660208701526116ab90614779565b63ffffffff1660408601526116bf90614779565b63ffffffff1660608501526116d39061478a565b61ffff1660808401526116e59061478a565b61ffff1660a08301526116f790613c79565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a26001016113d0565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61176686614759565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff611766602493614759565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346106685760406003193601126106685760043567ffffffffffffffff81116107f057611827903690600401613e58565b90611830613b65565b9173ffffffffffffffffffffffffffffffffffffffff6001541633141580611a84575b611a585773ffffffffffffffffffffffffffffffffffffffff8316908115611a3057845b818110611882578580f35b73ffffffffffffffffffffffffffffffffffffffff6118aa6118a5838588614799565b614536565b166040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa908115611a255788916119f2575b50806118ff575b5050600101611877565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff8a16602484015260448084018590528352918a9190611960606482613d25565b519082865af1156119e75787513d6119de5750813b155b6119b25790847f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e602060019594604051908152a390386118f5565b602488837f5274afe7000000000000000000000000000000000000000000000000000000008252600452fd5b60011415611977565b6040513d89823e3d90fd5b905060203d8111611a1e575b611a088183613d25565b60208260009281010312610668575051386118ee565b503d6119fe565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b5073ffffffffffffffffffffffffffffffffffffffff600c5416331415611853565b5034610668578060031936011261066857604051906006548083528260208101600684526020842092845b818110611bb8575050611ae692500383613d25565b8151611b0a611af482613eba565b91611b026040519384613d25565b808352613eba565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611b69578067ffffffffffffffff611b56600193886145c2565b5116611b6282866145c2565b5201611b37565b50925090604051928392602084019060208552518091526040840192915b818110611b95575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611b87565b8454835260019485019487945060209093019201611ad1565b50346106685760206003193601126106685760043573ffffffffffffffffffffffffffffffffffffffff81168091036107f057611c0c614bc5565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d5812096040805173ffffffffffffffffffffffffffffffffffffffff84168152856020820152a1161760035580f35b503461066857602060031936011261066857611cb1611c9d610509613bc0565b604051918291602083526020830190613c1a565b0390f35b5034610668576020600319360112610668577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611cf2613a8d565b611cfa614bc5565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b503461066857606060031936011261066857611d8a613b1f565b90611d93613b65565b6044359273ffffffffffffffffffffffffffffffffffffffff841680850361111857611dbd614bc5565b73ffffffffffffffffffffffffffffffffffffffff82168015611ed35794611ecd917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025573ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c556040519384938491604091949373ffffffffffffffffffffffffffffffffffffffff809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346106685767ffffffffffffffff611f1336613de9565b929091611f1e614bc5565b1691611f37836000526007602052604060002054151590565b156110ec578284526008602052611f6660056040862001611f59368486613d66565b6020815191012090615715565b15611fab57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691611fa5604051928392602084526020840191613f7b565b0390a280f35b82611fef836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613f7b565b0390fd5b50346106685760206003193601126106685767ffffffffffffffff612016613bc0565b168152600860205261202d6005604083200161551c565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061207261205c83613eba565b9261206a6040519485613d25565b808452613eba565b01835b818110612149575050825b82518110156120c65780612096600192856145c2565b51855260096020526120aa60408620614658565b6120b482856145c2565b526120bf81846145c2565b5001612080565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b8282106120fe57505050500390f35b91936020612139827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613c1a565b96019201920185949391926120ef565b806060602080938601015201612075565b50346106685760206003193601126106685760043567ffffffffffffffff81116107f057806004019060a06003198236030112610a40576121996145a9565b506040516020936121aa8583613d25565b80825260848301916121bb83614536565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361264d57602484019477ffffffffffffffff0000000000000000000000000000000061222187614557565b60801b16604051907f2cbc26bb0000000000000000000000000000000000000000000000000000000082526004820152878160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156125d2578491612630575b506126085767ffffffffffffffff6122b487614557565b166122cc816000526007602052604060002054151590565b156125dd578773ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156125d257849061258a575b73ffffffffffffffffffffffffffffffffffffffff915016330361255e576064850135946123668661235d87614536565b6106918a614557565b73ffffffffffffffffffffffffffffffffffffffff600354169182612443575b886124136105098a8a7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8c6123c78461048e87614557565b6105016123dc6123d687614557565b92614536565b6040805173ffffffffffffffffffffffffffffffffffffffff90921682523360208301528101959095529116929081906060820190565b9061241c614f59565b6040519261242984613cd1565b835281830152611cb1604051928284938452830190613e2e565b823b1561070d57918791858094604051968795869485937fa8027c0f00000000000000000000000000000000000000000000000000000000855260048501608090528061248f91615416565b6084860160a090526101248601906124a692613f7b565b916124b090613bd7565b67ffffffffffffffff1660a48501526044016124cb90613b88565b73ffffffffffffffffffffffffffffffffffffffff1660c48401528b60e48401526124f58b613b88565b73ffffffffffffffffffffffffffffffffffffffff1661010484015283602484015282810360031901604484015261252c91613c1a565b8a606483015203925af1801561066b57612549575b808080612386565b612554828092613d25565b6106685780612541565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d83116125cb575b6125a08183613d25565b81010312611118576125c673ffffffffffffffffffffffffffffffffffffffff91613f5a565b61232c565b503d612596565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6126479150883d8a1161079f576107918183613d25565b3861229d565b5073ffffffffffffffffffffffffffffffffffffffff6107c7602493614536565b5034610668578060031936011261066857602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b5034610668578060031936011261066857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461066857602060031936011261066857602061272f67ffffffffffffffff61271b613bc0565b166000526007602052604060002054151590565b6040519015158152f35b5034610668578060031936011261066857805473ffffffffffffffffffffffffffffffffffffffff811633036127d8577fffffffffffffffffffffffff000000000000000000000000000000000000000060015491338284161760015516825573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b5034610668578060031936011261066857600254600a54600c546040805173ffffffffffffffffffffffffffffffffffffffff94851681529284166020840152921691810191909152606090f35b50346106685761285d36613de9565b61286993929193614bc5565b67ffffffffffffffff821661288b816000526007602052604060002054151590565b156128aa57506128a792936128a1913691613d66565b90614c10565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b5034610668576040600319360112610668576128ef613bc0565b906024359067ffffffffffffffff821161066857602061272f846129163660048701613dcb565b9061456c565b5034610668576020600319360112610668576004359067ffffffffffffffff82116106685781600401906101006003198436030112610668578060405161296281613c86565b528060405161297081613c86565b52606483013560c48401936129a061299a61299561298e88886144e5565b3691613d66565b614879565b83614934565b9360848201956129af87614536565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000000000000000000000000000000000000000000016911603612ff857602483019377ffffffffffffffff00000000000000000000000000000000612a1586614557565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156119e7578791612fd9575b50612fb15767ffffffffffffffff612aa986614557565b16612ac1816000526007602052604060002054151590565b15612f8657602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156119e7578791612f67575b5015612f3b57612b3885614557565b92612b4e60a486019461291661298e87856144e5565b15612ef457612b6f88612b608b614536565b612b6989614557565b9061532d565b73ffffffffffffffffffffffffffffffffffffffff600354169283612d22575b505050505060440191612ba183614536565b612baa83614557565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b1561111857608484928367ffffffffffffffff9373ffffffffffffffffffffffffffffffffffffffff60405197889687957f74fd18ac000000000000000000000000000000000000000000000000000000008752837f00000000000000000000000000000000000000000000000000000000000000001660048801521660248601528c60448601521660648401525af1801561066b57612d0d575b5050608067ffffffffffffffff60209573ffffffffffffffffffffffffffffffffffffffff612cd9612cd36104c97ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc097614557565b96614536565b816040519716875233898801521660408601528560608601521692a260405190612d0282613c86565b815260405190518152f35b612d18828092613d25565b6106685780612c7e565b833b15612ef057878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612d728780615416565b60648a0161010090526101648a0190612d8a92613f7b565b94612d9490613bd7565b67ffffffffffffffff166084890152604401612daf90613b88565b73ffffffffffffffffffffffffffffffffffffffff1660a488015260c4870152612dd890613b88565b73ffffffffffffffffffffffffffffffffffffffff1660e4860152612dfd9084615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612e329291613f7b565b90612e3d9083615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612e729291613f7b565b9060e48a01612e8091615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612eb59291613f7b565b8b602483015282604483015203925af180156125d257908491612edb575b808080612b8f565b81612ee591613d25565b610a40578238612ed3565b8780fd5b83612efe916144e5565b611fef6040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613f7b565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b612f80915060203d60201161079f576107918183613d25565b38612b29565b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612ff2915060203d60201161079f576107918183613d25565b38612a92565b60248573ffffffffffffffffffffffffffffffffffffffff6107c78a614536565b5034610668578060031936011261066857602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b5034610668576040600319360112610668576004359067ffffffffffffffff821161066857816004019061010060031984360301126106685761308e613ac1565b918160405161309c81613c86565b5260648401359360c48101936130c16130bb61299561298e88876144e5565b87614934565b9460848301966130d088614536565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001691160361359f57602484019477ffffffffffffffff0000000000000000000000000000000061313687614557565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a25578891613580575b506135585767ffffffffffffffff6131ca87614557565b166131e2816000526007602052604060002054151590565b1561352d57602073ffffffffffffffffffffffffffffffffffffffff60025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611a2557889161350e575b50156134e25761325986614557565b9361326f60a487019561291661298e88866144e5565b156134d8577fffffffff00000000000000000000000000000000000000000000000000000000169081156134bd576132b9896132aa8c614536565b6132b38a614557565b906153a6565b73ffffffffffffffffffffffffffffffffffffffff6003541693846132ec575b50505050505060440191612ba183614536565b843b156134b957868995938c959387938b6040519a8b998a9889977f63711574000000000000000000000000000000000000000000000000000000008952600489016060905261333c8780615416565b60648b0161010090526101648b019061335492613f7b565b9461335e90613bd7565b67ffffffffffffffff1660848a015260440161337990613b88565b73ffffffffffffffffffffffffffffffffffffffff1660a489015260c48801526133a290613b88565b73ffffffffffffffffffffffffffffffffffffffff1660e48701526133c79084615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526133fc9291613f7b565b906134079083615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c8684030161012487015261343c9291613f7b565b9060e48b0161344a91615416565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c8584030161014486015261347f9291613f7b565b908c6024840152604483015203925af180156125d2576134a4575b80808080806132d9565b926134b28160449395613d25565b929061349a565b8880fd5b6134d3896134ca8c614536565b612b698a614557565b6132b9565b612efe85836144e5565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b613527915060203d60201161079f576107918183613d25565b3861324a565b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b613599915060203d60201161079f576107918183613d25565b386131b3565b60248673ffffffffffffffffffffffffffffffffffffffff6107c78b614536565b5034610668578060031936011261066857602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461066857604060031936011261066857613618613bc0565b602435918215158303610668576101406136db6136358585614462565b61368b60409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b5034610668576020600319360112610668576020906136fa613b1f565b905073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b5034610668578060031936011261066857602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106685760c0600319360112610668576137ac613b1f565b506137b5613ba9565b6137bd613b42565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036106685760a4359067ffffffffffffffff82116106685760a063ffffffff8061ffff613822888861381b3660048b01613bec565b50506142b2565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b503461066857806003193601126106685750611cb160405161386c604082613d25565b601a81527f4c6f636b52656c65617365546f6b656e506f6f6c20322e302e300000000000006020820152604051918291602083526020830190613c1a565b50346106685760c0600319360112610668576138c4613b1f565b6138cc613ba9565b906064357fffffffff00000000000000000000000000000000000000000000000000000000811681036111185760843567ffffffffffffffff811161070d57613919903690600401613bec565b9160a435936002851015610676576139349560443591613fba565b90604051918291602083016020845282518091526020604085019301915b818110613960575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101613952565b9050346107f05760206003193601126107f0576020907fffffffff000000000000000000000000000000000000000000000000000000006139ce613a8d565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613a63575b8115613a39575b8115613a0f575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613a08565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613a01565b7f940a154200000000000000000000000000000000000000000000000000000000811491506139fa565b600435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613abc57565b600080fd5b602435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613abc57565b604435907fffffffff0000000000000000000000000000000000000000000000000000000082168203613abc57565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203613abc57565b6064359073ffffffffffffffffffffffffffffffffffffffff82168203613abc57565b6024359073ffffffffffffffffffffffffffffffffffffffff82168203613abc57565b359073ffffffffffffffffffffffffffffffffffffffff82168203613abc57565b6024359067ffffffffffffffff82168203613abc57565b6004359067ffffffffffffffff82168203613abc57565b359067ffffffffffffffff82168203613abc57565b9181601f84011215613abc5782359167ffffffffffffffff8311613abc5760208381860195010111613abc57565b919082519283825260005b848110613c645750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b80602080928401015182828601015201613c25565b35908115158203613abc57565b6020810190811067ffffffffffffffff821117613ca257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613ca257604052565b60a0810190811067ffffffffffffffff821117613ca257604052565b60e0810190811067ffffffffffffffff821117613ca257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117613ca257604052565b92919267ffffffffffffffff8211613ca25760405191613dae601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200184613d25565b829481845281830111613abc578281602093846000960137010152565b9080601f83011215613abc57816020613de693359101613d66565b90565b906040600319830112613abc5760043567ffffffffffffffff81168103613abc57916024359067ffffffffffffffff8211613abc57613e2a91600401613bec565b9091565b613de6916020613e478351604084526040840190613c1a565b920151906020818403910152613c1a565b9181601f84011215613abc5782359167ffffffffffffffff8311613abc576020808501948460051b010111613abc57565b9181601f84011215613abc5782359167ffffffffffffffff8311613abc576020808501948460081b010111613abc57565b67ffffffffffffffff8111613ca25760051b60200190565b81810292918115918404141715613ee557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613f1e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613ee557565b519073ffffffffffffffffffffffffffffffffffffffff82168203613abc57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92959390919473ffffffffffffffffffffffffffffffffffffffff6003541695861561429057809760028710156142615773ffffffffffffffffffffffffffffffffffffffff9861411b957fffffffff0000000000000000000000000000000000000000000000000000000093896142375767ffffffffffffffff8216600052600b6020526040600020906040519161405283613d09565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c16151591829101526141e3575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613f7b565b928180600095869560a483015203915afa9182156141d657819261413e57505090565b9091503d8083833e6141508183613d25565b810190602081830312610a405780519067ffffffffffffffff8211611118570181601f82011215610a405780519061418782613eba565b936141956040519586613d25565b82855260208086019360051b8301019384116106685750602001905b8282106141be5750505090565b602080916141cb84613f5a565b8152019101906141b1565b50604051903d90823e3d90fd5b92935067ffffffffffffffff928587161561421f575061271061420e61ffff61421594511683613ed2565b0490613f4d565b915b9038806140bc565b614231925061420e6127109183613ed2565b91614217565b67ffffffffffffffff91925061425b9061425561299536898b613d66565b90614934565b916140ca565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516142a6602082613d25565b60008152600036813790565b67ffffffffffffffff909291926142f07fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614a41565b16600052600b60205260406000206040519061430b82613d09565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526143b8577fffffffff00000000000000000000000000000000000000000000000000000000166143ad57505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b604051906143de82613ced565b60006080838281528260208201528260408201528260608201520152565b9060405161440981613ced565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff916144746143d1565b5061447d6143d1565b506144b157166000526008602052604060002090613de66144a560026144aa6144a5866143fc565b614b28565b94016143fc565b16908160005260046020526144cc6144a560406000206143fc565b916000526005602052613de66144a560406000206143fc565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215613abc570180359067ffffffffffffffff8211613abc57602001918136038313613abc57565b3573ffffffffffffffffffffffffffffffffffffffff81168103613abc5790565b3567ffffffffffffffff81168103613abc5790565b9067ffffffffffffffff613de692166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b604051906145b682613cd1565b60606020838281520152565b80518210156145d65760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c9216801561464e575b602083101461461f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691614614565b906040519182600082549261466c84614605565b80845293600181169081156146da5750600114614693575b5061469192500383613d25565b565b90506000929192526020600020906000915b8183106146be5750509060206146919282010138614684565b60209193508060019154838589010152019101909184926146a5565b602093506146919592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138614684565b67ffffffffffffffff166000526008602052613de66004604060002001614658565b91908110156145d65760081b0190565b358015158103613abc5790565b3561ffff81168103613abc5790565b3563ffffffff81168103613abc5790565b359063ffffffff82168203613abc57565b359061ffff82168203613abc57565b91908110156145d65760051b0190565b35906fffffffffffffffffffffffffffffffff82168203613abc57565b9190826060910312613abc576040516060810181811067ffffffffffffffff821117613ca257604052604061481981839561480081613c79565b855261480e602082016147a9565b6020860152016147a9565b910152565b6fffffffffffffffffffffffffffffffff61485c6040809361483f81613c79565b1515865283614850602083016147a9565b166020870152016147a9565b16910152565b81811061486d575050565b60008155600101614862565b805180156148e9576020036148ab578051602082810191830183900312613abc57519060ff82116148ab575060ff1690565b611fef906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613c1a565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613ee557565b60ff16604d8111613ee557600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614a3a57828411614a1057906149799161490f565b91604d60ff84161180156149d7575b6149a15750509061499b613de692614923565b90613ed2565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b506149e183614923565b8015613f1e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048411614988565b614a199161490f565b91604d60ff8416116149a157505090614a34613de692614923565b90613f14565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614b2357614a7481615252565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614b235761ffff8360e01c168015918215614b12575b5050614abe575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614ab4565b505050565b614b306143d1565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614b8d6020850193614b87614b7a63ffffffff87511642613f4d565b8560808901511690613ed2565b90615245565b80821015614ba657505b16825263ffffffff4216905290565b9050614b97565b90816020910312613abc57518015158103613abc5790565b73ffffffffffffffffffffffffffffffffffffffff600154163303614be657565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614e505767ffffffffffffffff81516020830120921691826000526008602052614c458160056040600020016158a9565b15614e0c5760005260096020526040600020815167ffffffffffffffff8111613ca257614c728254614605565b601f8111614dda575b506020601f8211600114614d145791614cee827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614d0495600091614d09575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055604051918291602083526020830190613c1a565b0390a2565b905084015138614cbd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b818110614dc2575092614d049492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614d8b575b5050811b019055611c9d565b8501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880614d7f565b9192602060018192868a015181550194019201614d44565b614e0690836000526020600020601f840160051c81019160208510610e9057601f0160051c0190614862565b38614c7b565b5090611fef6040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613c1a565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15613abc5767ffffffffffffffff906064604051809481937fa36a7fee0000000000000000000000000000000000000000000000000000000083526000978896879373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016600487015216602485015260448401525af1801561066b57614f4c575050565b81614f5691613d25565b50565b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613de6604082613d25565b815191929115615116576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff602085015116106150b35761469191925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615114604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604084015116158015906151a5575b615144576146919192614fd7565b606483615114604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615136565b906127109167ffffffffffffffff6151de60208301614557565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561522f57606061ffff61522b935460901c16910135613ed2565b0490565b606061ffff61522b935460801c16910135613ed2565b91908201809211613ee557565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115615329577dffff000000000000000000000000000000000000000000000000000000008116156153205760ff60015b169060f01c806152ea575b506001036152bd5750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b601081106152fb57506152b2565b6001811b821661530e575b6001016152ed565b9160018101809111613ee55791615306565b60ff60006152a7565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c921692836000526008602052615376818360026040600020016158fe565b6040805173ffffffffffffffffffffffffffffffffffffffff909216825260208201929092529081908101614d04565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c161561540b5750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f991836000526005602052615376818360406000206158fe565b90614691935061532d565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215613abc57016020813591019167ffffffffffffffff8211613abc578136038313613abc57565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da8178944921692836000526008602052615376818360406000206158fe565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c16156155115750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e91836000526004602052615376818360406000206158fe565b906146919350615466565b906040519182815491828252602082019060005260206000209260005b81811061554e57505061469192500383613d25565b8454835260019485019487945060209093019201615539565b80548210156145d65760005260206000200190600090565b600081815260076020526040902054801561570e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613ee557600654907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613ee55781810361569f575b5050506006548015615670577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0161562d816006615567565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6156f66156b06156c1936006615567565b90549060031b1c9283926006615567565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560005260076020526040600020553880806155f4565b5050600090565b9060018201918160005282602052604060002054801515600014615840577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101818111613ee5578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211613ee557818103615809575b50505080548015615670577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906157ca8282615567565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b191690555560005260205260006040812055600190565b6158296158196156c19386615567565b90549060031b1c92839286615567565b905560005283602052604060002055388080615792565b50505050600090565b806000526007602052604060002054156000146158a35760065468010000000000000000811015613ca25761588a6156c18260018594016006556006615567565b9055600654906000526007602052604060002055600190565b50600090565b600082815260018201602052604090205461570e5780549068010000000000000000821015613ca257826158e76156c1846001809601855584615567565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615bb2575b615bac576fffffffffffffffffffffffffffffffff8216916001850190815461595663ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613f4d565b9081615b0e575b5050848110615ac257508383106159b757505061598c6fffffffffffffffffffffffffffffffff928392613f4d565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c928315615a5657816159cf91613f4d565b927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211613ee557615a1d615a229273ffffffffffffffffffffffffffffffffffffffff96615245565b613f14565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b73ffffffffffffffffffffffffffffffffffffffff83837fd0c8d23a000000000000000000000000000000000000000000000000000000006000527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6004526024521660445260646000fd5b828573ffffffffffffffffffffffffffffffffffffffff927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615b8257615b2992614b879160801c90613ed2565b80841015615b7d5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff000000000000000000000000000000001617865592388061595d565b615b34565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b50821561591156fea164736f6c634300081a000a" - -type LockReleaseTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewLockReleaseTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*LockReleaseTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(LockReleaseTokenPoolABI)) - if err != nil { - return nil, err - } - return &LockReleaseTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *LockReleaseTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *LockReleaseTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *LockReleaseTokenPoolContract) GetLockBox(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getLockBox") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address - LockBox common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + LockBox common.Address `json:"lockBox"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "lock-release-token-pool:deploy", - Version: Version, - Description: "Deploys the LockReleaseTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: LockReleaseTokenPoolABI, - Bin: LockReleaseTokenPoolBin, - }, + Name: "lock-release-token-pool:deploy", + Version: Version, + Description: "Deploys the LockReleaseTokenPool contract", + ContractMetadata: gobindings.LockReleaseTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(LockReleaseTokenPoolBin), + EVM: common.FromHex(gobindings.LockReleaseTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetLockBox = contract.NewRead(contract.ReadParams[struct{}, common.Address, *LockReleaseTokenPoolContract]{ - Name: "lock-release-token-pool:get-lock-box", - Version: Version, - Description: "Calls getLockBox on the contract", - ContractType: ContractType, - NewContract: NewLockReleaseTokenPoolContract, - CallContract: func(c *LockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetLockBox(opts) - }, -}) +func NewReadGetLockBox(c gobindings.LockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.LockReleaseTokenPoolInterface]{ + Name: "lock-release-token-pool:get-lock-box", + Version: Version, + Description: "Calls getLockBox on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetLockBox(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/lombard_token_pool/lombard_token_pool.go b/chains/evm/deployment/v2_0_0/operations/lombard_token_pool/lombard_token_pool.go index 5a13cdb614..0e7cead25f 100644 --- a/chains/evm/deployment/v2_0_0/operations/lombard_token_pool/lombard_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/lombard_token_pool/lombard_token_pool.go @@ -3,141 +3,82 @@ package lombard_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lombard_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "LombardTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const LombardTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20Metadata"},{"name":"verifier","type":"address","internalType":"address"},{"name":"bridge","type":"address","internalType":"contract IBridgeV2"},{"name":"adapter","type":"address","internalType":"address"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"fallbackDecimals","type":"uint8","internalType":"uint8"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getLombardConfig","inputs":[],"outputs":[{"name":"verifierResolver","type":"address","internalType":"address"},{"name":"bridge","type":"address","internalType":"address"},{"name":"tokenAdapter","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getPath","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct LombardTokenPool.Path","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"lChainId","type":"bytes32","internalType":"bytes32"},{"name":"remoteAdapter","type":"bytes32","internalType":"bytes32"}]}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"},{"name":"","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"i_bridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IBridgeV2"}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOut","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"lockOrBurnOut","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removePath","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setPath","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lChainId","type":"bytes32","internalType":"bytes32"},{"name":"allowedCaller","type":"bytes","internalType":"bytes"},{"name":"remoteAdapter","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LombardConfigurationSet","inputs":[{"name":"verifier","type":"address","indexed":true,"internalType":"address"},{"name":"bridge","type":"address","indexed":true,"internalType":"address"},{"name":"tokenAdapter","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PathRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"lChainId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"allowedCaller","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"remoteAdapter","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"PathSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"lChainId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"allowedCaller","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"remoteAdapter","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotSupported","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"ExecutionError","inputs":[]},{"type":"error","name":"HashMismatch","inputs":[]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidMessageVersion","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"received","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidReceiver","inputs":[{"name":"receiver","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OutboundImplementationNotFoundForVerifier","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PathNotExist","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RemoteTokenOrAdapterMismatch","inputs":[{"name":"bridgeToken","type":"bytes32","internalType":"bytes32"},{"name":"remoteToken","type":"bytes32","internalType":"bytes32"},{"name":"remoteAdapter","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroBridge","inputs":[]},{"type":"error","name":"ZeroLombardChainId","inputs":[]},{"type":"error","name":"ZeroVerifierNotAllowed","inputs":[]}]` -const LombardTokenPoolBin = "0x6101408060405234610301576101008161646180380380916100218285610401565b8339810103126103015780516001600160a01b038116918282036103015761004b6020820161043a565b6040820151936001600160a01b03851692909190838603610301576100726060820161043a565b9461007f6080830161043a565b906100ae61008f60a0850161043a565b916100a860e06100a160c0880161043a565b960161044e565b9061045c565b9033156103f057600180546001600160a01b03191633179055851580156103df575b80156103ce575b6103bd578560805260c05230850361032b575b60a052600380546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055821561031a5760405163353c26b760e01b8152602081600481875afa801561030e576000906102cf575b60ff915016600281036102b657506001600160a01b0381169485156102a55760e052610100526101208390526001600160a01b03831692828415610295575061018e916104d2565b604051927f01d5dd7f15328f4241da3a1d9c7b310ae9ac14e8ca441203a7b6f71c7da0c49d600080a4615e7690816105eb82396080518181816102eb01528181610344015281816122b00152818161265e0152818161280201528181612caa01528181612fff015281816135b301528181613c7b0152613cc8015260a0518181816105ba01528181613b4e01528181614f570152614fda015260c0518181816103cd015281816114610152818161233d01528181612d380152613641015260e0518181816111ff015281816124bd01528181612b520152612ee301526101005181818161029b015281816111da0152613e8b01526101205181818161122701526124830152f35b90506102a0916104d2565b61018e565b639533e8c360e01b60005260046000fd5b63398bbe0560e11b600052600260045260245260446000fd5b506020813d602011610306575b816102e960209383610401565b81010312610301576102fc60ff9161044e565b610146565b600080fd5b3d91506102dc565b6040513d6000823e3d90fd5b63361106cd60e01b60005260046000fd5b60405163313ce56760e01b8152602081600481895afa60009181610381575b50610356575b506100ea565b60ff1660ff821681810361036a5750610350565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116103b5575b8161039d60209383610401565b81010312610301576103ae9061044e565b903861034a565b3d9150610390565b630a64406560e11b60005260046000fd5b506001600160a01b038116156100d7565b506001600160a01b038416156100d0565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761042457604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361030157565b519060ff8216820361030157565b60405163313ce56760e01b815290602090829060049082906001600160a01b03165afa60009181610496575b50610491575090565b905090565b9091506020813d6020116104ca575b816104b260209383610401565b81010312610301576104c39061044e565b9038610488565b3d91506104a5565b60405190602060008184019463095ea7b360e01b865260018060a01b031694856024860152811960448601526044855261050d606486610401565b84519082855af16000513d8261056a575b50501561052a57505050565b610563610568936040519063095ea7b360e01b60208301526024820152600060448201526044815261055d606482610401565b8261058f565b61058f565b565b90915061058757506001600160a01b0381163b15155b388061051e565b600114610580565b906000602091828151910182855af11561030e576000513d6105e157506001600160a01b0381163b155b6105c05750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b600114156105b956fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461414d575080630606699c14613f3557806306b859ef14613e04578063181f5a7714613da35780631826b1e714613cec57806321df0da714613ca8578063240028e814613c515780632422ac4514613b7257806324f65ee714613b345780632cab0fb61461352257806337a3210d146134fb57806338ff8c38146134745780633907753714612c445780634c5ef0ed14612bfd57806362ddd3c414612b76578063708e1f7914612b325780637437ff9f14612af157806379ba509714612a445780638926f54f146129fe5780638da5cb5b146129d75780639a4575b9146122445780639c893fe91461215d578063a42a7b8b14611ff6578063acfecf9114611ee0578063ae39a25714611d89578063b6cfa3b714611cce578063b794658014611c9a578063bfeffd3f14611c08578063c4bffe2b14611add578063c7230a6014611909578063dc04fa1f14611485578063dc0bd97114611441578063dcbd41bc14611257578063dd65bdb1146111bb578063e8a1da1714610b17578063ea6396db146109dd578063ec6ae7a71461099a578063f2fde38b146108e55763fbc801a7146101ce57600080fd5b34610725576060600319360112610725576004359067ffffffffffffffff821161072557816004019060a060031984360301126107255761020d6142a9565b60443567ffffffffffffffff81116108e15761022d90369060040161434a565b929091610238614a6e565b506024860195610247876149f0565b9367ffffffffffffffff604051957f958021a7000000000000000000000000000000000000000000000000000000008752166004860152604060248601528360448601526020856064816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9485156108d65784956108b5575b506001600160a01b0385161561088d5761032a9061030f606484013580977f0000000000000000000000000000000000000000000000000000000000000000615524565b610317614a6e565b506103228489615b8f565b963691614577565b906084810196610339886149dc565b6001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116036108505777ffffffffffffffff0000000000000000000000000000000061038d8a6149f0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107b4578691610812575b506107ea5767ffffffffffffffff6104148a6149f0565b1661042c816000526007602052604060002054151590565b156107bf5760206001600160a01b0360025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa9081156107b457906001600160a01b03918791610785575b501633036107595761049d8787614d6a565b7fffffffff000000000000000000000000000000000000000000000000000000008516948515610737576104f9907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614d77565b610515816105068b6149dc565b61050f8d6149f0565b9061584b565b6001600160a01b03600354169384610620575b6106168a6105b26105ad8e61053d8e8e614d6a565b93610547826149f0565b507ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61058461057e856149f0565b936149dc565b604080516001600160a01b039290921682523360208301528101889052921691606090a26149f0565b614b9c565b9060405160ff7f0000000000000000000000000000000000000000000000000000000000000000166020820152602081526105ee604082614489565b604051926105fb84614435565b83526020830152604051928392604084526040840190614611565b9060208301520390f35b843b15610733578694928a949286928d604051998a98899788967fa8027c0f00000000000000000000000000000000000000000000000000000000885260048801608090528061066f916157b5565b6084890160a090526101248901906106869261469d565b9361069090614335565b67ffffffffffffffff1660a48801526044016106ab906143ba565b6001600160a01b031660c48701528d60e48701526106c8906143ba565b6001600160a01b031661010486015260248501528381036003190160448501526106f191614527565b90606483015203925af1801561072857610710575b8080808080610528565b61071b828092614489565b6107255780610706565b80fd5b6040513d84823e3d90fd5b8680fd5b50610754816107458b6149dc565b61074e8d6149f0565b90615805565b610515565b6024857f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b6107a7915060203d6020116107ad575b61079f8183614489565b810190614a05565b3861048b565b503d610795565b6040513d88823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008652600452602485fd5b6004857f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011610848575b8161082d60209383614489565b810103126108445761083e90614a24565b386103fd565b8580fd5b3d9150610820565b6024856001600160a01b036108648b6149dc565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b6004847f7af97002000000000000000000000000000000000000000000000000000000008152fd5b6108cf91955060203d6020116107ad5761079f8183614489565b93386102cb565b6040513d86823e3d90fd5b8280fd5b5034610725576020600319360112610725576001600160a01b03610907614378565b61090f614d2c565b1633811461097257807fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b503461072557806003193601126107255760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b5034610725576080600319360112610725576109f7614378565b50610a0061431e565b610a086142d8565b5060643567ffffffffffffffff81116108e1579167ffffffffffffffff604092610a3860e095369060040161434a565b50508260c08551610a488161446d565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610a808261446d565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b50346107255760406003193601126107255760043567ffffffffffffffff8111610ff057610b4990369060040161463b565b9060243567ffffffffffffffff81116111b75790610b6c8492369060040161463b565b939091610b77614d2c565b83905b828210610ff85750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015610ff4578060051b83013585811215610fec57830161012081360312610fec5760405194610bde86614451565b610be782614335565b8652602082013567ffffffffffffffff8111610ff05782019436601f87011215610ff057853595610c17876146fd565b96610c256040519889614489565b80885260208089019160051b83010190368211610fec5760208301905b828210610fbd575050505060208701958652604083013567ffffffffffffffff81116108e157610c7590369085016145ae565b9160408801928352610c9f610c8d3660608701614c48565b9460608a0195865260c0369101614c48565b956080890196875283515115610f9557610cc367ffffffffffffffff8a5116615ada565b15610f5e5767ffffffffffffffff8951168252600860205260408220610cea8651826152f4565b610cf88851600283016152f4565b6004855191019080519067ffffffffffffffff8211610f3157610d1b8354614a87565b601f8111610ef6575b50602090601f8311600114610e7557610d549291869183610e6a575b50506000198260011b9260031b1c19161790565b90555b815b88518051821015610d8e5790610d88600192610d818367ffffffffffffffff8f511692614715565b51906150c6565b01610d59565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e5c67ffffffffffffffff6001979694985116925193519151610e28610df360405196879687526101006020880152610100870190614527565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610bad565b015190508e80610d40565b83865281862091907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08416875b818110610ede5750908460019594939210610ec5575b505050811b019055610d57565b015160001960f88460031b161c191690558d8080610eb8565b92936020600181928786015181550195019301610ea2565b610f219084875260208720601f850160051c81019160208610610f27575b601f0160051c0190614cd3565b8d610d24565b9091508190610f14565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff811161073357602091610fe183928336918901016145ae565b815201910190610c42565b8480fd5b5080fd5b8380f35b9267ffffffffffffffff61101a6110158486889a9699979a614c1b565b6149f0565b16916110258361591e565b1561118b578284526008602052611041600560408620016158bb565b94845b865181101561107a5760019085875260086020526110736005604089200161106c838b614715565b5190615a1e565b5001611044565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110b68154614a87565b8061114a575b505050018054908881558161112c575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610b7a565b885260208820908101905b818110156110cc57888155600101611137565b601f81116001146111605750555b888a806110bc565b8183526020832061117b91601f01861c810190600101614cd3565b8082528160208120915555611158565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b8380fd5b5034610725578060031936011261072557604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f00000000000000000000000000000000000000000000000000000000000000001691810191909152606090f35b0390f35b50346107255760206003193601126107255760043567ffffffffffffffff8111610ff05761128990369060040161466c565b6001600160a01b03600a54163314158061142c575b61140057825b8181106112af578380f35b6112ba818385614bbe565b67ffffffffffffffff6112cc826149f0565b16906112e5826000526007602052604060002054151590565b156113d457907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e08361139461136e602060019897018b61132682614bce565b1561139b57879052600460205261134d60408d206113473660408801614c48565b906152f4565b868c52600560205261136960408d206113473660a08801614c48565b614bce565b9160405192151583526113876020840160408301614c8f565b60a0608084019101614c8f565ba2016112a4565b60026040828a611369945260086020526113bd82822061134736858c01614c48565b8a8152600860205220016113473660a08801614c48565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b036001541633141561129e565b503461072557806003193601126107255760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346107255760406003193601126107255760043567ffffffffffffffff8111610ff0576114b790369060040161466c565b60243567ffffffffffffffff81116111b7576114d790369060040161463b565b9190926114e2614d2c565b845b82811061154e57505050825b8181106114fb578380f35b8067ffffffffffffffff6115156110156001948688614c1b565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a2016114f0565b67ffffffffffffffff611565611015838686614bbe565b1661157d816000526007602052604060002054151590565b156118de5761158d828585614bbe565b602081019060e08101906115a082614bce565b156118b25760a0810161271061ffff6115b883614bdb565b1610156118a35760c082019161271061ffff6115d385614bdb565b16101561186b5763ffffffff6115e886614bea565b161561183f57858c52600b60205260408c2061160386614bea565b63ffffffff1690805490604084019161161b83614bea565b60201b67ffffffff000000001693606086019461163786614bea565b60401b6bffffffff000000000000000016966080019661165688614bea565b60601b6fffffffff00000000000000000000000016916116758a614bdb565b60801b71ffff0000000000000000000000000000000016936116968c614bdb565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff16171717815561174987614bce565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661179a90614bfb565b63ffffffff1687526117ab90614bfb565b63ffffffff1660208701526117bf90614bfb565b63ffffffff1660408601526117d390614bfb565b63ffffffff1660608501526117e790614c0c565b61ffff1660808401526117f990614c0c565b61ffff1660a083015261180b9061456a565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a26001016114e4565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61187a86614bdb565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61187a602493614bdb565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346107255760406003193601126107255760043567ffffffffffffffff8111610ff05761193b90369060040161463b565b906119446143a4565b916001600160a01b036001541633141580611ac8575b611a9c576001600160a01b038316908115611a7457845b81811061197c578580f35b6001600160a01b03611997611992838588614c1b565b6149dc565b1690604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa8015611a695785908990611a2f575b60019450806119f1575b50505001611971565b602081611a207f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e938c87615524565b604051908152a33884816119e8565b5050909160203d8111611a62575b611a478183614489565b602082600092810103126107255750908460019392516119de565b503d611a3d565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b03600c541633141561195a565b5034610725578060031936011261072557604051906006548083528260208101600684526020842092845b818110611bef575050611b1d92500383614489565b8151611b41611b2b826146fd565b91611b396040519384614489565b8083526146fd565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0602083019301368437805b8451811015611ba0578067ffffffffffffffff611b8d60019388614715565b5116611b998286614715565b5201611b6e565b50925090604051928392602084019060208552518091526040840192915b818110611bcc575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611bbe565b8454835260019485019487945060209093019201611b08565b5034610725576020600319360112610725576004356001600160a01b038116809103610ff057611c36614d2c565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d581209604080516001600160a01b0384168152856020820152a1161760035580f35b503461072557602060031936011261072557611253611cba6105ad614307565b604051918291602083526020830190614527565b5034610725576020600319360112610725577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611d0b61424b565b611d13614d2c565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b503461072557606060031936011261072557611da3614378565b90611dac6143a4565b604435926001600160a01b0384168085036111b757611dc9614d2c565b6001600160a01b0382168015611eb85794611eb2917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556001600160a01b0385167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c55604051938493849160409194936001600160a01b03809281606087019816865216602085015216910152565b0390a180f35b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b503461072557611eef366145cc565b611ef7614d2c565b67ffffffffffffffff831692611f1a846000526007602052604060002054151590565b15611fca578385526008602052611f4960056040872001611f3c368587614577565b6020815191012090615a1e565b15611f8f5750907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691611f8960405192839260208452602084019161469d565b0390a280f35b90611fc6906040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485016146dc565b0390fd5b602485857f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346107255760206003193601126107255767ffffffffffffffff612019614307565b1681526008602052612030600560408320016158bb565b80517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061207561205f836146fd565b9261206d6040519485614489565b8084526146fd565b01835b81811061214c575050825b82518110156120c9578061209960019285614715565b51855260096020526120ad60408620614ada565b6120b78285614715565b526120c28184614715565b5001612083565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061210157505050500390f35b9193602061213c827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851614527565b96019201920185949391926120f2565b806060602080938601015201612078565b50346107255760206003193601126107255767ffffffffffffffff612180614307565b612188614d2c565b16808252600d6020526040822090604051916121a3836143ce565b8054908184526002600182015491602086019283520154916040850192835215612218577f465d9b27e0af9978f975c48406a226aab254b237e8027798ee924ef96ee9bb0491604091848752600d6020528660028482208281558260018201550155519451905182519182526020820152a380f35b602485847fa28cbf38000000000000000000000000000000000000000000000000000000008252600452fd5b50346107255760206003193601126107255760043567ffffffffffffffff8111610ff057806004019160a0600319833603011261072557612283614a6e565b506040516020926122948483614489565b82825260848101916122a5836149dc565b6001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116036129c357602482019077ffffffffffffffff000000000000000000000000000000006122fe836149f0565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015286816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107b457869161298e575b506107ea5767ffffffffffffffff612384836149f0565b1661239c816000526007602052604060002054151590565b156107bf57866001600160a01b0360025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa9081156107b457906001600160a01b03918791612971575b501633036107595760648301359361241e85612415836149dc565b61074e866149f0565b6001600160a01b036003541680612866575b50505067ffffffffffffffff612445826149f0565b168452600d855260408420956040519661245e886143ce565b805497888152600260018301549289830193845201549860408201998a5215612828577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b038116156127f757905b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926001600160a01b03815193604051947f6e48b60d000000000000000000000000000000000000000000000000000000008652600486015216928360248201528a81604481885afa9081156127ec578a916127bf575b506125406105ad886149f0565b9b8c8c8151918180820193849201010312612727575190818303612774575b5050508961256d868061498b565b90500361272c57604490519601958961258f612588896149dc565b968061498b565b90809291810103126127275760409460c4938b92359051906001600160a01b038851998a9889977f793ea55b0000000000000000000000000000000000000000000000000000000089526004890152602488015216604486015260648501528a608485015260a48401525af194851561271b5780956126e0575b50507ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae10916126a061264b61264567ffffffffffffffff946149f0565b926149dc565b9460405193849316956001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016846001600160a01b036040929594938160608401971683521660208201520152565b0390a260405190828201528181526126b9604082614489565b604051926126c684614435565b835281830152611253604051928284938452830190614611565b909194506040823d604011612713575b816126fd60409383614489565b81010312610725575084015192816126a0612609565b3d91506126f0565b604051903d90823e3d90fd5b600080fd5b611fc68a61273a878061498b565b92906040519384937fa3c8cf090000000000000000000000000000000000000000000000000000000085526004850152602484019161469d565b5191821580156127b5575b1561255f577fbce7b6cd000000000000000000000000000000000000000000000000000000008c52600452602452604452606489fd5b508281141561277f565b90508a81813d83116127e5575b6127d68183614489565b81010312612727575138612533565b503d6127cc565b6040513d8c823e3d90fd5b506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906124b3565b60248767ffffffffffffffff61283d876149f0565b7fa28cbf3800000000000000000000000000000000000000000000000000000000835216600452fd5b803b156107335790869189836040518096819582947fa8027c0f0000000000000000000000000000000000000000000000000000000084526004840160809052806128b0916157b5565b6084850160a090526101248501906128c79261469d565b906128d18b614335565b67ffffffffffffffff1660a48501526128ec60448d016143ba565b6001600160a01b031660c48501528c60e4850152612909906143ba565b6001600160a01b031661010484015283602484015282810360031901604484015261293391614527565b8a606483015203925af1801561296657908591612951575b80612430565b8161295b91614489565b6111b757833861294b565b6040513d87823e3d90fd5b6129889150883d8a116107ad5761079f8183614489565b386123fa565b90508681813d83116129bc575b6129a58183614489565b81010312610844576129b690614a24565b3861236d565b503d61299b565b6024846001600160a01b03610864866149dc565b503461072557806003193601126107255760206001600160a01b0360015416604051908152f35b5034610725576020600319360112610725576020612a3a67ffffffffffffffff612a26614307565b166000526007602052604060002054151590565b6040519015158152f35b503461072557806003193601126107255780546001600160a01b0381163303612ac9577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551682556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b5034610725578060031936011261072557600254600a54600c54604080516001600160a01b0394851681529284166020840152921691810191909152606090f35b503461072557806003193601126107255760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461072557612b85366145cc565b612b9193929193614d2c565b67ffffffffffffffff8216612bb3816000526007602052604060002054151590565b15612bd25750612bcf9293612bc9913691614577565b906150c6565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b503461072557604060031936011261072557612c17614307565b906024359067ffffffffffffffff8211610725576020612a3a84612c3e36600487016145ae565b90614a31565b5034610725576020600319360112610725576004359067ffffffffffffffff82116107255781600401916101006003198236030112610ff05781604051612c8a81614419565b526064810135916084820193612c9f856149dc565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361346057602483019477ffffffffffffffff00000000000000000000000000000000612cf8876149f0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156108d6578491613426575b506133fe5767ffffffffffffffff612d7f876149f0565b16612d97816000526007602052604060002054151590565b156133d35760206001600160a01b0360025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa9081156108d6578491613399575b501561336d57612e01866149f0565b90612e1e60a4860192612c3e612e17858761498b565b3691614577565b1561332657612e3f86612e30836149dc565b612e398a6149f0565b906156d9565b6001600160a01b03600354169081613177575b505050612e6260e484018261498b565b81016040828203126111b757813567ffffffffffffffff8111610fec5781612e8b9184016145ae565b9160208101359067ffffffffffffffff821161084457612eac9291016145ae565b906040517fd5438eae0000000000000000000000000000000000000000000000000000000081526020816004816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156129665791612f7b949391868094819261314b575b506001600160a01b03612f699293604051988996879586937fa6208506000000000000000000000000000000000000000000000000000000008552604060048601526044850190614527565b90600319848303016024850152614527565b0393165af1801561314057839284916130b1575b501561308957612fa560209160c486019061498b565b908092918101031261272757350361306157507ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc067ffffffffffffffff612ff96044612ff26020976149f0565b94016149dc565b604080517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b039081168252336020830152909216908201526060810185905292169180608081015b0390a28060405161305881614419565b52604051908152f35b807f3f4d60530000000000000000000000000000000000000000000000000000000060049252fd5b6004837f2532cf45000000000000000000000000000000000000000000000000000000008152fd5b9250503d8084843e6130c38184614489565b82016060838203126111b7578251906130de60208501614a24565b9360408101519067ffffffffffffffff8211610733570181601f820112156108445780519161310c836144ca565b9061311a6040519283614489565b8382526020848401011161073357906020806131399493019101614504565b9138612f8f565b6040513d85823e3d90fd5b612f6992506131706001600160a01b039160203d6020116107ad5761079f8183614489565b9250612f1d565b813b15610fec579184918893836040518096819582947f6371157400000000000000000000000000000000000000000000000000000000845260048401606090526131c28b806157b5565b6064860161010090526101648601906131da9261469d565b926131e490614335565b67ffffffffffffffff1660848501526131ff60448e016143ba565b6001600160a01b031660a48501528d60c485015261321c906143ba565b6001600160a01b031660e4840152613234908a6157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610104850152613269929161469d565b61327660c48c018a6157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c848403016101248501526132ab929161469d565b6132b860e48c018a6157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c848403016101448501526132ed929161469d565b8b602483015282604483015203925af1801561314057908391613311575b80612e52565b8161331b91614489565b610ff057813861330b565b506133309161498b565b611fc66040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161469d565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b90506020813d6020116133cb575b816133b460209383614489565b810103126111b7576133c590614a24565b38612df2565b3d91506133a7565b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011613458575b8161344160209383614489565b810103126111b75761345290614a24565b38612d68565b3d9150613434565b6024826001600160a01b03610864886149dc565b503461072557602060031936011261072557604060609167ffffffffffffffff61349c614307565b828480516134a9816143ce565b8281528260208201520152168152600d602052206040516134c9816143ce565b815491828252604060026001830154926020850193845201549201918252604051928352516020830152516040820152f35b503461072557806003193601126107255760206001600160a01b0360035416604051908152f35b50346107255760406003193601126107255760043567ffffffffffffffff8111610ff0578060040161010060031983360301126108e1576135616142a9565b918360405161356f81614419565b5260648101359060c481019461359961359361358e612e17898861498b565b614ee3565b84614fd7565b9460848301936135a8856149dc565b6001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016911603613b2057602484019577ffffffffffffffff00000000000000000000000000000000613601886149f0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115612966578591613ae6575b50613abe5767ffffffffffffffff613688886149f0565b166136a0816000526007602052604060002054151590565b15613a935760206001600160a01b0360025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115612966578591613a59575b5015613a2d5761370a876149f0565b9261372060a4870194612c3e612e17878661498b565b15613a23577fffffffff0000000000000000000000000000000000000000000000000000000016918215613a085761376a8961375b896149dc565b6137648b6149f0565b90615745565b6001600160a01b03600354169182613815575b60208a8a7ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc067ffffffffffffffff8c613048856137e48f6137d860446137de9201986137c88a6149dc565b506137d2816149f0565b506149f0565b946149dc565b966149dc565b604080516001600160a01b039889168152336020820152979091169087015260608601529116929081906080820190565b859a839695963b15610844578894869289928c6040519a8b998a9889977f63711574000000000000000000000000000000000000000000000000000000008952600489016060905261386787806157b5565b60648b0161010090526101648b019061387f9261469d565b9461388990614335565b67ffffffffffffffff1660848a01526044016138a4906143ba565b6001600160a01b031660a489015260c48801526138c0906143ba565b6001600160a01b031660e48701526138d890846157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c8784030161010488015261390d929161469d565b9061391890836157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c8684030161012487015261394d929161469d565b9060e48b0161395b916157b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610144860152613990929161469d565b908c6024840152604483015203925af180156107b457856137e46137de6137d8604467ffffffffffffffff9760209c7ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09a98613048986139f8575b505097505085975061377d565b81613a0291614489565b386139eb565b613a1e89613a15896149dc565b612e398b6149f0565b61376a565b613330848361498b565b6024847f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b90506020813d602011613a8b575b81613a7460209383614489565b81010312610fec57613a8590614a24565b386136fb565b3d9150613a67565b7fa9902c7e000000000000000000000000000000000000000000000000000000008552600452602484fd5b6004847f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b90506020813d602011613b18575b81613b0160209383614489565b81010312610fec57613b1290614a24565b38613671565b3d9150613af4565b6024836001600160a01b03610864886149dc565b5034610725578060031936011261072557602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461072557604060031936011261072557613b8c614307565b60243591821515830361072557610140613c4f613ba98585614908565b613bff60409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b503461072557602060031936011261072557602090613c6e614378565b90506001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461072557806003193601126107255760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346107255760c060031936011261072557613d06614378565b50613d0f61431e565b613d1761438e565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036107255760a4359067ffffffffffffffff82116107255760a063ffffffff8061ffff613d7c8888613d753660048b0161434a565b5050614758565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b503461072557806003193601126107255750611253604051613dc6604082614489565b601681527f4c6f6d62617264546f6b656e506f6f6c20322e302e30000000000000000000006020820152604051918291602083526020830190614527565b50346107255760c060031936011261072557613e1e614378565b50613e2761431e565b50613e3061427a565b5060843567ffffffffffffffff8111610ff057613e5190369060040161434a565b5050600260a435101561072557604051613e6c606082614489565b6002815260208101906040368337805115613f08576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168252805160011015613f085790826040830152604051928392602084019060208552518091526040840192915b818110613ee6575050500390f35b82516001600160a01b0316845285945060209384019390920191600101613ed8565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b503461072557608060031936011261072557613f4f614307565b6024359060443567ffffffffffffffff81116111b757613f7390369060040161434a565b9060643591613f80614d2c565b67ffffffffffffffff841693613fa3856000526007602052604060002054151590565b156141215785156140f957613fc2613fbc368486614577565b82614a31565b15611f8f575090613fd4913691614577565b60208151116140bb576020815191015190602081106140a8575b8060031b908082046008149015171561407b5761010003610100811161407b57916040917fbe237be2cca72f95760d5f21feb5f0cf6579119971f023d6ccc49c749ddc9263931c908251614041816143ce565b82815260026020820188815285830190848252888b52600d602052868b20935184555160018401555191015582519182526020820152a380f35b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b906000198260200360031b1b1690613fee565b611fc6906040519182917fe0d7fb02000000000000000000000000000000000000000000000000000000008352602060048401526024830190614527565b6004877f5a39e303000000000000000000000000000000000000000000000000000000008152fd5b602487867f2e59db3a000000000000000000000000000000000000000000000000000000008252600452fd5b905034610ff0576020600319360112610ff0576020907fffffffff0000000000000000000000000000000000000000000000000000000061418c61424b565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115614221575b81156141f7575b81156141cd575b5015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014836141c6565b7f0e64dd2900000000000000000000000000000000000000000000000000000000811491506141bf565b7f940a154200000000000000000000000000000000000000000000000000000000811491506141b8565b600435907fffffffff000000000000000000000000000000000000000000000000000000008216820361272757565b606435907fffffffff000000000000000000000000000000000000000000000000000000008216820361272757565b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361272757565b604435907fffffffff000000000000000000000000000000000000000000000000000000008216820361272757565b6004359067ffffffffffffffff8216820361272757565b6024359067ffffffffffffffff8216820361272757565b359067ffffffffffffffff8216820361272757565b9181601f840112156127275782359167ffffffffffffffff8311612727576020838186019501011161272757565b600435906001600160a01b038216820361272757565b606435906001600160a01b038216820361272757565b602435906001600160a01b038216820361272757565b35906001600160a01b038216820361272757565b6060810190811067ffffffffffffffff8211176143ea57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176143ea57604052565b6040810190811067ffffffffffffffff8211176143ea57604052565b60a0810190811067ffffffffffffffff8211176143ea57604052565b60e0810190811067ffffffffffffffff8211176143ea57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176143ea57604052565b67ffffffffffffffff81116143ea57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b8381106145175750506000910152565b8181015183820152602001614507565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361456381518092818752878088019101614504565b0116010190565b3590811515820361272757565b929192614583826144ca565b916145916040519384614489565b829481845281830111612727578281602093846000960137010152565b9080601f83011215612727578160206145c993359101614577565b90565b9060406003198301126127275760043567ffffffffffffffff8116810361272757916024359067ffffffffffffffff82116127275761460d9160040161434a565b9091565b6145c991602061462a8351604084526040840190614527565b920151906020818403910152614527565b9181601f840112156127275782359167ffffffffffffffff8311612727576020808501948460051b01011161272757565b9181601f840112156127275782359167ffffffffffffffff8311612727576020808501948460081b01011161272757565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b60409067ffffffffffffffff6145c99593168152816020820152019161469d565b67ffffffffffffffff81116143ea5760051b60200190565b80518210156147295760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff909291926147967fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614d77565b16600052600b6020526040600020604051906147b18261446d565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c0821591015261485e577fffffffff000000000000000000000000000000000000000000000000000000001661485357505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b6040519061488482614451565b60006080838281528260208201528260408201528260608201520152565b906040516148af81614451565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161491a614877565b50614923614877565b50614957571660005260086020526040600020906145c961494b600261495061494b866148a2565b614e5e565b94016148a2565b169081600052600460205261497261494b60406000206148a2565b9160005260056020526145c961494b60406000206148a2565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215612727570180359067ffffffffffffffff82116127275760200191813603831361272757565b356001600160a01b03811681036127275790565b3567ffffffffffffffff811681036127275790565b9081602091031261272757516001600160a01b03811681036127275790565b5190811515820361272757565b9067ffffffffffffffff6145c992166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b60405190614a7b82614435565b60606020838281520152565b90600182811c92168015614ad0575b6020831014614aa157565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691614a96565b9060405191826000825492614aee84614a87565b8084529360018116908115614b5c5750600114614b15575b50614b1392500383614489565b565b90506000929192526020600020906000915b818310614b40575050906020614b139282010138614b06565b6020919350806001915483858901015201910190918492614b27565b60209350614b139592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138614b06565b67ffffffffffffffff1660005260086020526145c96004604060002001614ada565b91908110156147295760081b0190565b3580151581036127275790565b3561ffff811681036127275790565b3563ffffffff811681036127275790565b359063ffffffff8216820361272757565b359061ffff8216820361272757565b91908110156147295760051b0190565b35906fffffffffffffffffffffffffffffffff8216820361272757565b919082606091031261272757604051614c60816143ce565b6040614c8a818395614c718161456a565b8552614c7f60208201614c2b565b602086015201614c2b565b910152565b6fffffffffffffffffffffffffffffffff614ccd60408093614cb08161456a565b1515865283614cc160208301614c2b565b16602087015201614c2b565b16910152565b818110614cde575050565b60008155600101614cd3565b81810292918115918404141715614cfd57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001600160a01b03600154163303614d4057565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b91908203918211614cfd57565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614e5957614daa816155fe565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614e595761ffff8360e01c168015918215614e48575b5050614df4575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614dea565b505050565b614e66614877565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614ec36020850193614ebd614eb063ffffffff87511642614d6a565b8560808901511690614cea565b906155f1565b80821015614edc57505b16825263ffffffff4216905290565b9050614ecd565b80518015614f5357602003614f1557805160208281019183018390031261272757519060ff8211614f15575060ff1690565b611fc6906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190614527565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211614cfd57565b60ff16604d8111614cfd57600a0a90565b8115614fa8570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146150bf57828411615095579061501c91614f79565b91604d60ff841611801561507a575b6150445750509061503e6145c992614f8d565b90614cea565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b5061508483614f8d565b8015614fa85760001904841161502b565b61509e91614f79565b91604d60ff841611615044575050906150b96145c992614f8d565b90614f9e565b5050505090565b908051156152ca5767ffffffffffffffff815160208301209216918260005260086020526150fb816005604060002001615b3a565b156152865760005260096020526040600020815167ffffffffffffffff81116143ea576151288254614a87565b601f8111615254575b506020601f82116001146151ac5791615186827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea959361519c956000916151a1575b506000198260011b9260031b1c19161790565b9055604051918291602083526020830190614527565b0390a2565b905084015138615173565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169083600052806000209160005b81811061523c57509261519c9492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610615223575b5050811b019055611cba565b85015160001960f88460031b161c191690553880615217565b9192602060018192868a0151815501940192016151dc565b61528090836000526020600020601f840160051c81019160208510610f2757601f0160051c0190614cd3565b38615131565b5090611fc66040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190614527565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b815191929115615476576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff6020850151161061541357614b1391925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615474604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff60408401511615801590615505575b6154a457614b139192615337565b606483615474604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615496565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000060208083019182526001600160a01b03949094166024830152604480830195909552938152909260009161557d606482614489565b519082855af1156155e5576000513d6155dc57506001600160a01b0381163b155b6155a55750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b6001141561559e565b6040513d6000823e3d90fd5b91908201809211614cfd57565b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156156d5577dffff000000000000000000000000000000000000000000000000000000008116156156cc5760ff60015b169060f01c80615696575b506001036156695750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b601081106156a7575061565e565b6001811b82166156ba575b600101615699565b9160018101809111614cfd57916156b2565b60ff6000615653565b5050565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c92169283600052600860205261572281836002604060002001615c10565b604080516001600160a01b0390921682526020820192909252908190810161519c565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156157aa5750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f99183600052600560205261572281836040600020615c10565b90614b1393506156d9565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561272757016020813591019167ffffffffffffffff821161272757813603831361272757565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da817894492169283600052600860205261572281836040600020615c10565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c16156158b05750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e9183600052600460205261572281836040600020615c10565b90614b139350615805565b906040519182815491828252602082019060005260206000209260005b8181106158ed575050614b1392500383614489565b84548352600194850194879450602090930192016158d8565b80548210156147295760005260206000200190600090565b6000818152600760205260409020548015615a17576000198101818111614cfd57600654906000198201918211614cfd578181036159c6575b50505060065480156159975760001901615972816006615906565b60001982549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6159ff6159d76159e8936006615906565b90549060031b1c9283926006615906565b81939154906000199060031b92831b921b19161790565b90556000526007602052604060002055388080615957565b5050600090565b9060018201918160005282602052604060002054801515600014615ad1576000198101818111614cfd578254906000198201918211614cfd57818103615a9a575b50505080548015615997576000190190615a798282615906565b60001982549160031b1b191690555560005260205260006040812055600190565b615aba615aaa6159e89386615906565b90549060031b1c92839286615906565b905560005283602052604060002055388080615a5f565b50505050600090565b80600052600760205260406000205415600014615b3457600654680100000000000000008110156143ea57615b1b6159e88260018594016006556006615906565b9055600654906000526007602052604060002055600190565b50600090565b6000828152600182016020526040902054615a1757805490680100000000000000008210156143ea5782615b786159e8846001809601855584615906565b905580549260005201602052604060002055600190565b906127109167ffffffffffffffff615ba9602083016149f0565b166000908152600b60205260409020917fffffffff000000000000000000000000000000000000000000000000000000001615615bfa57606061ffff615bf6935460901c16910135614cea565b0490565b606061ffff615bf6935460801c16910135614cea565b9182549060ff8260a01c16158015615e61575b615e5b576fffffffffffffffffffffffffffffffff82169160018501908154615c6863ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642614d6a565b9081615dbd575b5050848110615d7e5750838310615cc9575050615c9e6fffffffffffffffffffffffffffffffff928392614d6a565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c928315615d3d5781615ce191614d6a565b92600019810190808211614cfd57615d04615d09926001600160a01b03966155f1565b614f9e565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b6001600160a01b0383837fd0c8d23a000000000000000000000000000000000000000000000000000000006000526000196004526024521660445260646000fd5b82856001600160a01b03927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615e3157615dd892614ebd9160801c90614cea565b80841015615e2c5750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880615c6f565b615de3565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b50505050565b508215615c2356fea164736f6c634300081a000a" - -type LombardTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewLombardTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*LombardTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(LombardTokenPoolABI)) - if err != nil { - return nil, err - } - return &LombardTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *LombardTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *LombardTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *LombardTokenPoolContract) SetPath(opts *bind.TransactOpts, remoteChainSelector uint64, lChainId [32]byte, allowedCaller []byte, remoteAdapter [32]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setPath", remoteChainSelector, lChainId, allowedCaller, remoteAdapter) -} - -func (c *LombardTokenPoolContract) GetPath(opts *bind.CallOpts, args uint64) (Path, error) { - var out []any - err := c.contract.Call(opts, &out, "getPath", args) - if err != nil { - var zero Path - return zero, err - } - return *abi.ConvertType(out[0], new(Path)).(*Path), nil -} - -type Path struct { - AllowedCaller [32]byte - LChainId [32]byte - RemoteAdapter [32]byte -} - type SetPathArgs struct { - RemoteChainSelector uint64 - LChainId [32]byte - AllowedCaller []byte - RemoteAdapter [32]byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + LChainId [32]byte `json:"lChainId"` + AllowedCaller []byte `json:"allowedCaller"` + RemoteAdapter [32]byte `json:"remoteAdapter"` } type ConstructorArgs struct { - Token common.Address - Verifier common.Address - Bridge common.Address - Adapter common.Address - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address - FallbackDecimals uint8 + Token common.Address `json:"token"` + Verifier common.Address `json:"verifier"` + Bridge common.Address `json:"bridge"` + Adapter common.Address `json:"adapter"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` + FallbackDecimals uint8 `json:"fallbackDecimals"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "lombard-token-pool:deploy", - Version: Version, - Description: "Deploys the LombardTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: LombardTokenPoolABI, - Bin: LombardTokenPoolBin, - }, + Name: "lombard-token-pool:deploy", + Version: Version, + Description: "Deploys the LombardTokenPool contract", + ContractMetadata: gobindings.LombardTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(LombardTokenPoolBin), + EVM: common.FromHex(gobindings.LombardTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var SetPath = contract.NewWrite(contract.WriteParams[SetPathArgs, *LombardTokenPoolContract]{ - Name: "lombard-token-pool:set-path", - Version: Version, - Description: "Calls setPath on the contract", - ContractType: ContractType, - ContractABI: LombardTokenPoolABI, - NewContract: NewLombardTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*LombardTokenPoolContract, SetPathArgs], - Validate: func(SetPathArgs) error { return nil }, - CallContract: func( - c *LombardTokenPoolContract, - opts *bind.TransactOpts, - args SetPathArgs, - ) (*types.Transaction, error) { - return c.SetPath(opts, args.RemoteChainSelector, args.LChainId, args.AllowedCaller, args.RemoteAdapter) - }, -}) +func NewWriteSetPath(c gobindings.LombardTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[SetPathArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetPathArgs, gobindings.LombardTokenPoolInterface]{ + Name: "lombard-token-pool:set-path", + Version: Version, + Description: "Calls setPath on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args SetPathArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardTokenPoolInterface, + opts *bind.TransactOpts, + args SetPathArgs, + ) (*types.Transaction, error) { + return c.SetPath(opts, args.RemoteChainSelector, args.LChainId, args.AllowedCaller, args.RemoteAdapter) + }, + }) +} -var GetPath = contract.NewRead(contract.ReadParams[uint64, Path, *LombardTokenPoolContract]{ - Name: "lombard-token-pool:get-path", - Version: Version, - Description: "Calls getPath on the contract", - ContractType: ContractType, - NewContract: NewLombardTokenPoolContract, - CallContract: func(c *LombardTokenPoolContract, opts *bind.CallOpts, args uint64) (Path, error) { - return c.GetPath(opts, args) - }, -}) +func NewReadGetPath(c gobindings.LombardTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.LombardTokenPoolPath, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.LombardTokenPoolPath, gobindings.LombardTokenPoolInterface]{ + Name: "lombard-token-pool:get-path", + Version: Version, + Description: "Calls getPath on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardTokenPoolInterface, opts *bind.CallOpts, args uint64) (gobindings.LombardTokenPoolPath, error) { + return c.GetPath(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/lombard_verifier/lombard_verifier.go b/chains/evm/deployment/v2_0_0/operations/lombard_verifier/lombard_verifier.go index ff0f34721d..84e60b764e 100644 --- a/chains/evm/deployment/v2_0_0/operations/lombard_verifier/lombard_verifier.go +++ b/chains/evm/deployment/v2_0_0/operations/lombard_verifier/lombard_verifier.go @@ -3,584 +3,380 @@ package lombard_verifier import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lombard_verifier" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "LombardVerifier" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const LombardVerifierABI = `[{"type":"constructor","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct LombardVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"}]},{"name":"bridge","type":"address","internalType":"contract IBridgeV3"},{"name":"storageLocation","type":"string[]","internalType":"string[]"},{"name":"rmn","type":"address","internalType":"address"},{"name":"versionTag","type":"bytes4","internalType":"bytes4"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAllowlistUpdates","inputs":[{"name":"allowlistConfigArgsItems","type":"tuple[]","internalType":"struct BaseVerifier.AllowlistConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"addedAllowlistedSenders","type":"address[]","internalType":"address[]"},{"name":"removedAllowlistedSenders","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyRemoteChainConfigUpdates","inputs":[{"name":"remoteChainConfigArgs","type":"tuple[]","internalType":"struct BaseVerifier.RemoteChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"forwardToVerifier","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"verifierData","type":"bytes","internalType":"bytes"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct LombardVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"","type":"bytes","internalType":"bytes"},{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint32","internalType":"uint32"}],"stateMutability":"view"},{"type":"function","name":"getPath","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct LombardVerifier.Path","components":[{"name":"allowedCaller","type":"bytes32","internalType":"bytes32"},{"name":"lChainId","type":"bytes32","internalType":"bytes32"}]}],"stateMutability":"view"},{"type":"function","name":"getRemoteAdapter","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"getRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"remoteChainConfig","type":"tuple","internalType":"struct BaseVerifier.RemoteChainConfigArgs","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","internalType":"bool"},{"name":"feeUSDCents","type":"uint16","internalType":"uint16"},{"name":"gasForVerification","type":"uint32","internalType":"uint32"},{"name":"payloadSizeBytes","type":"uint16","internalType":"uint16"}]},{"name":"allowedSendersList","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getStorageLocations","inputs":[],"outputs":[{"name":"","type":"string[]","internalType":"string[]"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getSupportedTokens","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"i_bridge","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IBridgeV3"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"removePaths","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct LombardVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setPath","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lChainId","type":"bytes32","internalType":"bytes32"},{"name":"allowedCaller","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRemoteAdapters","inputs":[{"name":"remoteAdapterArgs","type":"tuple[]","internalType":"struct LombardVerifier.RemoteAdapterArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"token","type":"address","internalType":"address"},{"name":"remoteAdapter","type":"bytes32","internalType":"bytes32"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateStorageLocations","inputs":[{"name":"newLocations","type":"string[]","internalType":"string[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updateSupportedTokens","inputs":[{"name":"tokensToRemove","type":"address[]","internalType":"address[]"},{"name":"tokensToSet","type":"tuple[]","internalType":"struct LombardVerifier.SupportedTokenArgs[]","components":[{"name":"localToken","type":"address","internalType":"address"},{"name":"localAdapter","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"verifyMessage","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"ccvData","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"versionTag","inputs":[],"outputs":[{"name":"tag","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AllowListSendersAdded","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListSendersRemoved","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"senders","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AllowListStateChanged","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct LombardVerifier.DynamicConfig","components":[{"name":"feeAggregator","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PathRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"lChainId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"allowedCaller","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"PathSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"lChainId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"allowedCaller","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RemoteAdapterSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":true,"internalType":"address"},{"name":"remoteAdapter","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"type":"event","name":"RemoteChainConfigSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"allowlistEnabled","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"type":"event","name":"StorageLocationsUpdated","inputs":[{"name":"oldLocations","type":"string[]","indexed":false,"internalType":"string[]"},{"name":"newLocations","type":"string[]","indexed":false,"internalType":"string[]"}],"anonymous":false},{"type":"event","name":"SupportedTokenRemoved","inputs":[{"name":"token","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"SupportedTokenSet","inputs":[{"name":"localToken","type":"address","indexed":false,"internalType":"address"},{"name":"localAdapter","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DestGasCannotBeZero","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"EnumerableMapNonexistentKey","inputs":[{"name":"key","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"ExecutionError","inputs":[]},{"type":"error","name":"Invalid32ByteAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidAllowListRequest","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidAmount","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"actual","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidCCVVersion","inputs":[{"name":"expected","type":"bytes4","internalType":"bytes4"},{"name":"actual","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidMessageId","inputs":[{"name":"messageMessageId","type":"bytes32","internalType":"bytes32"},{"name":"bridgeMessageId","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidMessageLength","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"actual","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidMessageVersion","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidReceiver","inputs":[{"name":"","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemoteChainConfig","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSender","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"actual","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"expected","type":"bytes32","internalType":"bytes32"},{"name":"actual","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"InvalidVerifierResults","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustTransferTokens","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PathNotExist","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"RemoteChainNotSupported","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"RemoteTokenOrAdapterMismatch","inputs":[{"name":"bridgeToken","type":"bytes32","internalType":"bytes32"},{"name":"remoteToken","type":"bytes32","internalType":"bytes32"},{"name":"remoteAdapter","type":"bytes32","internalType":"bytes32"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"SenderNotAllowed","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"type":"error","name":"TokenNotSupported","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"VersionTagCannotBeZero","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAllowedCaller","inputs":[]},{"type":"error","name":"ZeroBridge","inputs":[]},{"type":"error","name":"ZeroLombardChainId","inputs":[]}]` -const LombardVerifierBin = "0x60e08060405234610640576158eb803803809161001c82856106bd565b833981019080820360a081126106405760201361064057604051602081016001600160401b038111828210176104c557604052610058826106e0565b81526020820151926001600160a01b038416928385036106405760408101516001600160401b03811161064057810182601f820112156106405780519061009e826106f4565b936100ac60405195866106bd565b82855260208086019360051b830101918183116106405760208101935b83851061064557505050505060806100e3606083016106e0565b9101519063ffffffff60e01b82169283830361064057600154908051610108836106f4565b9261011660405194856106bd565b808452600160009081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690602086015b83821061059b5750505060005b81811061050757505060005b8181106103785750507fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d07586916101b46101a69260405193849360408552604085019061079a565b90838203602085015261079a565b0390a16001600160a01b031691821561036757156103565760a05260805233156103455760038054336001600160a01b0319918216179091559051600b80546001600160a01b039092169190921681179091556040519081527ff6c55d191ab03af25fd3025708a62a6038eb78ea86b0afb256fc3df66c860f6090602090a180156103345760206004916040519283809263353c26b760e01b82525afa908115610328576000916102e4575b5060ff16600281036102cb575060c0526040516150df908161080c823960805181613645015260a0518181816115c20152818161266201526139c1015260c0518181816110030152818161177101528181612c2601528181612d3301528181612e6101526138ce0152f35b63398bbe0560e11b600052600260045260245260446000fd5b6020813d602011610320575b816102fd602093836106bd565b8101031261031c57519060ff82168203610319575060ff610260565b80fd5b5080fd5b3d91506102f0565b6040513d6000823e3d90fd5b63361106cd60e01b60005260046000fd5b639b15e16f60e01b60005260046000fd5b631027401f60e21b60005260046000fd5b6342bcdf7f60e11b60005260046000fd5b82518110156104f15760208160051b84010151600154680100000000000000008110156104c5578060016103af920160015561072e565b9190916104db578051906001600160401b0382116104c5576103d18354610749565b601f8111610488575b50602090601f831160011461041d5760019493929160009183610412575b5050600019600383901b1c191690841b1790555b01610160565b0151905038806103f8565b90601f1983169184600052816000209260005b818110610470575091600196959492918388959310610457575b505050811b01905561040c565b015160001960f88460031b161c1916905538808061044a565b92936020600181928786015181550195019301610430565b6104b590846000526020600020601f850160051c810191602086106104bb575b601f0160051c0190610783565b386103da565b90915081906104a8565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052600060045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600154801561058557600019019061051e8261072e565b9290926104db578261053260019454610749565b9081610543575b5050825501610154565b81601f60009311861461055a5750555b3880610539565b8183526020832061057591601f0160051c8101908701610783565b8082528160208120915555610553565b634e487b7160e01b600052603160045260246000fd5b604051600084546105ab81610749565b808452906001811690811561061d57506001146105e5575b50600192826105d7859460209403826106bd565b815201930191019091610147565b6000868152602081209092505b818310610607575050810160200160016105c3565b60018160209254838688010152019201916105f2565b60ff191660208581019190915291151560051b84019091019150600190506105c3565b600080fd5b84516001600160401b0381116106405782019083603f83011215610640576020820151906001600160401b0382116104c55760405161068e601f8401601f1916602001826106bd565b8281526040848401018610610640576106b26020949385946040868501910161070b565b8152019401936100c9565b601f909101601f19168101906001600160401b038211908210176104c557604052565b51906001600160a01b038216820361064057565b6001600160401b0381116104c55760051b60200190565b60005b83811061071e5750506000910152565b818101518382015260200161070e565b6001548110156104f157600160005260206000200190600090565b90600182811c92168015610779575b602083101461076357565b634e487b7160e01b600052602260045260246000fd5b91607f1691610758565b81811061078e575050565b60008155600101610783565b9080602083519182815201916020808360051b8301019401926000915b8383106107c657505050505090565b909192939460208080600193601f1986820301875289516107f28151809281855285808601910161070b565b601f01601f1916010197019594919091019201906107b756fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146101e7578063181f5a77146101e2578063240028e8146101dd57806329694706146101d8578063384ff3b7146101d357806338ff8c38146101ce578063597b95c3146101c95780635cb80c5d146101c45780635ef2c64b146101bf5780635fa13565146101ba578063708e1f79146101b5578063737037e8146101b05780637437ff9f146101ab57806379ba5097146101a657806387ae9292146101a1578063898068fc1461019c57806389e364c7146101975780638da5cb5b146101925780638e0b87181461018d5780638f2aaea414610188578063b6cfa3b714610183578063bcb6d4f71461017e578063c4bffe2b14610179578063c9b146b314610174578063d3c7c2c71461016f578063ec6ae7a71461016a578063f2fde38b14610165578063f4cdd89e146101605763fe163eed1461015b57600080fd5b61260b565b612478565b6122c0565b61225f565b6121d3565b611e56565b611d93565b611c9f565b611be5565b611b16565b611a9b565b611a49565b611515565b6113d3565b6112c3565b61113f565b6110c5565b611027565b610fb8565b610e56565b610d7e565b610bc4565b610ac9565b610a28565b610997565b61061d565b610559565b6104af565b61024f565b600435907fffffffff000000000000000000000000000000000000000000000000000000008216820361021b57565b600080fd5b606435907fffffffff000000000000000000000000000000000000000000000000000000008216820361021b57565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760207fffffffff000000000000000000000000000000000000000000000000000000006102a96101ec565b167fd3e969cd0000000000000000000000000000000000000000000000000000000081149081156102e0575b506040519015158152f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386102d5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761035557604052565b61030a565b6020810190811067ffffffffffffffff82111761035557604052565b60c0810190811067ffffffffffffffff82111761035557604052565b6080810190811067ffffffffffffffff82111761035557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761035557604052565b604051906103fe60c0836103ae565b565b604051906103fe60a0836103ae565b67ffffffffffffffff811161035557601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811061045c5750506000910152565b818101518382015260200161044c565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936104a881518092818752878088019101610449565b0116010190565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5761052c60408051906104f081836103ae565b601582527f4c6f6d62617264566572696669657220322e302e30000000000000000000000060208301525191829160208352602083019061046c565b0390f35b73ffffffffffffffffffffffffffffffffffffffff81160361021b57565b35906103fe82610530565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760206105c273ffffffffffffffffffffffffffffffffffffffff6004356105ae81610530565b166000526005602052604060002054151590565b6040519015158152f35b90816101c091031261021b5790565b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020838186019501011161021b57565b90602061061a92818152019061046c565b90565b3461021b5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b5761066c9036906004016105cc565b6024359061067b604435610530565b60843567ffffffffffffffff811161021b5761069b9036906004016105db565b505060208101803560006106ae82610985565b6106b7826135f3565b6101808401906106c78286612690565b90501561095d576106d783610985565b61012085019273ffffffffffffffffffffffffffffffffffffffff6107076106ff86896126e4565b810190612735565b16906107278167ffffffffffffffff166000526000602052604060002090565b8054909161075f73ffffffffffffffffffffffffffffffffffffffff83165b73ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff811615610927576040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff929092166004830152602090829060249082905afa80156109225773ffffffffffffffffffffffffffffffffffffffff9186916108f3575b501633036108c75760e01c60ff16610838575b61052c61082c8989896108248a61081e6108186108128d87612690565b90612779565b93612686565b936126e4565b9290916137d6565b60405191829182610609565b61087861087c9160016108616107468673ffffffffffffffffffffffffffffffffffffffff1690565b910160019160005201602052604060002054151590565b1590565b61088657806107f5565b7fd0d2597600000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff16600452602490fd5b7f728fe07b00000000000000000000000000000000000000000000000000000000845233600452602484fd5b610915915060203d60201161091b575b61090d81836103ae565b8101906131ff565b386107e2565b503d610903565b613214565b7f4d1aff7e00000000000000000000000000000000000000000000000000000000865267ffffffffffffffff8216600452602486fd5b807f4f73dc4d0000000000000000000000000000000000000000000000000000000060049252fd5b67ffffffffffffffff81160361021b57565b3461021b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b576020610a1f6004356109d781610985565b67ffffffffffffffff602435916109ed83610530565b16600052600a835260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54604051908152f35b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5767ffffffffffffffff600435610a6c81610985565b60006020604051610a7c81610339565b828152015216600052600960205261052c6040600020600160405191610aa183610339565b8054835201546020820152604051918291829190916020806040830194805184520151910152565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b573660238201121561021b57806004013567ffffffffffffffff811161021b5736602460c083028401011161021b576024610b4492016127d5565b005b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020808501948460051b01011161021b57565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261021b576004359067ffffffffffffffff821161021b57610bc091600401610b46565b9091565b3461021b57610bd236610b77565b9073ffffffffffffffffffffffffffffffffffffffff600b5416918215610d055760005b818110610bff57005b610c15610746610c10838587612ea2565b612eb2565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290919073ffffffffffffffffffffffffffffffffffffffff831690602081602481855afa8015610922576001948892600092610cd5575b5081610c89575b5050505001610bf6565b81610cb97f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e9385610cc994614b0a565b6040519081529081906020820190565b0390a338858180610c7f565b610cf791925060203d8111610cfe575b610cef81836103ae565b81019061370a565b9038610c78565b503d610ce5565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff81116103555760051b60200190565b929192610d538261040f565b91610d6160405193846103ae565b82948184528183011161021b578281602093846000960137010152565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b573660238201121561021b57806004013590610dd982610d2f565b90610de760405192836103ae565b8282526024602083019360051b8201019036821161021b5760248101935b828510610e1557610b44846128cd565b843567ffffffffffffffff811161021b5782013660438201121561021b57602091610e4b83923690604460248201359101610d47565b815201940193610e05565b3461021b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b57600435610e9181610985565b6024359060443567ffffffffffffffff811161021b57610eb59036906004016105db565b610ebd613bd9565b8315610f8e57610ed791610ed2913691610d47565b614195565b8015610f6457610f5f7f83eda38165c92f401f97217d5ead82ef163d0b716c3979eff4670361bc2dc0c991610f4567ffffffffffffffff60405195610f1b87610339565b83875287602088015216948560005260096020526040600020906020600191805184550151910155565b610f4e84614b6c565b506040519081529081906020820190565b0390a3005b7f55622b8a0000000000000000000000000000000000000000000000000000000060005260046000fd5b7f5a39e3030000000000000000000000000000000000000000000000000000000060005260046000fd5b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461021b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b57611076903690600401610b46565b6024359167ffffffffffffffff831161021b573660238401121561021b5782600401359167ffffffffffffffff831161021b573660248460061b8601011161021b576024610b44940191612a37565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760006040516111028161035a565b5261052c6040516111128161035a565b600b5473ffffffffffffffffffffffffffffffffffffffff16908190526040519081529081906020820190565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5773ffffffffffffffffffffffffffffffffffffffff60025460201c16330361122257600354337fffffffffffffffffffffffff00000000000000000000000000000000000000008216176003557fffffffffffffffff0000000000000000000000000000000000000000ffffffff6002541660025573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b9080602083519182815201916020808360051b8301019401926000915b83831061127857505050505090565b90919293946020806112b4837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08660019603018752895161046c565b97019301930191939290611269565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5761052c6112fd612f58565b60405191829160208352602083019061124c565b906020808351928381520192019060005b81811061132f5750505090565b825173ffffffffffffffffffffffffffffffffffffffff16845260209384019390920191600101611322565b60e09061ffff60a061061a959473ffffffffffffffffffffffffffffffffffffffff815116845267ffffffffffffffff602082015116602085015260408101511515604085015282606082015116606085015263ffffffff608082015116608085015201511660a08201528160c08201520190611311565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043561140e81610985565b60405161141a81610376565b60008152602081016000905260408101600090526060810160009052608081016000905260a001600090526114638167ffffffffffffffff166000526000602052604060002090565b80549173ffffffffffffffffffffffffffffffffffffffff83169260e081901c60ff1660a082901c61ffff169060b083901c63ffffffff169260d01c61ffff16936114ac6103ef565b73ffffffffffffffffffffffffffffffffffffffff909716875267ffffffffffffffff1660208701521515604086015261ffff16606085015263ffffffff16608084015261ffff1660a083015260010161150590614d62565b60405191829161052c918361135b565b3461021b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b576115649036906004016105cc565b6024359060443567ffffffffffffffff811161021b576115889036906004016105db565b919061159b61159683612686565b6135f3565b6115ac6115a783612686565b6144fa565b6115bf6115b98483613075565b906130d6565b927f0000000000000000000000000000000000000000000000000000000000000000917fffffffff00000000000000000000000000000000000000000000000000000000831694857fffffffff000000000000000000000000000000000000000000000000000000008216036119f457506006938483106119ca5761166161165a61165461164e888787613083565b90613199565b60f01c90565b61ffff1690565b61167361166e828861318c565b61316b565b84106119ca576116866116f6918761318c565b91611693838887876130be565b90916116a36101208201826126e4565b926101808301936116c46116ba6108128787612690565b60608101906126e4565b9390926116ef6108126116e76116dd6108128b8b612690565b60808101906126e4565b999098612690565b35976146f6565b61171361165a61165461164e61170b8561316b565b8588886130be565b9161171d8261316b565b611727848261318c565b85106119ca57604051947fd5438eae00000000000000000000000000000000000000000000000000000000865260208660048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9384156109225773ffffffffffffffffffffffffffffffffffffffff986000978896611993575b5092826117d186938a966117e0966117da996130be565b9690988361318c565b926130be565b97909461181c604051998a97889687947fa6208506000000000000000000000000000000000000000000000000000000008652600486016132d5565b0393165af19182156109225760009060009361196a575b501561194057602482510361190c5760246020830151920151927fffffffff000000000000000000000000000000000000000000000000000000008316036118b757505081810361188057005b7f6c86fa3a0000000000000000000000000000000000000000000000000000000060005260049190915260245260446000fd5b6000fd5b7fadaf7739000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000009081166004521660245260446000fd5b81517fc2fdac9800000000000000000000000000000000000000000000000000000000600052602460048190525260446000fd5b7f2532cf450000000000000000000000000000000000000000000000000000000060005260046000fd5b905061198a9192503d806000833e61198281836103ae565b810190613220565b92915038611833565b8894919650926117d16117da96936119bc6117e09660203d60201161091b5761090d81836103ae565b9893965093965050926117ba565b7f1ede477b0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fadaf7739000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000008085166004521660245260446000fd5b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b57602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b573660238201121561021b57806004013567ffffffffffffffff811161021b57366024606083028401011161021b576024610b4492016132fc565b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b577ff6c55d191ab03af25fd3025708a62a6038eb78ea86b0afb256fc3df66c860f60611be0604051611b758161035a565b600435611b8181610530565b8152611b8b613bd9565b51600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691821790556040519081529081906020820190565b0390a1005b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611c3f6101ec565b611c47613bd9565b8060e01c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000060025416176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a1005b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760043567ffffffffffffffff811161021b573660238201121561021b57806004013590611cfa82610d2f565b91611d0860405193846103ae565b8083526024602084019160051b8301019136831161021b57602401905b828210611d3557610b44846133ef565b602080918335611d4481610985565b815201910190611d25565b602060408183019282815284518094520192019060005b818110611d735750505090565b825167ffffffffffffffff16845260209384019390920191600101611d66565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b57600754611dce81610d2f565b90611ddc60405192836103ae565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611e0982610d2f565b0136602084013760005b818110611e28576040518061052c8582611d4f565b8067ffffffffffffffff611e3d600193613f77565b90549060031b1c16611e4f82866134f9565b5201611e13565b3461021b57611e6436610b77565b611e6c613bd9565b6000905b808210611e7957005b611e8c611e878383866148fd565b6149a4565b92611ebc611ea2855167ffffffffffffffff1690565b67ffffffffffffffff166000526000602052604060002090565b92611ecc845460ff9060e01c1690565b916020860192611edc8451151590565b908115159015150361212b575b506060860194600101939060005b86518051821015611fd15790611f2c611f12826001946134f9565b5173ffffffffffffffffffffffffffffffffffffffff1690565b611f54611f4e73ffffffffffffffffffffffffffffffffffffffff8316610746565b89614eee565b611f60575b5001611ef7565b7f9ac16e02c9a455144d35e2f0d80817a608340dee3c104f547ceb4433df418d82611fc867ffffffffffffffff611f9f8d5167ffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff909516855216929081906020820190565b0390a238611f59565b50509450949190926040830191825151611ff4575b505050506001019091611e70565b5192959194909392156121165760005b8551805182101561210357611f128261201c926134f9565b73ffffffffffffffffffffffffffffffffffffffff8116156120b8576001919061206461205e73ffffffffffffffffffffffffffffffffffffffff8316610746565b88614bfd565b612070575b5001612004565b7f85682793ee26ba7d2d073ce790a50b388a1791aab25fc368bcce99d3b1d4da806120af67ffffffffffffffff611f9f8c5167ffffffffffffffff1690565b0390a238612069565b6118b36120cd895167ffffffffffffffff1690565b7f463258ff0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b5050935093506001915090388080611fe6565b6118b36120cd875167ffffffffffffffff1690565b85547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681151560e01b7cff00000000000000000000000000000000000000000000000000000000161786557f8504171b9fc8a6c38617bdd508715ec759043b69df1608d7b0db90c0f85234926121ca67ffffffffffffffff6121b68a5167ffffffffffffffff1690565b604051941515855216929081906020820190565b0390a238611ee9565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b576040516004548082526020820190600460005260206000209060005b8181106122495761052c85612235818703826103ae565b604051918291602083526020830190611311565b825484526020909301926001928301920161221e565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b57602060025460e01b7fffffffff0000000000000000000000000000000000000000000000000000000060405191168152f35b3461021b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b576004356122fb81610530565b612303613bd9565b73ffffffffffffffffffffffffffffffffffffffff8116903382146123aa577fffffffffffffffff0000000000000000000000000000000000000000ffffffff77ffffffffffffffffffffffffffffffffffffffff000000006002549260201b1691161760025573ffffffffffffffffffffffffffffffffffffffff600354167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b9080601f8301121561021b5781602061061a93359101610d47565b81601f8201121561021b5780359061240682610d2f565b9261241460405194856103ae565b82845260208085019360061b8301019181831161021b57602001925b82841061243e575050505090565b60408483031261021b576020604091825161245881610339565b863561246381610530565b81528287013583820152815201930192612430565b3461021b5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b576004356124b381610985565b60243567ffffffffffffffff811161021b5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261021b576124f9610400565b90806004013567ffffffffffffffff811161021b5761251e90600436918401016123d4565b8252602481013567ffffffffffffffff811161021b5761254490600436918401016123d4565b6020830152604481013567ffffffffffffffff811161021b5761256d90600436918401016123ef565b604083015261257e6064820161054e565b6060830152608481013567ffffffffffffffff811161021b5760809160046125a992369201016123d4565b91015260443567ffffffffffffffff811161021b5761052c916125d36125e29236906004016123d4565b506125dc610220565b90613549565b6040805161ffff909416845263ffffffff92831660208501529116908201529081906060820190565b3461021b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261021b5760206040517fffffffff000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000168152f35b3561061a81610985565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021b570180359067ffffffffffffffff821161021b57602001918160051b3603831361021b57565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561021b570180359067ffffffffffffffff821161021b5760200191813603831361021b57565b9081602091031261021b573561061a81610530565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90156127b2578035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff418136030182121561021b570190565b61274a565b906040516127c481610339565b602060018294805484520154910152565b906127de613bd9565b6127e781610d2f565b916127f560405193846103ae565b81835260c060208401920281019036821161021b57915b81831061281f575050506103fe90613c24565b60c08336031261021b576040519061283682610376565b833561284181610530565b8252602084013561285181610985565b60208301526040840135612864816128b4565b6040830152612875606085016128be565b606083015260808401359063ffffffff8216820361021b5782602092608060c09501526128a460a087016128be565b60a082015281520192019161280c565b8015150361021b57565b359061ffff8216820361021b57565b906128d6613bd9565b60015482516128e3612f58565b9160005b81811061295057505060005b818110612934575050917fec9f9416b098576351ada0c342c1381ca08990ee094978ddd1003ef013d07586919261292f60405192839283614170565b0390a1565b8061294a612944600193886134f9565b51614021565b016128f3565b6001548015612a03577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019061298582613f92565b9290926129fe578261299960019454612f05565b90816129aa575b50508255016128e7565b601f821185146129c15760009055505b38806129a0565b6129e86129f99286601f6129da85600052602060002090565b920160051c82019101613fc5565b600081815260208120918190559055565b6129ba565b612a08565b613f48565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b90929192612a43613bd9565b60005b818110612d5e5750505060005b818110612a5f57505050565b807f086dcdf32d9aaaee4446c7bcf02b41c0d3b4923bf9d0265b033974e09d5f05e3612a96612a916001948688612ebc565b612ecc565b612ae3612ab7825173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000526001600401602052604060002054151590565b612c51575b612bbd612ba2612b0c835173ffffffffffffffffffffffffffffffffffffffff1690565b92612b396020820194612b33865173ffffffffffffffffffffffffffffffffffffffff1690565b906144c6565b50612b5b610746855173ffffffffffffffffffffffffffffffffffffffff1690565b15612beb57611f12612b84610746835173ffffffffffffffffffffffffffffffffffffffff1690565b855173ffffffffffffffffffffffffffffffffffffffff1690614444565b915173ffffffffffffffffffffffffffffffffffffffff1690565b6040805173ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152a101612a53565b612c4c612c0f610746835173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690614444565b611f12565b612c77612c72825173ffffffffffffffffffffffffffffffffffffffff1690565b61423a565b612c9b610746602084015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff8216908103612cc1575b5050612ae8565b15612cf757612cf090612ceb610746845173ffffffffffffffffffffffffffffffffffffffff1690565b6142c7565b3880612cba565b50612d59612d1c610746835173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906142c7565b612cf0565b80612d6f610c106001938587612ea2565b612d8e73ffffffffffffffffffffffffffffffffffffffff8216610746565b612da6612da061074661074684614c59565b91614cbc565b612db3575b505001612a46565b7fbea12876694c4055c71f74308f752b9027cf3d554194000a366abddfc239a30691612e3c9173ffffffffffffffffffffffffffffffffffffffff811615612e4657612e159073ffffffffffffffffffffffffffffffffffffffff83166142c7565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390a13880612dab565b50612e9d73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83166142c7565b612e15565b91908110156127b25760051b0190565b3561061a81610530565b91908110156127b25760061b0190565b60408136031261021b57602060405191612ee583610339565b8035612ef081610530565b83520135612efd81610530565b602082015290565b90600182811c92168015612f4e575b6020831014612f1f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612f14565b60015490612f6582610d2f565b91612f7360405193846103ae565b808352600160009081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69190602085015b828210612fb25750505050565b60405160008554612fc281612f05565b80845290600181169081156130345750600114612ffc575b5060019282612fee859460209403826103ae565b815201940191019092612fa5565b6000878152602081209092505b81831061301e57505081016020016001612fda565b6001816020925483868801015201920191613009565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b8401909101915060019050612fda565b9060041161021b5790600490565b909291928360041161021b57831161021b57600401917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0190565b9093929384831161021b57841161021b578101920390565b919091357fffffffff000000000000000000000000000000000000000000000000000000008116926004811061310a575050565b7fffffffff00000000000000000000000000000000000000000000000000000000929350829060040360031b1b161690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b906002820180921161317957565b61313c565b906001820180921161317957565b9190820180921161317957565b919091357fffff000000000000000000000000000000000000000000000000000000000000811692600281106131cd575050565b7fffff000000000000000000000000000000000000000000000000000000000000929350829060020360031b1b161690565b9081602091031261021b575161061a81610530565b6040513d6000823e3d90fd5b909160608284031261021b57815192602083015161323d816128b4565b9260408101519067ffffffffffffffff821161021b570181601f8201121561021b57805161326a8161040f565b9261327860405194856103ae565b8184526020828401011161021b5761061a9160208085019101610449565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b92906132ee9061061a9593604086526040860191613296565b926020818503910152613296565b613304613bd9565b60005b828110156133ea5760019060006060820284017ff2bb53a7e6aae800a85fba961b2bc3124a23dd44d95fefe0b7b29bd90975a97660408201359180359361334d85610985565b836133a460206133718867ffffffffffffffff16600052600a602052604060002090565b940135809461337f82610530565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b556133ae85610985565b6133b782610530565b5060405192835273ffffffffffffffffffffffffffffffffffffffff169267ffffffffffffffff1691602090a301613307565b505050565b906133f8613bd9565b6000915b80518310156134f45767ffffffffffffffff61341884836134f9565b51169261344161343c8567ffffffffffffffff166000526009602052604060002090565b6127b7565b61344a85614e11565b156134bb5784613481613475600195969767ffffffffffffffff166000526009602052604060002090565b60016000918281550155565b60208281015192516040519081527f8a8e4c676433747219d2fee4ea128776522bb0177478e1e0a375e880948ed37b9190a30191906133fc565b847fa28cbf380000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff602491166004526000fd5b509050565b80518210156127b25760209160051b010190565b91613545918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b67ffffffffffffffff16908160005260006020526040600020549173ffffffffffffffffffffffffffffffffffffffff8316156135b157506135919060025460e01b90614a2a565b63ffffffff8160b01c169161ffff80808460d01c169360a01c1693921690565b7f4d1aff7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9081602091031261021b575161061a816128b4565b6040517f2cbc26bb000000000000000000000000000000000000000000000000000000008152608082901b77ffffffffffffffff000000000000000000000000000000001660048201526020816024817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff165afa908115610922576000916136ca575b506136935750565b7ffdbd6a720000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b6136ec915060203d6020116136f2575b6136e481836103ae565b8101906135de565b3861368b565b503d6136da565b91602061061a938181520191613296565b9081602091031261021b575190565b91907fffffffff00000000000000000000000000000000000000000000000000000000604051931660208401526024830152602482526103fe6044836103ae565b919082604091031261021b576020825192015190565b939061061a97969373ffffffffffffffffffffffffffffffffffffffff60e09794819388521660208701521660408501526060840152608083015260a08201528160c0820152019061046c565b90604051916020830152602082526103fe6040836103ae565b9291949390608084019260206137ec85876126e4565b905011613b95576138066107466106ff60408801886126e4565b9261383761087873ffffffffffffffffffffffffffffffffffffffff86166000526005602052604060002054151590565b613b515761385c61343c8467ffffffffffffffff166000526009602052604060002090565b94855115613b1957613950959697986138996107466107466138946107468a73ffffffffffffffffffffffffffffffffffffffff1690565b614c59565b73ffffffffffffffffffffffffffffffffffffffff811615613b1157945b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169660208a019160208884516040519c8d9283927f6e48b60d0000000000000000000000000000000000000000000000000000000084526004840190929173ffffffffffffffffffffffffffffffffffffffff6020916040840195845216910152565b03818c5afa918215610922578c9a600093613af0575b50613981610ed261397a60608e018e6126e4565b3691610d47565b91828403613a67575b50505050926139e56139ba610ed261397a613a1a966139b460409e9760009b9a519a810190612735565b9c6126e4565b9a359251917f0000000000000000000000000000000000000000000000000000000000000000613719565b9189519a8b998a9889977e8a119800000000000000000000000000000000000000000000000000000000895260048901613770565b03925af180156109225761061a91600091613a36575b506137bd565b613a58915060403d604011613a60575b613a5081836103ae565b81019061375a565b905038613a30565b503d613a46565b613a94929394959697989a9c999b5061337f9067ffffffffffffffff16600052600a602052604060002090565b549182158015613ae6575b613ab357808c9a989b99979695949361398a565b7fbce7b6cd0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b5082811415613a9f565b613b0a91935060203d602011610cfe57610cef81836103ae565b9138613966565b5085946138b7565b7fa28cbf380000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff841660045260246000fd5b7f06439c6b0000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff841660045260246000fd5b613b9f84866126e4565b90613bd56040519283927fa3c8cf09000000000000000000000000000000000000000000000000000000008452600484016136f9565b0390fd5b73ffffffffffffffffffffffffffffffffffffffff600354163303613bfa57565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b60005b8151811015613f4457613c3a81836134f9565b51602081015167ffffffffffffffff169081908115613f0c57613c718267ffffffffffffffff166000526000602052604060002090565b91613cd4613c93835173ffffffffffffffffffffffffffffffffffffffff1690565b849073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b613d32613ce46040840151151590565b84547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690151560e01b7cff0000000000000000000000000000000000000000000000000000000016178455565b613d8b613d44606084015161ffff1690565b84547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff1660a09190911b75ffff000000000000000000000000000000000000000016178455565b6080820190613daa613da1835163ffffffff1690565b63ffffffff1690565b15613ed5575091613ea6613e9b6107467f4cef55db91890720ca3d94563535726752813bffa29490d6d41218acb6831cc994613e3c613df160019a99985163ffffffff1690565b86547fffffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffff1660b09190911b79ffffffff0000000000000000000000000000000000000000000016178655565b611f12613e4e60a083015161ffff1690565b86547fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff1660d09190911b7bffff000000000000000000000000000000000000000000000000000016178655565b915460e01c60ff1690565b6040805173ffffffffffffffffffffffffffffffffffffffff939093168352901515602083015290a201613c27565b7f9e7205510000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b7f97ccaab70000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff821660045260246000fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6007548110156127b257600760005260206000200190600090565b6001548110156127b257600160005260206000200190600090565b80548210156127b25760005260206000200190600090565b818110613fd0575050565b60008155600101613fc5565b9190601f8111613feb57505050565b6103fe926000526020600020906020601f840160051c83019310614017575b601f0160051c0190613fc5565b909150819061400a565b90600154680100000000000000008110156103555780600161404892016001556001613fad565b6129fe57825167ffffffffffffffff8111610355576140718161406b8454612f05565b84613fdc565b6020601f82116001146140cb5781906135459394956000926140c0575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b01519050388061408e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08216906140fe84600052602060002090565b9160005b81811061415857509583600195969710614121575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080614117565b9192602060018192868b015181550194019201614102565b909161418761061a9360408452604084019061124c565b91602081840391015261124c565b6020815111614204576020815191015190602081106141d3575b8060031b908082046008149015171561317957610100036101008111613179571c90565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260200360031b1b16906141af565b613bd5906040519182917fe0d7fb0200000000000000000000000000000000000000000000000000000000835260048301610609565b73ffffffffffffffffffffffffffffffffffffffff16600081815260066020526040812054918215806142b3575b61428757505073ffffffffffffffffffffffffffffffffffffffff1690565b602492507f02b56686000000000000000000000000000000000000000000000000000000008252600452fd5b508082526005602052604082205415614268565b60405190602060008184017f095ea7b30000000000000000000000000000000000000000000000000000000081526143568561432a8489602484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018752866103ae565b84519082855af1600051903d8161440b575b501590505b61437657505050565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9093166024840152600060448401526103fe926144069061440081606481015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018352826103ae565b82614cd7565b614cd7565b15159050614438575061436d73ffffffffffffffffffffffffffffffffffffffff82163b15155b38614368565b600161436d9114614432565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602080830191825273ffffffffffffffffffffffffffffffffffffffff851660248401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604484015291929190600090614356856064810161432a565b9073ffffffffffffffffffffffffffffffffffffffff8061061a931691826000526006602052166040600020556004614bfd565b61453861074661451e8367ffffffffffffffff166000526000602052604060002090565b5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff811615614602576040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff929092166004830152336024830152602090829060449082905afa908115610922576000916145e3575b50156145b557565b7f728fe07b000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b6145fc915060203d6020116136f2576136e481836103ae565b386145ad565b7f4d1aff7e0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff821660045260246000fd5b9160c08383031261021b57823592602081013592604082013592606083013561466281610530565b92608081013561467181610530565b9260a082013567ffffffffffffffff811161021b5761061a92016123d4565b919091357fffffffffffffffffffffffffffffffffffffffff000000000000000000000000811692601481106146c4575050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000929350829060140360031b1b161690565b816147149261470c929a9998979a969596613083565b81019061463a565b97945050505050602184015160418501519373ffffffffffffffffffffffffffffffffffffffff614766614760608160618a01519901519c61475a610ed2368388610d47565b94614690565b60601c90565b1661477e816000526005602052604060002054151590565b61488a575b5080820361485a57505061479c91610ed2913691610d47565b80820361482a5750506147b3610ed2368585610d47565b036147f55750508082036147c5575050565b7f7c83fcf00000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b613bd56040519283927fa3c8cf09000000000000000000000000000000000000000000000000000000008452600484016136f9565b7fda5a0ce50000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b7fd27ededb0000000000000000000000000000000000000000000000000000000060005260045260245260446000fd5b61074661074661489992614c59565b73ffffffffffffffffffffffffffffffffffffffff8116156147835760405160609190911b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208201526148f79150610ed281603481016143d4565b38614783565b91908110156127b25760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818136030182121561021b570190565b9080601f8301121561021b57813561495481610d2f565b9261496260405194856103ae565b81845260208085019260051b82010192831161021b57602001905b82821061498a5750505090565b60208091833561499981610530565b81520191019061497d565b60808136031261021b57604051906149bb82610392565b80356149c681610985565b825260208101356149d6816128b4565b6020830152604081013567ffffffffffffffff811161021b576149fc903690830161493d565b604083015260608101359067ffffffffffffffff821161021b57614a229136910161493d565b606082015290565b7fffffffff00000000000000000000000000000000000000000000000000000000811615613f4457614a5b81614fcf565b601082811c9082901c167dffff0000000000000000000000000000000000000000000000000000000016613f445761ffff8260e01c168015908115614af9575b50614aa4575050565b7fdf63778f000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000009081166004521660245260446000fd5b905061ffff8260e01c161038614a9b565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9290921660248301526044808301939093529181526103fe916144066064836103ae565b600081815260086020526040902054614bf7576007546801000000000000000081101561035557614bde614ba98260018594016007556007613fad565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055600754906000526008602052604060002055600190565b50600090565b6000828152600182016020526040902054614c5257805490680100000000000000008210156103555782614c3b614ba9846001809601855584613fad565b905580549260005201602052604060002055600190565b5050600090565b80600052600660205260406000205490811580614ca6575b614c79575090565b7f02b566860000000000000000000000000000000000000000000000000000000060005260045260246000fd5b5060008181526005602052604090205415614c71565b61061a90806000526006602052600060408120556004614eee565b906000602091828151910182855af115613214576000513d614d59575073ffffffffffffffffffffffffffffffffffffffff81163b155b614d155750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415614d0e565b906040519182815491828252602082019060005260206000209260005b818110614d945750506103fe925003836103ae565b8454835260019485019487945060209093019201614d7f565b80548015612a03577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190614de28282613fad565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b600081815260086020526040902054908115614c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82019082821161317957600754927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411613179578383600095614ead9503614eb3575b505050614e9c6007614dad565b600890600052602052604060002090565b55600190565b614e9c614edf91614ed5614ecb614ee5956007613fad565b90549060031b1c90565b9283916007613fad565b9061350d565b55388080614e8f565b6001810191806000528260205260406000205492831515600014614fc6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401848111613179578354937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8501948511613179576000958583614ead97614f7e9503614f8d575b505050614dad565b90600052602052604060002090565b614fad614edf91614fa4614ecb614fbd9588613fad565b92839187613fad565b8590600052602052604060002090565b55388080614f76565b50505050600090565b7fffffffff000000000000000000000000000000000000000000000000000000008116156150cf577dffff000000000000000000000000000000000000000000000000000000008116156150c65760ff60015b1660f082901c80615088575b506001036150395750565b7fc512f96c000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000001660045260246000fd5b60005b60108110615099575061502e565b63ffffffff6001821b8316166150b2575b60010161508b565b916150be60019161317e565b9290506150aa565b60ff6000615022565b5056fea164736f6c634300081a000a" - -type LombardVerifierContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewLombardVerifierContract( - address common.Address, - backend bind.ContractBackend, -) (*LombardVerifierContract, error) { - parsed, err := abi.JSON(strings.NewReader(LombardVerifierABI)) - if err != nil { - return nil, err - } - return &LombardVerifierContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *LombardVerifierContract) Address() common.Address { - return c.address -} - -func (c *LombardVerifierContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *LombardVerifierContract) ApplyRemoteChainConfigUpdates(opts *bind.TransactOpts, args []RemoteChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyRemoteChainConfigUpdates", args) -} - -func (c *LombardVerifierContract) SetPath(opts *bind.TransactOpts, remoteChainSelector uint64, lChainId [32]byte, allowedCaller []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setPath", remoteChainSelector, lChainId, allowedCaller) -} - -func (c *LombardVerifierContract) UpdateSupportedTokens(opts *bind.TransactOpts, tokensToRemove []common.Address, tokensToSet []SupportedTokenArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "updateSupportedTokens", tokensToRemove, tokensToSet) -} - -func (c *LombardVerifierContract) SetRemoteAdapters(opts *bind.TransactOpts, args []RemoteAdapterArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRemoteAdapters", args) -} - -func (c *LombardVerifierContract) SetAllowedFinalityConfig(opts *bind.TransactOpts, args [4]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setAllowedFinalityConfig", args) -} - -func (c *LombardVerifierContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -func (c *LombardVerifierContract) ApplyAllowlistUpdates(opts *bind.TransactOpts, args []AllowlistConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAllowlistUpdates", args) -} - -func (c *LombardVerifierContract) RemovePaths(opts *bind.TransactOpts, args []uint64) (*types.Transaction, error) { - return c.contract.Transact(opts, "removePaths", args) -} - -func (c *LombardVerifierContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *LombardVerifierContract) VersionTag(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "versionTag") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -func (c *LombardVerifierContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *LombardVerifierContract) GetPath(opts *bind.CallOpts, args uint64) (Path, error) { - var out []any - err := c.contract.Call(opts, &out, "getPath", args) - if err != nil { - var zero Path - return zero, err - } - return *abi.ConvertType(out[0], new(Path)).(*Path), nil -} - -func (c *LombardVerifierContract) GetRemoteAdapter(opts *bind.CallOpts, remoteChainSelector uint64, token common.Address) ([32]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteAdapter", remoteChainSelector, token) - if err != nil { - var zero [32]byte - return zero, err - } - return *abi.ConvertType(out[0], new([32]byte)).(*[32]byte), nil -} - -func (c *LombardVerifierContract) GetRemoteChainConfig(opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteChainConfig", args) - outstruct := new(GetRemoteChainConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.RemoteChainConfig = *abi.ConvertType(out[0], new(RemoteChainConfigArgs)).(*RemoteChainConfigArgs) - outstruct.AllowedSendersList = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - - return *outstruct, nil -} - -func (c *LombardVerifierContract) GetStorageLocations(opts *bind.CallOpts) ([]string, error) { - var out []any - err := c.contract.Call(opts, &out, "getStorageLocations") - if err != nil { - var zero []string - return zero, err - } - return *abi.ConvertType(out[0], new([]string)).(*[]string), nil -} - -func (c *LombardVerifierContract) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedChains") - if err != nil { - var zero []uint64 - return zero, err - } - return *abi.ConvertType(out[0], new([]uint64)).(*[]uint64), nil -} - -func (c *LombardVerifierContract) GetSupportedTokens(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedTokens") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *LombardVerifierContract) IsSupportedToken(opts *bind.CallOpts, args common.Address) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isSupportedToken", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *LombardVerifierContract) GetFee(opts *bind.CallOpts, destChainSelector uint64, arg1 EVM2AnyMessage, arg2 []byte, requestedFinality [4]byte) (GetFeeResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getFee", destChainSelector, arg1, arg2, requestedFinality) - outstruct := new(GetFeeResult) - if err != nil { - return *outstruct, err - } - - outstruct.FeeUSDCents = *abi.ConvertType(out[0], new(uint16)).(*uint16) - outstruct.GasForVerification = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.PayloadSizeBytes = *abi.ConvertType(out[2], new(uint32)).(*uint32) - - return *outstruct, nil -} - -type AllowlistConfigArgs struct { - DestChainSelector uint64 - AllowlistEnabled bool - AddedAllowlistedSenders []common.Address - RemovedAllowlistedSenders []common.Address -} - -type DynamicConfig struct { - FeeAggregator common.Address -} - -type EVM2AnyMessage struct { - Receiver []byte - Data []byte - TokenAmounts []EVMTokenAmount - FeeToken common.Address - ExtraArgs []byte -} - -type EVMTokenAmount struct { - Token common.Address - Amount *big.Int -} - -type GetFeeResult struct { - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint32 -} - -type GetRemoteChainConfigResult struct { - RemoteChainConfig RemoteChainConfigArgs - AllowedSendersList []common.Address -} - -type Path struct { - AllowedCaller [32]byte - LChainId [32]byte -} - -type RemoteAdapterArgs struct { - RemoteChainSelector uint64 - Token common.Address - RemoteAdapter [32]byte -} - -type RemoteChainConfigArgs struct { - Router common.Address - RemoteChainSelector uint64 - AllowlistEnabled bool - FeeUSDCents uint16 - GasForVerification uint32 - PayloadSizeBytes uint16 -} - -type SupportedTokenArgs struct { - LocalToken common.Address - LocalAdapter common.Address -} - type SetPathArgs struct { - RemoteChainSelector uint64 - LChainId [32]byte - AllowedCaller []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + LChainId [32]byte `json:"lChainId"` + AllowedCaller []byte `json:"allowedCaller"` } type UpdateSupportedTokensArgs struct { - TokensToRemove []common.Address - TokensToSet []SupportedTokenArgs + TokensToRemove []common.Address `json:"tokensToRemove"` + TokensToSet []gobindings.LombardVerifierSupportedTokenArgs `json:"tokensToSet"` } type GetRemoteAdapterArgs struct { - RemoteChainSelector uint64 - Token common.Address + RemoteChainSelector uint64 `json:"remoteChainSelector"` + Token common.Address `json:"token"` } type GetFeeArgs struct { - DestChainSelector uint64 - Arg1 EVM2AnyMessage - Arg2 []byte - RequestedFinality [4]byte + DestChainSelector uint64 `json:"destChainSelector"` + Arg1 gobindings.ClientEVM2AnyMessage `json:"arg1"` + Arg2 []byte `json:"arg2"` + RequestedFinality [4]byte `json:"requestedFinality"` } type ConstructorArgs struct { - DynamicConfig DynamicConfig - Bridge common.Address - StorageLocation []string - Rmn common.Address - VersionTag [4]byte + DynamicConfig gobindings.LombardVerifierDynamicConfig `json:"dynamicConfig"` + Bridge common.Address `json:"bridge"` + StorageLocation []string `json:"storageLocation"` + Rmn common.Address `json:"rmn"` + VersionTag [4]byte `json:"versionTag"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "lombard-verifier:deploy", - Version: Version, - Description: "Deploys the LombardVerifier contract", - ContractMetadata: &bind.MetaData{ - ABI: LombardVerifierABI, - Bin: LombardVerifierBin, - }, + Name: "lombard-verifier:deploy", + Version: Version, + Description: "Deploys the LombardVerifier contract", + ContractMetadata: gobindings.LombardVerifierMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(LombardVerifierBin), + EVM: common.FromHex(gobindings.LombardVerifierMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var ApplyRemoteChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]RemoteChainConfigArgs, *LombardVerifierContract]{ - Name: "lombard-verifier:apply-remote-chain-config-updates", - Version: Version, - Description: "Calls applyRemoteChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, []RemoteChainConfigArgs], - Validate: func([]RemoteChainConfigArgs) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args []RemoteChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyRemoteChainConfigUpdates(opts, args) - }, -}) - -var SetPath = contract.NewWrite(contract.WriteParams[SetPathArgs, *LombardVerifierContract]{ - Name: "lombard-verifier:set-path", - Version: Version, - Description: "Calls setPath on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, SetPathArgs], - Validate: func(SetPathArgs) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args SetPathArgs, - ) (*types.Transaction, error) { - return c.SetPath(opts, args.RemoteChainSelector, args.LChainId, args.AllowedCaller) - }, -}) - -var UpdateSupportedTokens = contract.NewWrite(contract.WriteParams[UpdateSupportedTokensArgs, *LombardVerifierContract]{ - Name: "lombard-verifier:update-supported-tokens", - Version: Version, - Description: "Calls updateSupportedTokens on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, UpdateSupportedTokensArgs], - Validate: func(UpdateSupportedTokensArgs) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args UpdateSupportedTokensArgs, - ) (*types.Transaction, error) { - return c.UpdateSupportedTokens(opts, args.TokensToRemove, args.TokensToSet) - }, -}) - -var SetRemoteAdapters = contract.NewWrite(contract.WriteParams[[]RemoteAdapterArgs, *LombardVerifierContract]{ - Name: "lombard-verifier:set-remote-adapters", - Version: Version, - Description: "Calls setRemoteAdapters on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, []RemoteAdapterArgs], - Validate: func([]RemoteAdapterArgs) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args []RemoteAdapterArgs, - ) (*types.Transaction, error) { - return c.SetRemoteAdapters(opts, args) - }, -}) - -var SetAllowedFinalityConfig = contract.NewWrite(contract.WriteParams[[4]byte, *LombardVerifierContract]{ - Name: "lombard-verifier:set-allowed-finality-config", - Version: Version, - Description: "Calls setAllowedFinalityConfig on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, [4]byte], - Validate: func([4]byte) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args [4]byte, - ) (*types.Transaction, error) { - return c.SetAllowedFinalityConfig(opts, args) - }, -}) - -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *LombardVerifierContract]{ - Name: "lombard-verifier:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) - -var ApplyAllowlistUpdates = contract.NewWrite(contract.WriteParams[[]AllowlistConfigArgs, *LombardVerifierContract]{ - Name: "lombard-verifier:apply-allowlist-updates", - Version: Version, - Description: "Calls applyAllowlistUpdates on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, []AllowlistConfigArgs], - Validate: func([]AllowlistConfigArgs) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args []AllowlistConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyAllowlistUpdates(opts, args) - }, -}) - -var RemovePaths = contract.NewWrite(contract.WriteParams[[]uint64, *LombardVerifierContract]{ - Name: "lombard-verifier:remove-paths", - Version: Version, - Description: "Calls removePaths on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, []uint64], - Validate: func([]uint64) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args []uint64, - ) (*types.Transaction, error) { - return c.RemovePaths(opts, args) - }, -}) - -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *LombardVerifierContract]{ - Name: "lombard-verifier:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: LombardVerifierABI, - NewContract: NewLombardVerifierContract, - IsAllowedCaller: contract.OnlyOwner[*LombardVerifierContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *LombardVerifierContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) - -var VersionTag = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *LombardVerifierContract]{ - Name: "lombard-verifier:version-tag", - Version: Version, - Description: "Calls versionTag on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.VersionTag(opts) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *LombardVerifierContract]{ - Name: "lombard-verifier:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, -}) - -var GetPath = contract.NewRead(contract.ReadParams[uint64, Path, *LombardVerifierContract]{ - Name: "lombard-verifier:get-path", - Version: Version, - Description: "Calls getPath on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args uint64) (Path, error) { - return c.GetPath(opts, args) - }, -}) - -var GetRemoteAdapter = contract.NewRead(contract.ReadParams[GetRemoteAdapterArgs, [32]byte, *LombardVerifierContract]{ - Name: "lombard-verifier:get-remote-adapter", - Version: Version, - Description: "Calls getRemoteAdapter on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args GetRemoteAdapterArgs) ([32]byte, error) { - return c.GetRemoteAdapter(opts, args.RemoteChainSelector, args.Token) - }, -}) - -var GetRemoteChainConfig = contract.NewRead(contract.ReadParams[uint64, GetRemoteChainConfigResult, *LombardVerifierContract]{ - Name: "lombard-verifier:get-remote-chain-config", - Version: Version, - Description: "Calls getRemoteChainConfig on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args uint64) (GetRemoteChainConfigResult, error) { - return c.GetRemoteChainConfig(opts, args) - }, -}) - -var GetStorageLocations = contract.NewRead(contract.ReadParams[struct{}, []string, *LombardVerifierContract]{ - Name: "lombard-verifier:get-storage-locations", - Version: Version, - Description: "Calls getStorageLocations on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args struct{}) ([]string, error) { - return c.GetStorageLocations(opts) - }, }) -var GetSupportedChains = contract.NewRead(contract.ReadParams[struct{}, []uint64, *LombardVerifierContract]{ - Name: "lombard-verifier:get-supported-chains", - Version: Version, - Description: "Calls getSupportedChains on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args struct{}) ([]uint64, error) { - return c.GetSupportedChains(opts) - }, -}) - -var GetSupportedTokens = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *LombardVerifierContract]{ - Name: "lombard-verifier:get-supported-tokens", - Version: Version, - Description: "Calls getSupportedTokens on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetSupportedTokens(opts) - }, -}) - -var IsSupportedToken = contract.NewRead(contract.ReadParams[common.Address, bool, *LombardVerifierContract]{ - Name: "lombard-verifier:is-supported-token", - Version: Version, - Description: "Calls isSupportedToken on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args common.Address) (bool, error) { - return c.IsSupportedToken(opts, args) - }, -}) - -var GetFee = contract.NewRead(contract.ReadParams[GetFeeArgs, GetFeeResult, *LombardVerifierContract]{ - Name: "lombard-verifier:get-fee", - Version: Version, - Description: "Calls getFee on the contract", - ContractType: ContractType, - NewContract: NewLombardVerifierContract, - CallContract: func(c *LombardVerifierContract, opts *bind.CallOpts, args GetFeeArgs) (GetFeeResult, error) { - return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) - }, -}) +func NewWriteApplyRemoteChainConfigUpdates(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierRemoteChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierRemoteChainConfigArgs, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:apply-remote-chain-config-updates", + Version: Version, + Description: "Calls applyRemoteChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierRemoteChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierRemoteChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyRemoteChainConfigUpdates(opts, args) + }, + }) +} + +func NewWriteSetPath(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[SetPathArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetPathArgs, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:set-path", + Version: Version, + Description: "Calls setPath on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args SetPathArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args SetPathArgs, + ) (*types.Transaction, error) { + return c.SetPath(opts, args.RemoteChainSelector, args.LChainId, args.AllowedCaller) + }, + }) +} + +func NewWriteUpdateSupportedTokens(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[UpdateSupportedTokensArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[UpdateSupportedTokensArgs, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:update-supported-tokens", + Version: Version, + Description: "Calls updateSupportedTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args UpdateSupportedTokensArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args UpdateSupportedTokensArgs, + ) (*types.Transaction, error) { + return c.UpdateSupportedTokens(opts, args.TokensToRemove, args.TokensToSet) + }, + }) +} + +func NewWriteSetRemoteAdapters(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.LombardVerifierRemoteAdapterArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.LombardVerifierRemoteAdapterArgs, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:set-remote-adapters", + Version: Version, + Description: "Calls setRemoteAdapters on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.LombardVerifierRemoteAdapterArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.LombardVerifierRemoteAdapterArgs, + ) (*types.Transaction, error) { + return c.SetRemoteAdapters(opts, args) + }, + }) +} + +func NewWriteSetAllowedFinalityConfig(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[4]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[4]byte, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:set-allowed-finality-config", + Version: Version, + Description: "Calls setAllowedFinalityConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args [4]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args [4]byte, + ) (*types.Transaction, error) { + return c.SetAllowedFinalityConfig(opts, args) + }, + }) +} + +func NewWriteSetDynamicConfig(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.LombardVerifierDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.LombardVerifierDynamicConfig, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args gobindings.LombardVerifierDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args gobindings.LombardVerifierDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} + +func NewWriteApplyAllowlistUpdates(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.BaseVerifierAllowlistConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.BaseVerifierAllowlistConfigArgs, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:apply-allowlist-updates", + Version: Version, + Description: "Calls applyAllowlistUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.BaseVerifierAllowlistConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args []gobindings.BaseVerifierAllowlistConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyAllowlistUpdates(opts, args) + }, + }) +} + +func NewWriteRemovePaths(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]uint64], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]uint64, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:remove-paths", + Version: Version, + Description: "Calls removePaths on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args []uint64) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args []uint64, + ) (*types.Transaction, error) { + return c.RemovePaths(opts, args) + }, + }) +} + +func NewWriteWithdrawFeeTokens(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.LombardVerifierMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.LombardVerifierInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} + +func NewReadVersionTag(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:version-tag", + Version: Version, + Description: "Calls versionTag on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.VersionTag(opts) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.LombardVerifierDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.LombardVerifierDynamicConfig, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args struct{}) (gobindings.LombardVerifierDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewReadGetPath(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.LombardVerifierPath, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.LombardVerifierPath, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-path", + Version: Version, + Description: "Calls getPath on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.LombardVerifierPath, error) { + return c.GetPath(opts, args) + }, + }) +} + +func NewReadGetRemoteAdapter(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[GetRemoteAdapterArgs], [32]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetRemoteAdapterArgs, [32]byte, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-remote-adapter", + Version: Version, + Description: "Calls getRemoteAdapter on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args GetRemoteAdapterArgs) ([32]byte, error) { + return c.GetRemoteAdapter(opts, args.RemoteChainSelector, args.Token) + }, + }) +} + +func NewReadGetRemoteChainConfig(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.GetRemoteChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.GetRemoteChainConfig, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-remote-chain-config", + Version: Version, + Description: "Calls getRemoteChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args uint64) (gobindings.GetRemoteChainConfig, error) { + return c.GetRemoteChainConfig(opts, args) + }, + }) +} + +func NewReadGetStorageLocations(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []string, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []string, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-storage-locations", + Version: Version, + Description: "Calls getStorageLocations on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args struct{}) ([]string, error) { + return c.GetStorageLocations(opts) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} + +func NewReadGetSupportedTokens(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-supported-tokens", + Version: Version, + Description: "Calls getSupportedTokens on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetSupportedTokens(opts) + }, + }) +} + +func NewReadIsSupportedToken(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[common.Address, bool, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:is-supported-token", + Version: Version, + Description: "Calls isSupportedToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args common.Address) (bool, error) { + return c.IsSupportedToken(opts, args) + }, + }) +} + +func NewReadGetFee(c gobindings.LombardVerifierInterface) *cld_ops.Operation[contract.FunctionInput[GetFeeArgs], gobindings.GetFee, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetFeeArgs, gobindings.GetFee, gobindings.LombardVerifierInterface]{ + Name: "lombard-verifier:get-fee", + Version: Version, + Description: "Calls getFee on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.LombardVerifierInterface, opts *bind.CallOpts, args GetFeeArgs) (gobindings.GetFee, error) { + return c.GetFee(opts, args.DestChainSelector, args.Arg1, args.Arg2, args.RequestedFinality) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/mock_receiver/mock_receiver.go b/chains/evm/deployment/v2_0_0/operations/mock_receiver/mock_receiver.go index a5f471f6f2..d3129c72ec 100644 --- a/chains/evm/deployment/v2_0_0/operations/mock_receiver/mock_receiver.go +++ b/chains/evm/deployment/v2_0_0/operations/mock_receiver/mock_receiver.go @@ -3,78 +3,31 @@ package mock_receiver import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/mock_receiver_v2" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" ) var ContractType cldf_deployment.ContractType = "MockReceiverV2" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const MockReceiverV2ABI = `[{"type":"constructor","inputs":[{"name":"required","type":"address[]","internalType":"address[]"},{"name":"optional","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"}],"stateMutability":"nonpayable"},{"type":"function","name":"ccipReceive","inputs":[{"name":"","type":"tuple","internalType":"struct Client.Any2EVMMessage","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"destTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getCCVsAndFinalityConfig","inputs":[{"name":"","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"requiredVerifier","type":"address[]","internalType":"address[]"},{"name":"optionalVerifiers","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"}]` -const MockReceiverV2Bin = "0x6080604052346101ff5761078b8038038061001981610204565b9283398101906060818303126101ff5780516001600160401b0381116101ff5782610045918301610229565b60208201519092906001600160401b0381116101ff57604091610069918401610229565b9101519160ff83168093036101ff578051906001600160401b0382116101875768010000000000000000821161018757600054826000558083106101ba575b5060200160008052602060002060005b83811061019d5784518690866001600160401b038211610187576801000000000000000082116101875760015482600155808310610141575b506020016001600052602060002060005b838110610124578460ff1960025416176002556040516104f0908161029b8239f35b82516001600160a01b031681830155602090920191600101610102565b60016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69081019083015b81811061017b57506100f1565b6000815560010161016e565b634e487b7160e01b600052604160045260246000fd5b82516001600160a01b0316818301556020909201916001016100b8565b600080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5639081019083015b8181106101f357506100a8565b600081556001016101e6565b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761018757604052565b81601f820112156101ff578051916001600160401b038311610187578260051b91602080610258818601610204565b8096815201938201019182116101ff57602001915b81831061027a5750505090565b82516001600160a01b03811681036101ff5781526020928301920161026d56fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146103ac575080631bfc84d01461015657806385572ffb146100e75763b6cfa3b71461004b57600080fd5b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e2576004357fffffffff00000000000000000000000000000000000000000000000000000000811681036100e2577fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff64ffffffff00806002549360d81c1616911617600255600080f35b600080fd5b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e25760043567ffffffffffffffff81116100e2577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a091360301126100e257005b346100e25760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e25760043567ffffffffffffffff8116036100e25760243567ffffffffffffffff81116100e257366023820112156100e257806004013567ffffffffffffffff81116100e257369101602401116100e25760025460405160008054808352818052829160208301917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563915b81811061037d5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101761031f5760405260405191826001548082526020820190600160005260206000209060005b81811061034e5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683019267ffffffffffffffff84118185101761031f576103087fffffffff00000000000000000000000000000000000000000000000000000000916102fa95604052604051958695608087526080870190610499565b908582036020870152610499565b9160ff8116604085015260d81b1660608301520390f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b825473ffffffffffffffffffffffffffffffffffffffff16845287945060209093019260019283019201610274565b825473ffffffffffffffffffffffffffffffffffffffff1684528594506020909301926001928301920161020e565b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e257600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036100e257817f1bfc84d0000000000000000000000000000000000000000000000000000000006020931490811561046f575b8115610445575b5015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361043e565b7f85572ffb0000000000000000000000000000000000000000000000000000000081149150610437565b906020808351928381520192019060005b8181106104b75750505090565b825173ffffffffffffffffffffffffffffffffffffffff168452602093840193909201916001016104aa56fea164736f6c634300081a000a" - -type MockReceiverV2Contract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewMockReceiverV2Contract( - address common.Address, - backend bind.ContractBackend, -) (*MockReceiverV2Contract, error) { - parsed, err := abi.JSON(strings.NewReader(MockReceiverV2ABI)) - if err != nil { - return nil, err - } - return &MockReceiverV2Contract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *MockReceiverV2Contract) Address() common.Address { - return c.address -} - -func (c *MockReceiverV2Contract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Required []common.Address - Optional []common.Address - Threshold uint8 + Required []common.Address `json:"required"` + Optional []common.Address `json:"optional"` + Threshold uint8 `json:"threshold"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "mock-receiver:deploy", - Version: Version, - Description: "Deploys the MockReceiverV2 contract", - ContractMetadata: &bind.MetaData{ - ABI: MockReceiverV2ABI, - Bin: MockReceiverV2Bin, - }, + Name: "mock-receiver:deploy", + Version: Version, + Description: "Deploys the MockReceiverV2 contract", + ContractMetadata: gobindings.MockReceiverV2MetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(MockReceiverV2Bin), + EVM: common.FromHex(gobindings.MockReceiverV2MetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) diff --git a/chains/evm/deployment/v2_0_0/operations/mock_receiver_v2/mock_receiver_v2.go b/chains/evm/deployment/v2_0_0/operations/mock_receiver_v2/mock_receiver_v2.go index acff1cd840..770fd06492 100644 --- a/chains/evm/deployment/v2_0_0/operations/mock_receiver_v2/mock_receiver_v2.go +++ b/chains/evm/deployment/v2_0_0/operations/mock_receiver_v2/mock_receiver_v2.go @@ -3,141 +3,73 @@ package mock_receiver_v2 import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/mock_receiver_v2" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "MockReceiverV2" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const MockReceiverV2ABI = `[{"type":"constructor","inputs":[{"name":"required","type":"address[]","internalType":"address[]"},{"name":"optional","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"}],"stateMutability":"nonpayable"},{"type":"function","name":"ccipReceive","inputs":[{"name":"","type":"tuple","internalType":"struct Client.Any2EVMMessage","components":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"destTokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getCCVsAndFinalityConfig","inputs":[{"name":"","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"requiredVerifier","type":"address[]","internalType":"address[]"},{"name":"optionalVerifiers","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"},{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"}]` -const MockReceiverV2Bin = "0x6080604052346101ff5761078b8038038061001981610204565b9283398101906060818303126101ff5780516001600160401b0381116101ff5782610045918301610229565b60208201519092906001600160401b0381116101ff57604091610069918401610229565b9101519160ff83168093036101ff578051906001600160401b0382116101875768010000000000000000821161018757600054826000558083106101ba575b5060200160008052602060002060005b83811061019d5784518690866001600160401b038211610187576801000000000000000082116101875760015482600155808310610141575b506020016001600052602060002060005b838110610124578460ff1960025416176002556040516104f0908161029b8239f35b82516001600160a01b031681830155602090920191600101610102565b60016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69081019083015b81811061017b57506100f1565b6000815560010161016e565b634e487b7160e01b600052604160045260246000fd5b82516001600160a01b0316818301556020909201916001016100b8565b600080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5639081019083015b8181106101f357506100a8565b600081556001016101e6565b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761018757604052565b81601f820112156101ff578051916001600160401b038311610187578260051b91602080610258818601610204565b8096815201938201019182116101ff57602001915b81831061027a5750505090565b82516001600160a01b03811681036101ff5781526020928301920161026d56fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146103ac575080631bfc84d01461015657806385572ffb146100e75763b6cfa3b71461004b57600080fd5b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e2576004357fffffffff00000000000000000000000000000000000000000000000000000000811681036100e2577fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff64ffffffff00806002549360d81c1616911617600255600080f35b600080fd5b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e25760043567ffffffffffffffff81116100e2577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a091360301126100e257005b346100e25760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e25760043567ffffffffffffffff8116036100e25760243567ffffffffffffffff81116100e257366023820112156100e257806004013567ffffffffffffffff81116100e257369101602401116100e25760025460405160008054808352818052829160208301917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563915b81811061037d5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101761031f5760405260405191826001548082526020820190600160005260206000209060005b81811061034e5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01683019267ffffffffffffffff84118185101761031f576103087fffffffff00000000000000000000000000000000000000000000000000000000916102fa95604052604051958695608087526080870190610499565b908582036020870152610499565b9160ff8116604085015260d81b1660608301520390f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b825473ffffffffffffffffffffffffffffffffffffffff16845287945060209093019260019283019201610274565b825473ffffffffffffffffffffffffffffffffffffffff1684528594506020909301926001928301920161020e565b346100e25760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e257600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036100e257817f1bfc84d0000000000000000000000000000000000000000000000000000000006020931490811561046f575b8115610445575b5015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361043e565b7f85572ffb0000000000000000000000000000000000000000000000000000000081149150610437565b906020808351928381520192019060005b8181106104b75750505090565b825173ffffffffffffffffffffffffffffffffffffffff168452602093840193909201916001016104aa56fea164736f6c634300081a000a" - -type MockReceiverV2Contract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewMockReceiverV2Contract( - address common.Address, - backend bind.ContractBackend, -) (*MockReceiverV2Contract, error) { - parsed, err := abi.JSON(strings.NewReader(MockReceiverV2ABI)) - if err != nil { - return nil, err - } - return &MockReceiverV2Contract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *MockReceiverV2Contract) Address() common.Address { - return c.address -} - -func (c *MockReceiverV2Contract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *MockReceiverV2Contract) GetCCVsAndFinalityConfig(opts *bind.CallOpts, arg0 uint64, arg1 []byte) (GetCCVsAndFinalityConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getCCVsAndFinalityConfig", arg0, arg1) - outstruct := new(GetCCVsAndFinalityConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.RequiredVerifier = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - outstruct.OptionalVerifiers = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) - outstruct.Threshold = *abi.ConvertType(out[2], new(uint8)).(*uint8) - outstruct.AllowedFinalityConfig = *abi.ConvertType(out[3], new([4]byte)).(*[4]byte) - - return *outstruct, nil -} - -func (c *MockReceiverV2Contract) SetAllowedFinalityConfig(opts *bind.TransactOpts, args [4]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setAllowedFinalityConfig", args) -} - -type GetCCVsAndFinalityConfigResult struct { - RequiredVerifier []common.Address - OptionalVerifiers []common.Address - Threshold uint8 - AllowedFinalityConfig [4]byte -} - type GetCCVsAndFinalityConfigArgs struct { - Arg0 uint64 - Arg1 []byte + Arg0 uint64 `json:"arg0"` + Arg1 []byte `json:"arg1"` } type ConstructorArgs struct { - Required []common.Address - Optional []common.Address - Threshold uint8 + Required []common.Address `json:"required"` + Optional []common.Address `json:"optional"` + Threshold uint8 `json:"threshold"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "mock-receiver-v2:deploy", - Version: Version, - Description: "Deploys the MockReceiverV2 contract", - ContractMetadata: &bind.MetaData{ - ABI: MockReceiverV2ABI, - Bin: MockReceiverV2Bin, - }, + Name: "mock-receiver-v2:deploy", + Version: Version, + Description: "Deploys the MockReceiverV2 contract", + ContractMetadata: gobindings.MockReceiverV2MetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(MockReceiverV2Bin), + EVM: common.FromHex(gobindings.MockReceiverV2MetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetCCVsAndFinalityConfig = contract.NewRead(contract.ReadParams[GetCCVsAndFinalityConfigArgs, GetCCVsAndFinalityConfigResult, *MockReceiverV2Contract]{ - Name: "mock-receiver-v2:get-cc-vs-and-finality-config", - Version: Version, - Description: "Calls getCCVsAndFinalityConfig on the contract", - ContractType: ContractType, - NewContract: NewMockReceiverV2Contract, - CallContract: func(c *MockReceiverV2Contract, opts *bind.CallOpts, args GetCCVsAndFinalityConfigArgs) (GetCCVsAndFinalityConfigResult, error) { - return c.GetCCVsAndFinalityConfig(opts, args.Arg0, args.Arg1) - }, -}) +func NewReadGetCCVsAndFinalityConfig(c gobindings.MockReceiverV2Interface) *cld_ops.Operation[contract.FunctionInput[GetCCVsAndFinalityConfigArgs], gobindings.GetCCVsAndFinalityConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetCCVsAndFinalityConfigArgs, gobindings.GetCCVsAndFinalityConfig, gobindings.MockReceiverV2Interface]{ + Name: "mock-receiver-v2:get-cc-vs-and-finality-config", + Version: Version, + Description: "Calls getCCVsAndFinalityConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.MockReceiverV2Interface, opts *bind.CallOpts, args GetCCVsAndFinalityConfigArgs) (gobindings.GetCCVsAndFinalityConfig, error) { + return c.GetCCVsAndFinalityConfig(opts, args.Arg0, args.Arg1) + }, + }) +} -var SetAllowedFinalityConfig = contract.NewWrite(contract.WriteParams[[4]byte, *MockReceiverV2Contract]{ - Name: "mock-receiver-v2:set-allowed-finality-config", - Version: Version, - Description: "Calls setAllowedFinalityConfig on the contract", - ContractType: ContractType, - ContractABI: MockReceiverV2ABI, - NewContract: NewMockReceiverV2Contract, - IsAllowedCaller: contract.AllCallersAllowed[*MockReceiverV2Contract, [4]byte], - Validate: func([4]byte) error { return nil }, - CallContract: func( - c *MockReceiverV2Contract, - opts *bind.TransactOpts, - args [4]byte, - ) (*types.Transaction, error) { - return c.SetAllowedFinalityConfig(opts, args) - }, -}) +func NewWriteSetAllowedFinalityConfig(c gobindings.MockReceiverV2Interface) *cld_ops.Operation[contract.FunctionInput[[4]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[4]byte, gobindings.MockReceiverV2Interface]{ + Name: "mock-receiver-v2:set-allowed-finality-config", + Version: Version, + Description: "Calls setAllowedFinalityConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.MockReceiverV2MetaData.ABI, + Contract: c, + IsAllowedCaller: contract.AllCallersAllowed[gobindings.MockReceiverV2Interface, [4]byte], + CallContract: func( + c gobindings.MockReceiverV2Interface, + opts *bind.TransactOpts, + args [4]byte, + ) (*types.Transaction, error) { + return c.SetAllowedFinalityConfig(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/offramp/offramp.go b/chains/evm/deployment/v2_0_0/operations/offramp/offramp.go index b3dc964557..9e08e43d83 100644 --- a/chains/evm/deployment/v2_0_0/operations/offramp/offramp.go +++ b/chains/evm/deployment/v2_0_0/operations/offramp/offramp.go @@ -3,197 +3,94 @@ package offramp import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "OffRamp" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const OffRampABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct OffRamp.StaticConfig","components":[{"name":"localChainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"maxGasBufferToUpdateState","type":"uint32","internalType":"uint32"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applySourceChainConfigUpdates","inputs":[{"name":"sourceChainConfigUpdates","type":"tuple[]","internalType":"struct OffRamp.SourceChainConfigArgs[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"onRamps","type":"bytes[]","internalType":"bytes[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"execute","inputs":[{"name":"encodedMessage","type":"bytes","internalType":"bytes"},{"name":"ccvs","type":"address[]","internalType":"address[]"},{"name":"verifierResults","type":"bytes[]","internalType":"bytes[]"},{"name":"gasLimitOverride","type":"uint32","internalType":"uint32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"executeSingleMessage","inputs":[{"name":"message","type":"tuple","internalType":"struct MessageV1Codec.MessageV1","components":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"executionGasLimit","type":"uint32","internalType":"uint32"},{"name":"ccipReceiveGasLimit","type":"uint32","internalType":"uint32"},{"name":"finality","type":"bytes4","internalType":"bytes4"},{"name":"ccvAndExecutorHash","type":"bytes32","internalType":"bytes32"},{"name":"onRampAddress","type":"bytes","internalType":"bytes"},{"name":"offRampAddress","type":"bytes","internalType":"bytes"},{"name":"sender","type":"bytes","internalType":"bytes"},{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"destBlob","type":"bytes","internalType":"bytes"},{"name":"tokenTransfer","type":"tuple[]","internalType":"struct MessageV1Codec.TokenTransferV1[]","components":[{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourceTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"tokenReceiver","type":"bytes","internalType":"bytes"},{"name":"extraData","type":"bytes","internalType":"bytes"}]},{"name":"data","type":"bytes","internalType":"bytes"}]},{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"ccvs","type":"address[]","internalType":"address[]"},{"name":"verifierResults","type":"bytes[]","internalType":"bytes[]"},{"name":"gasLimitOverride","type":"uint32","internalType":"uint32"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllSourceChainConfigs","inputs":[],"outputs":[{"name":"sourceChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"sourceChainConfigs","type":"tuple[]","internalType":"struct OffRamp.SourceChainConfig[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"onRamps","type":"bytes[]","internalType":"bytes[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"getCCVsForMessage","inputs":[{"name":"encodedMessage","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"},{"name":"optionalCCVs","type":"address[]","internalType":"address[]"},{"name":"threshold","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getExecutionState","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint8","internalType":"enum Internal.MessageExecutionState"}],"stateMutability":"view"},{"type":"function","name":"getSourceChainConfig","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"tuple","internalType":"struct OffRamp.SourceChainConfig","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"onRamps","type":"bytes[]","internalType":"bytes[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"}]}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct OffRamp.StaticConfig","components":[{"name":"localChainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"maxGasBufferToUpdateState","type":"uint32","internalType":"uint32"}]}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"event","name":"ExecutionStateChanged","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"messageNumber","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"messageId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"state","type":"uint8","indexed":false,"internalType":"enum Internal.MessageExecutionState"},{"name":"returnData","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"SourceChainConfigSet","inputs":[{"name":"sourceChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sourceConfig","type":"tuple","indexed":false,"internalType":"struct OffRamp.SourceChainConfigArgs","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"onRamps","type":"bytes[]","internalType":"bytes[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"}]}],"anonymous":false},{"type":"event","name":"StaticConfigSet","inputs":[{"name":"staticConfig","type":"tuple","indexed":false,"internalType":"struct OffRamp.StaticConfig","components":[{"name":"localChainSelector","type":"uint64","internalType":"uint64"},{"name":"gasForCallExactCheck","type":"uint16","internalType":"uint16"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"},{"name":"maxGasBufferToUpdateState","type":"uint32","internalType":"uint32"}]}],"anonymous":false},{"type":"error","name":"CanOnlySelfCall","inputs":[]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DuplicateCCVNotAllowed","inputs":[{"name":"ccvAddress","type":"address","internalType":"address"}]},{"type":"error","name":"GasCannotBeZero","inputs":[]},{"type":"error","name":"InboundImplementationNotFound","inputs":[{"name":"ccvAddress","type":"address","internalType":"address"},{"name":"verifierResults","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InsufficientGasToCompleteTx","inputs":[{"name":"err","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidDataLength","inputs":[{"name":"location","type":"uint8","internalType":"enum MessageV1Codec.EncodingErrorLocation"}]},{"type":"error","name":"InvalidEVMAddress","inputs":[{"name":"encodedAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidEncodingVersion","inputs":[{"name":"version","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidGasLimitOverride","inputs":[{"name":"messageGasLimit","type":"uint32","internalType":"uint32"},{"name":"gasLimitOverride","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"InvalidMessageDestChainSelector","inputs":[{"name":"messageDestChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidNumberOfTokens","inputs":[{"name":"numTokens","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidOffRamp","inputs":[{"name":"expected","type":"address","internalType":"address"},{"name":"got","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidOnRamp","inputs":[{"name":"got","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidOptionalThreshold","inputs":[{"name":"wanted","type":"uint8","internalType":"uint8"},{"name":"got","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidVerifierResultsLength","inputs":[{"name":"expected","type":"uint256","internalType":"uint256"},{"name":"got","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustSpecifyDefaultOrRequiredCCVs","inputs":[]},{"type":"error","name":"NoStateProgressMade","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"NotACompatiblePool","inputs":[{"name":"notPool","type":"address","internalType":"address"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OptionalCCVQuorumNotReached","inputs":[{"name":"wanted","type":"uint256","internalType":"uint256"},{"name":"got","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReceiverError","inputs":[{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"RequiredCCVMissing","inputs":[{"name":"requiredCCV","type":"address","internalType":"address"}]},{"type":"error","name":"SkippedAlreadyExecutedMessage","inputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"},{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"},{"name":"messageNumber","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"SourceChainNotEnabled","inputs":[{"name":"sourceChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"TokenHandlingError","inputs":[{"name":"target","type":"address","internalType":"address"},{"name":"err","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroChainSelectorNotAllowed","inputs":[]}]` -const OffRampBin = "0x610120604052346102af57604051601f61618838819003918201601f19168301916001600160401b038311848410176102b45780849260a0946040528339810103126102af576040519060009060a083016001600160401b0381118482101761029b5760405280516001600160401b0381168103610297578352602081015161ffff8116810361029757602084019081526040820151906001600160a01b038216820361029357604085019182526060830151926001600160a01b038416840361028f5760608601938452608001519363ffffffff8516850361028c5760808601948552331561027d57600180546001600160a01b0319163317905582516001600160a01b031615801561026b575b61025c5785516001600160401b03161561024d5761ffff8251161561023e5763ffffffff8551161561023e5785516001600160401b03908116608090815284516001600160a01b0390811660a09081528751821660c052855161ffff90811660e052895163ffffffff90811661010052604080518d519097168752885190921660208701528851841691860191909152885190921660608501528851909116918301919091527f6db4162777b6c980e778bb05a3d9e050f3792b091287ff0d4f3d51bdcd7427db91a1604051615ebd90816102cb823960805181818161013e01526119da015260a0518181816101a10152611901015260c0518181816101dd01528181614b860152615627015260e05181818161016501526150ba01526101005181818161020901526142e70152f35b632855a4d960e11b8152600490fd5b63c656089560e01b8152600490fd5b6342bcdf7f60e11b8152600490fd5b5083516001600160a01b03161561010e565b639b15e16f60e01b8152600490fd5b80fd5b8480fd5b8380fd5b8280fd5b634e487b7160e01b83526041600452602483fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c806306285c69146100d7578063181f5a77146100d257806320f81c88146100cd5780633b81ab9b146100c857806349d8033e146100c35780635215505b146100be5780635643a782146100b957806379ba5097146100b45780638da5cb5b146100af578063d6162963146100aa578063e9d68a8e146100a55763f2fde38b146100a057600080fd5b61115f565b610f9b565b610eda565b610ea6565b610ddb565b610a1e565b610907565b610768565b61068f565b61051b565b610411565b6100ec565b60009103126100e757565b600080fd5b346100e75760006003193601126100e7576000608060405161010d816102dc565b82815282602082015282604082015282606082015201526102a9604051610133816102dc565b67ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016815261ffff7f000000000000000000000000000000000000000000000000000000000000000016602082015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016604082015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016606082015263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016608082015260405191829182919091608063ffffffff8160a084019567ffffffffffffffff815116855261ffff602082015116602086015273ffffffffffffffffffffffffffffffffffffffff604082015116604086015273ffffffffffffffffffffffffffffffffffffffff6060820151166060860152015116910152565b0390f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810190811067ffffffffffffffff8211176102f857604052565b6102ad565b6101c0810190811067ffffffffffffffff8211176102f857604052565b6020810190811067ffffffffffffffff8211176102f857604052565b90601f601f19910116810190811067ffffffffffffffff8211176102f857604052565b6040519061036860c083610336565b565b6040519061036860a083610336565b6040519061036861010083610336565b60405190610368604083610336565b67ffffffffffffffff81116102f857601f01601f191660200190565b604051906103c3602083610336565b60008252565b60005b8381106103dc5750506000910152565b81810151838201526020016103cc565b90601f19601f60209361040a815180928187528780880191016103c9565b0116010190565b346100e75760006003193601126100e7576102a960408051906104348183610336565b600d82527f4f666652616d7020322e302e30000000000000000000000000000000000000006020830152519182916020835260208301906103ec565b9181601f840112156100e75782359167ffffffffffffffff83116100e757602083818601950101116100e757565b906020808351928381520192019060005b8181106104bc5750505090565b825173ffffffffffffffffffffffffffffffffffffffff168452602093840193909201916001016104af565b9161051460ff9161050660409497969760608752606087019061049e565b90858203602087015261049e565b9416910152565b346100e75760206003193601126100e75760043567ffffffffffffffff81116100e75761054f610555913690600401610470565b906137d2565b61014081018051601481510361060b576102a96105fc846105768551611246565b60601c9061058c815167ffffffffffffffff1690565b91610120820151610180830151916105f6816105cb60a08701517fffffffff000000000000000000000000000000000000000000000000000000001690565b956105f06105e760806101a08401515193015163ffffffff1690565b63ffffffff1690565b90613cff565b94613e7d565b604093919351938493846104e8565b610641906040519182917f8d666f6000000000000000000000000000000000000000000000000000000000835260048301611235565b0390fd5b9181601f840112156100e75782359167ffffffffffffffff83116100e7576020808501948460051b0101116100e757565b63ffffffff8116036100e757565b359061036882610676565b346100e75760806003193601126100e75760043567ffffffffffffffff81116100e7576106c0903690600401610470565b9060243567ffffffffffffffff81116100e7576106e1903690600401610645565b926044359367ffffffffffffffff85116100e75761070661071b953690600401610645565b9390926064359561071687610676565b6117e8565b005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6004111561075657565b61071d565b9060048210156107565752565b346100e75760206003193601126100e7576004356000526006602052602060ff6040600020541661079c604051809261075b565bf35b9080602083519182815201916020808360051b8301019401926000915b8383106107ca57505050505090565b90919293946020806107e883601f19866001960301875289516103ec565b970193019301919392906107bb565b6108629173ffffffffffffffffffffffffffffffffffffffff8251168152602082015115156020820152608061085161083f604085015160a0604086015260a085019061079e565b6060850151848203606086015261049e565b92015190608081840391015261049e565b90565b6040810160408252825180915260206060830193019060005b8181106108e7575050506020818303910152815180825260208201916020808360051b8301019401926000915b8383106108ba57505050505090565b90919293946020806108d883601f19866001960301875289516107f7565b970193019301919392906108ab565b825167ffffffffffffffff1685526020948501949092019160010161087e565b346100e75760006003193601126100e75760025461092481611f51565b906109326040519283610336565b808252601f1961094182611f51565b0160005b818110610a0757505061095781611f95565b9060005b8181106109735750506102a960405192839283610865565b806109ab610992610985600194615923565b67ffffffffffffffff1690565b61099c8387612007565b9067ffffffffffffffff169052565b6109eb6109e66109cc6109be8488612007565b5167ffffffffffffffff1690565b67ffffffffffffffff166000526004602052604060002090565b6120cf565b6109f58287612007565b52610a008186612007565b500161095b565b602090610a12611f69565b82828701015201610945565b346100e75760206003193601126100e75760043567ffffffffffffffff81116100e757610a4f903690600401610645565b90610a586143c7565b6000905b828210610a6557005b610a78610a73838584612274565b6123a2565b6020810191610a92610985845167ffffffffffffffff1690565b15610db157610ad4610abb610abb845173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b158015610da4575b610b2b5760808201949060005b86518051821015610b5557610abb610b0483610b1e93612007565b5173ffffffffffffffffffffffffffffffffffffffff1690565b15610b2b57600101610ae9565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050919394929060009260a08601935b84518051821015610b8d57610abb610b0483610b8093612007565b15610b2b57600101610b65565b505095929491909394610ba38651825190614412565b610bb86109cc835167ffffffffffffffff1690565b90610be8610bce845167ffffffffffffffff1690565b67ffffffffffffffff166000526005602052604060002090565b95610bf287615958565b606085019860005b8a518051821015610c4a5790610c1281602093612007565b518051928391012091158015610c3a575b610b2b57610c336001928b615a27565b5001610bfa565b50610c43612457565b8214610c23565b5050976001975093610d61610d9a946003610d8d95610d597f72ec11bb832a18492cf3aafef578325a1e9fc7105b5ba447ca94596fec79393e99610985979f610ca760408e610ca0610ced945160018b01612610565b0151151590565b86547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016178655565b610d4f610d0e8d5173ffffffffffffffffffffffffffffffffffffffff1690565b869073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b51600285016126f5565b5191016126f5565b610d7e610d79610985835167ffffffffffffffff1690565b615996565b505167ffffffffffffffff1690565b9260405191829182612789565b0390a20190610a5c565b5060808201515115610adc565b7fc65608950000000000000000000000000000000000000000000000000000000060005260046000fd5b346100e75760006003193601126100e75760005473ffffffffffffffffffffffffffffffffffffffff81163303610e7c577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346100e75760006003193601126100e757602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346100e75760a06003193601126100e75760043567ffffffffffffffff81116100e7576101c060031982360301126100e7576024359060443567ffffffffffffffff81116100e757610f30903690600401610645565b926064359367ffffffffffffffff85116100e757610f5561071b953690600401610645565b93909260843595610f6587610676565b600401612f24565b67ffffffffffffffff8116036100e757565b359061036882610f6d565b9060206108629281815201906107f7565b346100e75760206003193601126100e75767ffffffffffffffff600435610fc181610f6d565b610fc9611f69565b501660005260046020526040600020604051610fe4816102dc565b60ff825473ffffffffffffffffffffffffffffffffffffffff8116835260a01c16151560208201526001820180549061101c82611f51565b9161102a6040519384610336565b80835260208301916000526020600020916000905b82821061107e576102a98661106d60038a8960408501526110626002820161206e565b60608501520161206e565b608082015260405191829182610f8a565b6040516000855461108e8161201b565b808452906001811690811561110057506001146110c8575b50600192826110ba85946020940382610336565b81520194019101909261103f565b6000878152602081209092505b8183106110ea575050810160200160016110a6565b60018160209254838688010152019201916110d5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b84019091019150600190506110a6565b73ffffffffffffffffffffffffffffffffffffffff8116036100e757565b346100e75760206003193601126100e75773ffffffffffffffffffffffffffffffffffffffff60043561119181611141565b6111996143c7565b1633811461120b57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b9060206108629281815201906103ec565b90602082519201517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116926014811061127e575050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000929350829060140360031b1b161690565b801515036100e757565b908160209103126100e75751610862816112b0565b6040513d6000823e3d90fd5b60409073ffffffffffffffffffffffffffffffffffffffff610862949316815281602082015201906103ec565b92919261131482610398565b916113226040519384610336565b8294818452818301116100e7578281602093846000960137010152565b9060048110156107565760ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008354169116179055565b9080602083519182815201916020808360051b8301019401926000915b8383106113a257505050505090565b909192939460208061142983601f1986600196030187528951908151815260a06114186114066113f46113e28887015160c08a88015260c08701906103ec565b604087015186820360408801526103ec565b606086015185820360608701526103ec565b608085015184820360808601526103ec565b9201519060a08184039101526103ec565b97019301930191939290611393565b9160209082815201919060005b8181106114525750505090565b90919260208060019273ffffffffffffffffffffffffffffffffffffffff873561147b81611141565b168152019401929101611445565b601f8260209493601f19938186528686013760008582860101520116010190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156100e757016020813591019167ffffffffffffffff82116100e75781360383136100e757565b90602083828152019260208260051b82010193836000925b8484106115225750505050505090565b90919293949560208061154a83601f1986600196030188526115448b886114aa565b90611489565b9801940194019294939190611512565b97969491611798906080956117a6956117856103689a9561160a8e60a0815261159060a08201845167ffffffffffffffff169052565b602083015167ffffffffffffffff1660c0820152604083015167ffffffffffffffff1660e0820152606083015163ffffffff16610100820152828c015163ffffffff1661012082015261014060a08401519101907fffffffff00000000000000000000000000000000000000000000000000000000169052565b8d61016060c08301519101528d6101a061175161171b6116e56116af61167961164560e08901516101c06101808a01526102608901906103ec565b6101008901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6089830301888a01526103ec565b6101208801517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60888303016101c08901526103ec565b6101408701517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60878303016101e08801526103ec565b6101608601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60868303016102008701526103ec565b6101808501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6085830301610220860152611376565b920151906102407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60828503019101526103ec565b9260208d01528b830360408d0152611438565b9188830360608a01526114fa565b94019063ffffffff169052565b6040906108629392815281602082015201906103ec565b806117db604092610862959461075b565b81602082015201906103ec565b6001549596919560a01c60ff16611f275761183d740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6001541617600155565b61184786826137d2565b956118e8602061188d6118656109858b5167ffffffffffffffff1690565b60801b7fffffffffffffffffffffffffffffffff000000000000000000000000000000001690565b6040517f2cbc26bb0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116600482015291829081906024820190565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115611f2257600091611ef3575b50611ea85761196061195c6119526109cc8a5167ffffffffffffffff1690565b5460a01c60ff1690565b1590565b611e5d57611979610bce885167ffffffffffffffff1690565b6119a361195c60e08a01928351602081519101209060019160005201602052604060002054151590565b611e2657506101008701516014815114801590611df5575b611dbe5750602087015167ffffffffffffffff1667ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001667ffffffffffffffff821603611d875750878503611d5357610140870151601481510361060b575063ffffffff83168015159081611d36575b50611ce95790611a44913691611308565b6020815191012095611a6a611a63886000526006602052604060002090565b5460ff1690565b94611a748661074c565b85158015611cd6575b15611c6457611b1792611b1c959492611b0992611ad2611aa78c6000526006602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b6040519687957fd61629630000000000000000000000000000000000000000000000000000000060208801528c8c6024890161155a565b03601f198101835282610336565b6142c0565b9181159081611c50575b50611c195715611be7577f8c324ce1367b83031769f6a813e3bb4c117aba2185789d66b98b791405be6df267ffffffffffffffff6002925b611b7b84611b76886000526006602052604060002090565b61133f565b611bb7611ba56040611b95885167ffffffffffffffff1690565b97015167ffffffffffffffff1690565b918360405194859416971695836117ca565b0390a46103687fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60015416600155565b7f8c324ce1367b83031769f6a813e3bb4c117aba2185789d66b98b791405be6df267ffffffffffffffff600392611b5e565b50826106416040519283927f10afb5b6000000000000000000000000000000000000000000000000000000008452600484016117b3565b60039150611c5d8161074c565b1438611b26565b611cd28888611c906040611c80835167ffffffffffffffff1690565b92015167ffffffffffffffff1690565b917f5e570e5100000000000000000000000000000000000000000000000000000000600052929167ffffffffffffffff80926064956004521660245216604452565b6000fd5b50611ce08661074c565b60038614611a7d565b611cd283611cfe60808a015163ffffffff1690565b7fdf2964df0000000000000000000000000000000000000000000000000000000060005263ffffffff90811660045216602452604490565b9050611d4c6105e760808a015163ffffffff1690565b1138611a33565b7f88f80aa2000000000000000000000000000000000000000000000000000000006000526004859052602488905260446000fd5b7f38432a220000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b610641906040519182917f55216e3100000000000000000000000000000000000000000000000000000000835230600484016112db565b50611e08611e0282611246565b60601c90565b73ffffffffffffffffffffffffffffffffffffffff163014156119bb565b61064190516040519182917fa50bd14700000000000000000000000000000000000000000000000000000000835260048301611235565b611cd2611e72885167ffffffffffffffff1690565b7fed053c590000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b611cd2611ebd885167ffffffffffffffff1690565b7ffdbd6a720000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff16600452602490565b611f15915060203d602011611f1b575b611f0d8183610336565b8101906112ba565b38611932565b503d611f03565b6112cf565b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b67ffffffffffffffff81116102f85760051b60200190565b60405190611f76826102dc565b6060608083600081526000602082015282604082015282808201520152565b90611f9f82611f51565b611fac6040519182610336565b828152601f19611fbc8294611f51565b0190602036910137565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8051156120025760200190565b611fc6565b80518210156120025760209160051b010190565b90600182811c92168015612064575b602083101461203557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161202a565b906040519182815491828252602082019060005260206000209260005b8181106120a057505061036892500383610336565b845473ffffffffffffffffffffffffffffffffffffffff1683526001948501948794506020909301920161208b565b906040516120dc816102dc565b809260ff815473ffffffffffffffffffffffffffffffffffffffff8116845260a01c16151560208301526001810180549061211682611f51565b916121246040519384610336565b80835260208301916000526020600020916000905b82821061216e5750505050600360809261216992604086015261215e6002820161206e565b60608601520161206e565b910152565b6040516000855461217e8161201b565b80845290600181169081156121f057506001146121b8575b50600192826121aa85946020940382610336565b815201940191019092612139565b6000878152602081209092505b8183106121da57505081016020016001612196565b60018160209254838688010152019201916121c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208581019190915291151560051b8401909101915060019050612196565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41813603018212156100e7570190565b9015612002578061086291612231565b90821015612002576108629160051b810190612231565b359061036882611141565b3590610368826112b0565b9080601f830112156100e75781602061086293359101611308565b9080601f830112156100e75781356122d381611f51565b926122e16040519485610336565b81845260208085019260051b820101918383116100e75760208201905b83821061230d57505050505090565b813567ffffffffffffffff81116100e757602091612330878480948801016122a1565b8152019101906122fe565b9080601f830112156100e757813561235281611f51565b926123606040519485610336565b81845260208085019260051b8201019283116100e757602001905b8282106123885750505090565b60208091833561239781611141565b81520191019061237b565b60c0813603126100e7576123b4610359565b906123be8161228b565b82526123cc60208201610f7f565b60208301526123dd60408201612296565b6040830152606081013567ffffffffffffffff81116100e75761240390369083016122bc565b6060830152608081013567ffffffffffffffff81116100e757612429903690830161233b565b608083015260a08101359067ffffffffffffffff82116100e75761244f9136910161233b565b60a082015290565b60405160208101906000825260208152612472604082610336565b51902090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181106124b2575050565b600081556001016124a7565b9190601f81116124cd57505050565b610368926000526020600020906020601f840160051c830193106124f9575b601f0160051c01906124a7565b90915081906124ec565b919091825167ffffffffffffffff81116102f85761252b81612525845461201b565b846124be565b6020601f821160011461258957819061257a93949560009261257e575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b9055565b015190503880612548565b601f1982169061259e84600052602060002090565b9160005b8181106125f8575095836001959697106125c1575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690553880806125b7565b9192602060018192868b0151815501940192016125a2565b8151916801000000000000000083116102f8578154838355808410612672575b506020612644910191600052602060002090565b6000915b8383106126555750505050565b600160208261266683945186612503565b01920192019190612648565b8260005283602060002091820191015b81811061268f5750612630565b8061269c6001925461201b565b806126a9575b5001612682565b601f811183146126bf5750600081555b386126a2565b6126e39083601f6126d585600052602060002090565b920160051c820191016124a7565b600081815260208120818355556126b9565b81519167ffffffffffffffff83116102f8576801000000000000000083116102f857602090825484845580851061276c575b500190600052602060002060005b8381106127425750505050565b600190602073ffffffffffffffffffffffffffffffffffffffff8551169401938184015501612735565b6127839084600052858460002091820191016124a7565b38612727565b90610862916020815273ffffffffffffffffffffffffffffffffffffffff825116602082015267ffffffffffffffff602083015116604082015260408201511515606082015260a06128026127ed606085015160c0608086015260e085019061079e565b6080850151601f19858303018486015261049e565b9201519060c0601f198285030191015261049e565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156100e7570180359067ffffffffffffffff82116100e757602001918160051b360383136100e757565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156100e7570180359067ffffffffffffffff82116100e7576020019181360383136100e757565b916020610862938181520191611489565b919091357fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116926014811061127e575050565b3561086281610676565b90821015612002576129229160051b81019061286b565b9091565b908160209103126100e7575161086281611141565b60409073ffffffffffffffffffffffffffffffffffffffff61086295931681528160208201520191611489565b7fffffffff000000000000000000000000000000000000000000000000000000008116036100e757565b359061036882612968565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156100e757016020813591019167ffffffffffffffff82116100e7578160051b360383136100e757565b90602083828152019060208160051b85010193836000915b838310612a185750505050505090565b909192939495601f1982820301865286357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff41843603018112156100e7576020612afb600193868394019081358152612aed612ae2612ac7612aac612a91612a81898801886114aa565b60c08b89015260c0880191611489565b612a9e60408801886114aa565b908783036040890152611489565b612ab960608701876114aa565b908683036060880152611489565b612ad460808601866114aa565b908583036080870152611489565b9260a08101906114aa565b9160a0818503910152611489565b980196019493019190612a08565b612d9f6108629593949260608352612b3560608401612b2783610f7f565b67ffffffffffffffff169052565b612b55612b4460208301610f7f565b67ffffffffffffffff166080850152565b612b75612b6460408301610f7f565b67ffffffffffffffff1660a0850152565b612b91612b8460608301610684565b63ffffffff1660c0850152565b612bad612ba060808301610684565b63ffffffff1660e0850152565b612be6612bbc60a08301612992565b7fffffffff0000000000000000000000000000000000000000000000000000000016610100850152565b60c0810135610120840152612d6e612d62612d23612ce4612ca5612c66612c27612c1360e08901896114aa565b6101c06101408d01526102208c0191611489565b612c356101008901896114aa565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08c8403016101608d0152611489565b612c746101208801886114aa565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08b8403016101808c0152611489565b612cb36101408701876114aa565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08a8403016101a08b0152611489565b612cf26101608601866114aa565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0898403016101c08a0152611489565b612d3161018085018561299d565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888403016101e08901526129f0565b916101a08101906114aa565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa085840301610200860152611489565b9360208201526040818503910152611489565b604051906040820182811067ffffffffffffffff8211176102f85760405260006020838281520152565b90612de682611f51565b612df36040519182610336565b828152601f19612e038294611f51565b019060005b828110612e1457505050565b602090612e1f612db2565b82828501015201612e08565b3561086281610f6d565b3561086281612968565b91909160c0818403126100e757612e54610359565b9281358452602082013567ffffffffffffffff81116100e75781612e799184016122a1565b6020850152604082013567ffffffffffffffff81116100e75781612e9e9184016122a1565b6040850152606082013567ffffffffffffffff81116100e75781612ec39184016122a1565b6060850152608082013567ffffffffffffffff81116100e75781612ee89184016122a1565b608085015260a082013567ffffffffffffffff81116100e757612f0b92016122a1565b60a0830152565b91908203918211612f1f57565b612478565b9391959694909294303303613423576000612f43610180870187612817565b9050613344575b612f95612f67611e02612f616101408a018a61286b565b906128cd565b98612f8b8a612f7a6101a08b018b61286b565b90506105f06105e760808d01612901565b9889918b8a614719565b98909960005b8b518110156131585761300a60208c612fd38f85612fc5610abb610abb610b0484612fcb96612007565b93612007565b518a8c61290b565b91906040518095819482937fc3a7ded6000000000000000000000000000000000000000000000000000000008452600484016128bc565b03915afa8015611f225773ffffffffffffffffffffffffffffffffffffffff9160009161312a575b50169081156130cd57613050613048828e612007565b51888a61290b565b9290813b156100e7576000918b838e613098604051988996879586947f89e364c700000000000000000000000000000000000000000000000000000000865260048601612b09565b03925af1918215611f22576001926130b2575b5001612f9b565b806130c160006130c793610336565b806100dc565b386130ab565b8b6130f5898f6130ee856130e8610b04610641988f95612007565b95612007565b519161290b565b6040939193519384937f2665cea20000000000000000000000000000000000000000000000000000000085526004850161293b565b61314b915060203d8111613151575b6131438183610336565b810190612926565b38613032565b503d613139565b50959793509593509650965061317c613175610180840184612817565b9050612ddc565b9561318b610180840184612817565b9050613232575b5061322b57610368946131fb6131a783612e2b565b6131e86131ef6131bb61012087018761286b565b6131c96101a089018961286b565b9490956131d461036a565b9c8d5267ffffffffffffffff1660208d0152565b3691611308565b60408901523691611308565b6060860152608085015263ffffffff821615613218575091615022565b6132259150608001612901565b91615022565b5050505050565b61328c61324c613246610180860186612817565b90612264565b61325a61012086018661286b565b61328661326688612e2b565b9261327e61327660a08b01612e35565b953690612e3f565b923691611308565b90614af1565b919061329789611ff5565b5273ffffffffffffffffffffffffffffffffffffffff6132d1611e02612f616132c76132466101808a018a612817565b608081019061286b565b921673ffffffffffffffffffffffffffffffffffffffff8316036132f6575b50613192565b61332a61332f926133246133098b611ff5565b515173ffffffffffffffffffffffffffffffffffffffff1690565b906145a7565b612f12565b602061333a88611ff5565b51015238806132f0565b50601461336561335b613246610180890189612817565b606081019061286b565b90500361340f5760146133826132c7613246610180890189612817565b9050036133c5576133c06133a6611e02612f616132c76132466101808b018b612817565b613324611e02612f6161335b6132466101808c018c612817565b612f4a565b6133d96132c7613246610180880188612817565b906106416040519283927f8d666f60000000000000000000000000000000000000000000000000000000008452600484016128bc565b6133d961335b613246610180880188612817565b7f371a73280000000000000000000000000000000000000000000000000000000060005260046000fd5b6040519061345a826102fd565b60606101a08360008152600060208201526000604082015260008382015260006080820152600060a0820152600060c08201528260e082015282610100820152826101208201528261014082015282610160820152826101808201520152565b90156120025790565b90604510156120025760450190565b90821015612002570190565b906009116100e75760010190600890565b906011116100e75760090190600890565b906019116100e75760110190600890565b90601d116100e75760190190600490565b906021116100e757601d0190600490565b906025116100e75760210190600490565b906045116100e75760250190602090565b90929192836046116100e75783116100e757604601917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffba0190565b909392938483116100e75784116100e7578101920390565b919091357fffffffffffffffff000000000000000000000000000000000000000000000000811692600881106135dc575050565b7fffffffffffffffff000000000000000000000000000000000000000000000000929350829060080360031b1b161690565b919091357fffffffff0000000000000000000000000000000000000000000000000000000081169260048110613642575050565b7fffffffff00000000000000000000000000000000000000000000000000000000929350829060040360031b1b161690565b359060208110613682575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060200360031b1b1690565b919091357fffff000000000000000000000000000000000000000000000000000000000000811692600281106136e3575050565b7fffff000000000000000000000000000000000000000000000000000000000000929350829060020360031b1b161690565b6040519060c0820182811067ffffffffffffffff8211176102f857604052606060a0836000815282602082015282604082015282808201528260808201520152565b604080519091906137688382610336565b6001815291601f19018260005b82811061378157505050565b60209061378c613715565b82828501015201613775565b604051906137a7602083610336565b600080835282815b8281106137bb57505050565b6020906137c6613715565b828285010152016137af565b906137db61344d565b91604f8210613ce75761382061381a6137f484846134ba565b357fff000000000000000000000000000000000000000000000000000000000000001690565b60f81c90565b600160ff821603613cb7575061385961384b61384561383f85856134de565b906135a8565b60c01c90565b67ffffffffffffffff168452565b61387d61386c61384561383f85856134ef565b67ffffffffffffffff166020850152565b6138a161389061384561383f8585613500565b67ffffffffffffffff166040850152565b6138cd6138c06138ba6138b48585613511565b9061360e565b60e01c90565b63ffffffff166060850152565b6138ed6138e06138ba6138b48585613522565b63ffffffff166080850152565b6139266138fd6138b48484613533565b7fffffffff000000000000000000000000000000000000000000000000000000001660a0850152565b6139396139338383613544565b90613674565b60c08401528160451015613ca15761396061395a61381a6137f485856134c3565b60ff1690565b9081604601838111613c8b5761397a6131e8828685613555565b60e086015283811015613c755761395a61381a6137f461399b9387866134d2565b8201916047830190848211613c60576131e88260476139bc93018786613590565b61010086015283811015613c4a576139e061395a61381a6137f460479488876134d2565b830101916001830190848211613c34576131e8826048613a0293018786613590565b61012086015283811015613c1e57613a2661395a61381a6137f460019488876134d2565b830101916001830190848211613c08576131e8826002613a4893018786613590565b6101408601526003830192848411613bf257613a84613a7d613a77613a71876001968a89613590565b906136af565b60f01c90565b61ffff1690565b0101916002830190848211613bdc576131e882613aa2928786613590565b6101608601526004830190848211613bc657613a77613a7183613ac6938887613590565b9261ffff8294168015600014613b7557505050613ae1613798565b6101808501525b6002820191838311613b5f5780613b0c613a7d613a77613a71876002968a89613590565b010191838311613b4957826131e89185613b2594613590565b6101a084015203613b335790565b635a102da160e11b600052600f60045260246000fd5b635a102da160e11b600052600e60045260246000fd5b635a102da160e11b600052600d60045260246000fd5b6002919294508190613b98613b88613757565b966101808a01978852888761515f565b9490965196613ba78698611ff5565b5201010114613ae857635a102da160e11b600052600c60045260246000fd5b635a102da160e11b600052600b60045260246000fd5b635a102da160e11b600052600a60045260246000fd5b635a102da160e11b600052600960045260246000fd5b635a102da160e11b600052600860045260246000fd5b635a102da160e11b600052600760045260246000fd5b635a102da160e11b600052600660045260246000fd5b635a102da160e11b600052600560045260246000fd5b635a102da160e11b6000526004805260246000fd5b635a102da160e11b600052600360045260246000fd5b635a102da160e11b600052600260045260246000fd5b635a102da160e11b600052600160045260246000fd5b7f789d32630000000000000000000000000000000000000000000000000000000060005260ff1660045260246000fd5b635a102da160e11b600052611cd26024906000600452565b15919082613d7d575b508115613d73575b8115613d1a575090565b9050613d467f85572ffb0000000000000000000000000000000000000000000000000000000082615ba9565b9081613d61575b81613d5757501590565b61195c9150615b49565b9050613d6c81615a83565b1590613d4d565b803b159150613d10565b15915038613d08565b60405190613d95602083610336565b6000808352366020840137565b60408051909190613db38382610336565b6001815291601f1901366020840137565b9060018201809211612f1f57565b91908201809211612f1f57565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612f1f5760010190565b80548210156120025760005260206000200190600090565b8015612f1f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60ff168015612f1f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b9594936060936000939092613e90613d86565b96845180614244575b50156142285750509051159050614217575050613eb4613d86565b613ebc613d86565b936000925b6002613f026003613ee68567ffffffffffffffff166000526004602052604060002090565b019367ffffffffffffffff166000526004602052604060002090565b01825495815495613f2b613f2688613f218b613f218b518a5190613dd2565b613dd2565b611f95565b9889976000805b8951821015613f855790613f7d600192613f62613f52610b04858f612007565b91613f5c81613ddf565b9e612007565b9073ffffffffffffffffffffffffffffffffffffffff169052565b018b99613f32565b919395979a9294969850506000905b8851821015613fcc5790613fc4600192613f62613fb4610b04858e612007565b91613fbe81613ddf565b9d612007565b018a98613f94565b959893969991929497505060005b8281106141e4575050505060005b828110614160575b50509091929350600090815b8181106140be5750508452805160005b85518110156140b85760005b828110614029575b5060010161400c565b614036610b048286612007565b73ffffffffffffffffffffffffffffffffffffffff61405b610abb610b04868c612007565b9116146140705761406b90613ddf565b614018565b9161407d61409591613e24565b92613f6261408e610b048688612007565b9186612007565b60ff84166140a4575b38614020565b926140b0600191613e4f565b93905061409e565b50815291565b6140cb610b048289612007565b73ffffffffffffffffffffffffffffffffffffffff8116801561415657600090815b8a878210614129575b50505090600192911561410c575b505b01613ffc565b61412390613f6261411c87613ddf565b968b612007565b38614104565b61413a610abb610b04848694612007565b14614147576001016140ed565b5060019150819050388a6140f6565b5050600190614106565b614170610abb610b04838b612007565b1561417d57600101613fe8565b50909192939460005b82811061419857869594939250613ff0565b806141de6141cb6141ab60019486613e0c565b905473ffffffffffffffffffffffffffffffffffffffff9160031b1c1690565b613f626141d788613ddf565b978c612007565b01614186565b61420d82939496613f626141fd6141ab85600197613e0c565b9161420781613ddf565b99612007565b0190899291613fda565b919093614222613da2565b91613ec1565b919350915061423a93508694966157cd565b9094909290613ec1565b90975060018103614293575061428c61426b611e028861426388611ff5565b510151611246565b8461427587611ff5565b51518c60a06142838a611ff5565b510151936155bd565b9638613e99565b7f83d526690000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90604051916142d060c084610336565b60848352602083019060a03683375a9063ffffffff7f00000000000000000000000000000000000000000000000000000000000000001690818311156143495761431e600093928493612f12565b82602083519301913090f1903d9060848211614340575b6000908286523e9190565b60849150614335565b611cd27fffffffff0000000000000000000000000000000000000000000000000000000063ffffffff5a1660e01b167f2882569d00000000000000000000000000000000000000000000000000000000600052907fffffffff0000000000000000000000000000000000000000000000000000000060249216600452565b73ffffffffffffffffffffffffffffffffffffffff6001541633036143e857565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b805191614420815184613dd2565b92831561454d5760005b848110614438575050505050565b818110156145325761444d610b048286612007565b73ffffffffffffffffffffffffffffffffffffffff81168015610b2b5761447383613dc4565b8781106144855750505060010161442a565b848110156145025773ffffffffffffffffffffffffffffffffffffffff6144af610b04838a612007565b1682146144be57600101614473565b7fa1726e400000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff831660045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff61452d610b046145278885612f12565b89612007565b6144af565b614548610b046145428484612f12565b85612007565b61444d565b7f7b6c02970000000000000000000000000000000000000000000000000000000060005260046000fd5b3d156145a2573d9061458882610398565b916145966040519384610336565b82523d6000602084013e565b606090565b91909173ffffffffffffffffffffffffffffffffffffffff604051917f70a0823100000000000000000000000000000000000000000000000000000000835216600482015260208160248173ffffffffffffffffffffffffffffffffffffffff87165afa6000918161465c575b506146585782614622614577565b906106416040519283927f9fe2f95a000000000000000000000000000000000000000000000000000000008452600484016112db565b9150565b90916020823d60201161468b575b8161467760209383610336565b810103126146885750519038614614565b80fd5b3d915061466a565b92919061469f81611f51565b936146ad6040519586610336565b602085838152019160051b8101918383116100e75781905b8382106146d3575050505050565b813567ffffffffffffffff81116100e7576020916146f48784938701612e3f565b8152019101906146c5565b91908110156120025760051b0190565b3561086281611141565b6147659060a06147739495969361476d61473284612e2b565b9361474161012082018261286b565b969061475d614754610180850185612817565b97909401612e35565b973691611308565b933691614693565b92613e7d565b9193909261478082611f95565b9261478a83611f95565b94600091825b8851811015614884576000805b8a88848982851061480d575b5050505050156147bb57600101614790565b6147cb610b04611cd2928b612007565b7f518d2ac50000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff16600452602490565b610b0461483f926130e861483a8873ffffffffffffffffffffffffffffffffffffffff97610abb966146ff565b61470f565b91161461484e5760010161479d565b6001915061486d61486361483a838b8b6146ff565b613f62888c612007565b61487961411c87613ddf565b52388a8884896147a9565b509097965094939291909460ff811690816000985b8a518a10156149565760005b8b8782108061494d575b156149405773ffffffffffffffffffffffffffffffffffffffff6148e1610abb610b048f6130e861483a888f8f6146ff565b9116146148f6576148f190613ddf565b6148a5565b939961490660019294939b613e24565b9461492261491861483a838b8b6146ff565b613f628d8c612007565b61493561492e8c613ddf565b9b8b612007565b525b01989091614899565b5050919098600190614937565b508515156148af565b98509250939594975091508161497f575050508151810361497657509190565b80825283529190565b611cd2929161498d91612f12565b7f403b06ae0000000000000000000000000000000000000000000000000000000060005260ff909116600452602452604490565b604051906103c38261031a565b908160209103126100e757604051906149e68261031a565b51815290565b6108629160e0614a96614a84614a0d855161010086526101008601906103ec565b60208681015167ffffffffffffffff169086015260408681015173ffffffffffffffffffffffffffffffffffffffff169086015260608601516060860152614a726080870151608087019073ffffffffffffffffffffffffffffffffffffffff169052565b60a086015185820360a08701526103ec565b60c085015184820360c08601526103ec565b9201519060e08184039101526103ec565b9060206108629281815201906149ec565b907fffffffff000000000000000000000000000000000000000000000000000000006105146020929594956040855260408501906149ec565b92939193614afd612db2565b50614b0e611e026080860151611246565b91614b1f611e026060870151611246565b6040517fbbe4f6db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909690956020878060248101038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa968715611f2257600097614e4e575b5073ffffffffffffffffffffffffffffffffffffffff8716948515614e0a57614bde6149c1565b50614c2c825191614c0f60a0602086015195015195614bfb610379565b97885267ffffffffffffffff166020880152565b73ffffffffffffffffffffffffffffffffffffffff166040860152565b606084015273ffffffffffffffffffffffffffffffffffffffff8816608084015260a083015260c0820152614c5f6103b4565b60e0820152614c6d8561540f565b15614d335790614cb19260209260006040518096819582947f2cab0fb600000000000000000000000000000000000000000000000000000000845260048401614ab8565b03925af160009181614d02575b50614ccc5783614622614577565b929091925b51614cf9614cdd610389565b73ffffffffffffffffffffffffffffffffffffffff9093168352565b60208201529190565b614d2591925060203d602011614d2c575b614d1d8183610336565b8101906149ce565b9038614cbe565b503d614d13565b9050614d3e84615465565b15614dc657614d816000926020926040519485809481937f3907753700000000000000000000000000000000000000000000000000000000835260048301614aa7565b03925af160009181614da5575b50614d9c5783614622614577565b92909192614cd1565b614dbf91925060203d602011614d2c57614d1d8183610336565b9038614d8e565b7fae9b4ce90000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff841660045260246000fd5b7fae9b4ce90000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff881660045260246000fd5b614e6891975060203d602011613151576131438183610336565b9538614bb7565b90916060828403126100e7578151614e86816112b0565b92602083015167ffffffffffffffff81116100e75783019080601f830112156100e757815191614eb583610398565b91614ec36040519384610336565b838352602084830101116100e757604092614ee491602080850191016103c9565b92015190565b9194939290608083528051608084015267ffffffffffffffff60208201511660a08401526080614f61614f2d604084015160a060c08801526101208701906103ec565b60608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808783030160e08801526103ec565b910151907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80848203016101008501526020808351928381520192019060005b818110614fea5750505061ffff90951660208301526103689291606091614fce9063ffffffff166040830152565b019073ffffffffffffffffffffffffffffffffffffffff169052565b8251805173ffffffffffffffffffffffffffffffffffffffff1685526020908101518186015260409094019390920191600101614fa0565b906000916150e3938361508a73ffffffffffffffffffffffffffffffffffffffff61506f67ffffffffffffffff60208701511667ffffffffffffffff166000526004602052604060002090565b541673ffffffffffffffffffffffffffffffffffffffff1690565b92604051968795869485937f3cf979830000000000000000000000000000000000000000000000000000000085527f00000000000000000000000000000000000000000000000000000000000000009060048601614eea565b03925af1908115611f2257600090600092615138575b50156151025750565b610641906040519182917f0a8d6e8c00000000000000000000000000000000000000000000000000000000835260048301611235565b905061515791503d806000833e61514f8183610336565b810190614e6f565b5090386150f9565b9291615169613715565b91808210156153f95761518361381a6137f48484896134d2565b600160ff821603613cb75750602182018181116153e3576151ac6139338260018601858a613590565b8452818110156153cd5761395a61381a6137f46151ca93858a6134d2565b82019160228301908282116153b7576131e88260226151eb9301858a613590565b6020850152818110156153a15761520e61395a61381a6137f4602294868b6134d2565b83010191600183019082821161538b576131e88260236152309301858a613590565b6040850152818110156153755761525361395a61381a6137f4600194868b6134d2565b83010191600183019082821161535f576131e88260026152759301858a613590565b6060850152818110156153495761529861395a61381a6137f4600194868b6134d2565b8301016001810192828411615333576131e88460026152b99301858a613590565b6080850152600381019282841161531d576002916152e4613a7d613a77613a7188600196898e613590565b01010194818611615307576152fe926131e8928792613590565b60a08201529190565b635a102da160e11b600052601b60045260246000fd5b635a102da160e11b600052601a60045260246000fd5b635a102da160e11b600052601960045260246000fd5b635a102da160e11b600052601860045260246000fd5b635a102da160e11b600052601760045260246000fd5b635a102da160e11b600052601660045260246000fd5b635a102da160e11b600052601560045260246000fd5b635a102da160e11b600052601460045260246000fd5b635a102da160e11b600052601360045260246000fd5b635a102da160e11b600052601260045260246000fd5b635a102da160e11b600052601160045260246000fd5b635a102da160e11b600052601060045260246000fd5b6154397f940a15420000000000000000000000000000000000000000000000000000000082615ba9565b9081615453575b81615449575090565b6108629150615b49565b905061545e81615a83565b1590615440565b6154397faff2afbf0000000000000000000000000000000000000000000000000000000082615ba9565b6154397f1bfc84d00000000000000000000000000000000000000000000000000000000082615ba9565b9080601f830112156100e75781516154d081611f51565b926154de6040519485610336565b81845260208085019260051b8201019283116100e757602001905b8282106155065750505090565b60208091835161551581611141565b8152019101906154f9565b906020828203126100e757815167ffffffffffffffff81116100e75761086292016154b9565b95949060019460a09467ffffffffffffffff6155b89573ffffffffffffffffffffffffffffffffffffffff7fffffffff0000000000000000000000000000000000000000000000000000000095168b521660208a0152604089015216606087015260c0608087015260c08601906103ec565b930152565b6040517fbbe4f6db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152606095909291906020848060248101038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa938415611f2257600094615721575b506156628461540f565b615680575b5050505050508051156156775790565b50610862613da2565b6000959650906156d573ffffffffffffffffffffffffffffffffffffffff92604051988997889687957f06b859ef00000000000000000000000000000000000000000000000000000000875260048701615546565b0392165afa908115611f22576000916156fe575b506156f381615c0b565b388080808080615667565b61571b91503d806000833e6157138183610336565b810190615520565b386156e9565b61573b91945060203d602011613151576131438183610336565b9238615658565b9190916080818403126100e757805167ffffffffffffffff81116100e7578361576c9183016154b9565b9260208201519067ffffffffffffffff82116100e75761578d9183016154b9565b91604082015160ff811681036100e75760609092015161086281612968565b60409067ffffffffffffffff610862949316815281602082015201906103ec565b606093600093859385936157e08261548f565b61582a575b505050906157f291615cc9565b80511580159061581e575b61581b5750505061580c613da2565b90615815613d86565b90600090565b92565b5060ff821615156157fd565b9091929450615881965083955073ffffffffffffffffffffffffffffffffffffffff6040518098819582947f1bfc84d0000000000000000000000000000000000000000000000000000000008452600484016157ac565b0392165afa908115611f2257829183948480926158f5575b50509083856158a785615c0b565b6158b081615c0b565b51908160ff8216116158c257806157e5565b7f3d9055a70000000000000000000000000000000000000000000000000000000060005260ff1660045260245260446000fd5b92955092505061591792503d8091833e61590f8183610336565b810190615742565b91939092913880615899565b6002548110156120025760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace015490565b805460005b81811061596c57505060009055565b8061597960019285613e0c565b90549060031b1c600052818401602052600060408120550161595d565b600081815260036020526040902054615a2157600254680100000000000000008110156102f857615a086159d38260018594016002556002613e0c565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055600254906000526003602052604060002055600190565b50600090565b6000828152600182016020526040902054615a7c57805490680100000000000000008210156102f85782615a656159d3846001809601855584613e0c565b905580549260005201602052604060002055600190565b5050600090565b60405160208101917f01ffc9a70000000000000000000000000000000000000000000000000000000083527fffffffff00000000000000000000000000000000000000000000000000000000602483015260248252615ae3604483610336565b6179185a10615b1f576020926000925191617530fa6000513d82615b13575b5081615b0c575090565b9050151590565b60201115915038615b02565b7fea7f4b120000000000000000000000000000000000000000000000000000000060005260046000fd5b60405160208101917f01ffc9a70000000000000000000000000000000000000000000000000000000083527f01ffc9a700000000000000000000000000000000000000000000000000000000602483015260248252615ae3604483610336565b604051907fffffffff0000000000000000000000000000000000000000000000000000000060208301937f01ffc9a700000000000000000000000000000000000000000000000000000000855216602483015260248252615ae3604483610336565b80519060005b828110615c1d57505050565b60018101808211612f1f575b838110615c395750600101615c11565b73ffffffffffffffffffffffffffffffffffffffff615c588385612007565b5116615c6a610abb610b048487612007565b14615c7757600101615c29565b611cd2615c87610b048486612007565b7fa1726e400000000000000000000000000000000000000000000000000000000060005273ffffffffffffffffffffffffffffffffffffffff16600452602490565b7fffffffff00000000000000000000000000000000000000000000000000000000811615615da957615cfa81615dad565b601082811c9082901c167dffff0000000000000000000000000000000000000000000000000000000016615da95761ffff8260e01c168015908115615d98575b50615d43575050565b7fdf63778f000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000009081166004521660245260446000fd5b905061ffff8260e01c161038615d3a565b5050565b7fffffffff00000000000000000000000000000000000000000000000000000000811615615ead577dffff00000000000000000000000000000000000000000000000000000000811615615ea45760ff60015b1660f082901c80615e66575b50600103615e175750565b7fc512f96c000000000000000000000000000000000000000000000000000000006000527fffffffff000000000000000000000000000000000000000000000000000000001660045260246000fd5b60005b60108110615e775750615e0c565b63ffffffff6001821b831616615e90575b600101615e69565b91615e9c600191613dc4565b929050615e88565b60ff6000615e00565b5056fea164736f6c634300081a000a" - -type OffRampContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewOffRampContract( - address common.Address, - backend bind.ContractBackend, -) (*OffRampContract, error) { - parsed, err := abi.JSON(strings.NewReader(OffRampABI)) - if err != nil { - return nil, err - } - return &OffRampContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *OffRampContract) Address() common.Address { - return c.address -} - -func (c *OffRampContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *OffRampContract) ApplySourceChainConfigUpdates(opts *bind.TransactOpts, args []SourceChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applySourceChainConfigUpdates", args) -} - -func (c *OffRampContract) GetSourceChainConfig(opts *bind.CallOpts, args uint64) (SourceChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getSourceChainConfig", args) - if err != nil { - var zero SourceChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(SourceChainConfig)).(*SourceChainConfig), nil -} - -func (c *OffRampContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -func (c *OffRampContract) GetAllSourceChainConfigs(opts *bind.CallOpts) (GetAllSourceChainConfigsResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllSourceChainConfigs") - outstruct := new(GetAllSourceChainConfigsResult) - if err != nil { - return *outstruct, err - } - - outstruct.SourceChainSelectors = *abi.ConvertType(out[0], new([]uint64)).(*[]uint64) - outstruct.SourceChainConfigs = *abi.ConvertType(out[1], new([]SourceChainConfig)).(*[]SourceChainConfig) - - return *outstruct, nil -} - -type GetAllSourceChainConfigsResult struct { - SourceChainSelectors []uint64 - SourceChainConfigs []SourceChainConfig -} - -type SourceChainConfig struct { - Router common.Address - IsEnabled bool - OnRamps [][]byte - DefaultCCVs []common.Address - LaneMandatedCCVs []common.Address -} - -type SourceChainConfigArgs struct { - Router common.Address - SourceChainSelector uint64 - IsEnabled bool - OnRamps [][]byte - DefaultCCVs []common.Address - LaneMandatedCCVs []common.Address -} - -type StaticConfig struct { - LocalChainSelector uint64 - GasForCallExactCheck uint16 - RmnRemote common.Address - TokenAdminRegistry common.Address - MaxGasBufferToUpdateState uint32 -} - type ConstructorArgs struct { - StaticConfig StaticConfig + StaticConfig gobindings.OffRampStaticConfig `json:"staticConfig"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "offramp:deploy", - Version: Version, - Description: "Deploys the OffRamp contract", - ContractMetadata: &bind.MetaData{ - ABI: OffRampABI, - Bin: OffRampBin, - }, + Name: "offramp:deploy", + Version: Version, + Description: "Deploys the OffRamp contract", + ContractMetadata: gobindings.OffRampMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(OffRampBin), + EVM: common.FromHex(gobindings.OffRampMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ApplySourceChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]SourceChainConfigArgs, *OffRampContract]{ - Name: "offramp:apply-source-chain-config-updates", - Version: Version, - Description: "Calls applySourceChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: OffRampABI, - NewContract: NewOffRampContract, - IsAllowedCaller: contract.OnlyOwner[*OffRampContract, []SourceChainConfigArgs], - Validate: func([]SourceChainConfigArgs) error { return nil }, - CallContract: func( - c *OffRampContract, - opts *bind.TransactOpts, - args []SourceChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplySourceChainConfigUpdates(opts, args) - }, -}) +func NewWriteApplySourceChainConfigUpdates(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.OffRampSourceChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.OffRampSourceChainConfigArgs, gobindings.OffRampInterface]{ + Name: "offramp:apply-source-chain-config-updates", + Version: Version, + Description: "Calls applySourceChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.OffRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OffRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.OffRampSourceChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OffRampInterface, + opts *bind.TransactOpts, + args []gobindings.OffRampSourceChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplySourceChainConfigUpdates(opts, args) + }, + }) +} -var GetSourceChainConfig = contract.NewRead(contract.ReadParams[uint64, SourceChainConfig, *OffRampContract]{ - Name: "offramp:get-source-chain-config", - Version: Version, - Description: "Calls getSourceChainConfig on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args uint64) (SourceChainConfig, error) { - return c.GetSourceChainConfig(opts, args) - }, -}) +func NewReadGetSourceChainConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.OffRampSourceChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.OffRampSourceChainConfig, gobindings.OffRampInterface]{ + Name: "offramp:get-source-chain-config", + Version: Version, + Description: "Calls getSourceChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args uint64) (gobindings.OffRampSourceChainConfig, error) { + return c.GetSourceChainConfig(opts, args) + }, + }) +} -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *OffRampContract]{ - Name: "offramp:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) +func NewReadGetStaticConfig(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OffRampStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OffRampStaticConfig, gobindings.OffRampInterface]{ + Name: "offramp:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OffRampStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} -var GetAllSourceChainConfigs = contract.NewRead(contract.ReadParams[struct{}, GetAllSourceChainConfigsResult, *OffRampContract]{ - Name: "offramp:get-all-source-chain-configs", - Version: Version, - Description: "Calls getAllSourceChainConfigs on the contract", - ContractType: ContractType, - NewContract: NewOffRampContract, - CallContract: func(c *OffRampContract, opts *bind.CallOpts, args struct{}) (GetAllSourceChainConfigsResult, error) { - return c.GetAllSourceChainConfigs(opts) - }, -}) +func NewReadGetAllSourceChainConfigs(c gobindings.OffRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.GetAllSourceChainConfigs, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.GetAllSourceChainConfigs, gobindings.OffRampInterface]{ + Name: "offramp:get-all-source-chain-configs", + Version: Version, + Description: "Calls getAllSourceChainConfigs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OffRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.GetAllSourceChainConfigs, error) { + return c.GetAllSourceChainConfigs(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/onramp/onramp.go b/chains/evm/deployment/v2_0_0/operations/onramp/onramp.go index 8e413bd335..b8f487961e 100644 --- a/chains/evm/deployment/v2_0_0/operations/onramp/onramp.go +++ b/chains/evm/deployment/v2_0_0/operations/onramp/onramp.go @@ -3,249 +3,137 @@ package onramp import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "OnRamp" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const OnRampABI = `[{"type":"constructor","inputs":[{"name":"staticConfig","type":"tuple","internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"maxUSDCentsPerMessage","type":"uint32","internalType":"uint32"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]},{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"feeAggregator","type":"address","internalType":"address"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyDestChainConfigUpdates","inputs":[{"name":"destChainConfigArgs","type":"tuple[]","internalType":"struct OnRamp.DestChainConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"addressBytesLength","type":"uint8","internalType":"uint8"},{"name":"tokenReceiverAllowed","type":"bool","internalType":"bool"},{"name":"messageNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"tokenNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"baseExecutionGasCost","type":"uint32","internalType":"uint32"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"},{"name":"defaultExecutor","type":"address","internalType":"address"},{"name":"offRamp","type":"bytes","internalType":"bytes"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"forwardFromRouter","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"originalSender","type":"address","internalType":"address"}],"outputs":[{"name":"messageId","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"type":"function","name":"getAllDestChainConfigs","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"},{"name":"","type":"tuple[]","internalType":"struct OnRamp.DestChainConfig[]","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"addressBytesLength","type":"uint8","internalType":"uint8"},{"name":"tokenReceiverAllowed","type":"bool","internalType":"bool"},{"name":"messageNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"tokenNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"baseExecutionGasCost","type":"uint32","internalType":"uint32"},{"name":"defaultExecutor","type":"address","internalType":"address"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"offRamp","type":"bytes","internalType":"bytes"}]}],"stateMutability":"view"},{"type":"function","name":"getDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"destChainConfig","type":"tuple","internalType":"struct OnRamp.DestChainConfig","components":[{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"messageNumber","type":"uint64","internalType":"uint64"},{"name":"addressBytesLength","type":"uint8","internalType":"uint8"},{"name":"tokenReceiverAllowed","type":"bool","internalType":"bool"},{"name":"messageNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"tokenNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"baseExecutionGasCost","type":"uint32","internalType":"uint32"},{"name":"defaultExecutor","type":"address","internalType":"address"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"offRamp","type":"bytes","internalType":"bytes"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"feeAggregator","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getExpectedNextMessageNumber","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"message","type":"tuple","internalType":"struct Client.EVM2AnyMessage","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"data","type":"bytes","internalType":"bytes"},{"name":"tokenAmounts","type":"tuple[]","internalType":"struct Client.EVMTokenAmount[]","components":[{"name":"token","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}]},{"name":"feeToken","type":"address","internalType":"address"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getPoolBySourceToken","inputs":[{"name":"","type":"uint64","internalType":"uint64"},{"name":"sourceToken","type":"address","internalType":"contract IERC20"}],"outputs":[{"name":"","type":"address","internalType":"contract IPoolV1"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"maxUSDCentsPerMessage","type":"uint32","internalType":"uint32"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getSupportedTokens","inputs":[{"name":"","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"pure"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"dynamicConfig","type":"tuple","internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"feeAggregator","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"CCIPMessageSent","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"sender","type":"address","indexed":true,"internalType":"address"},{"name":"messageId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"feeToken","type":"address","indexed":false,"internalType":"address"},{"name":"tokenAmountBeforeTokenPoolFees","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"encodedMessage","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"receipts","type":"tuple[]","indexed":false,"internalType":"struct OnRamp.Receipt[]","components":[{"name":"issuer","type":"address","internalType":"address"},{"name":"destGasLimit","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"feeTokenAmount","type":"uint256","internalType":"uint256"},{"name":"extraArgs","type":"bytes","internalType":"bytes"}]},{"name":"verifierBlobs","type":"bytes[]","indexed":false,"internalType":"bytes[]"}],"anonymous":false},{"type":"event","name":"ConfigSet","inputs":[{"name":"staticConfig","type":"tuple","indexed":false,"internalType":"struct OnRamp.StaticConfig","components":[{"name":"chainSelector","type":"uint64","internalType":"uint64"},{"name":"rmnRemote","type":"address","internalType":"contract IRMNRemote"},{"name":"maxUSDCentsPerMessage","type":"uint32","internalType":"uint32"},{"name":"tokenAdminRegistry","type":"address","internalType":"address"}]},{"name":"dynamicConfig","type":"tuple","indexed":false,"internalType":"struct OnRamp.DynamicConfig","components":[{"name":"feeQuoter","type":"address","internalType":"address"},{"name":"reentrancyGuardEntered","type":"bool","internalType":"bool"},{"name":"feeAggregator","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"event","name":"DestChainConfigSet","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"messageNumber","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"config","type":"tuple","indexed":false,"internalType":"struct OnRamp.DestChainConfigArgs","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"router","type":"address","internalType":"contract IRouter"},{"name":"addressBytesLength","type":"uint8","internalType":"uint8"},{"name":"tokenReceiverAllowed","type":"bool","internalType":"bool"},{"name":"messageNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"tokenNetworkFeeUSDCents","type":"uint16","internalType":"uint16"},{"name":"baseExecutionGasCost","type":"uint32","internalType":"uint32"},{"name":"defaultCCVs","type":"address[]","internalType":"address[]"},{"name":"laneMandatedCCVs","type":"address[]","internalType":"address[]"},{"name":"defaultExecutor","type":"address","internalType":"address"},{"name":"offRamp","type":"bytes","internalType":"bytes"}]}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CanOnlySendOneTokenPerMessage","inputs":[]},{"type":"error","name":"CannotSendZeroTokens","inputs":[]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"CursedByRMN","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DestinationChainNotSupported","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DestinationChainNotSupportedByCCV","inputs":[{"name":"ccvAddress","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"DuplicateCCVNotAllowed","inputs":[{"name":"ccvAddress","type":"address","internalType":"address"}]},{"type":"error","name":"FTFNotSupportedOnPoolV1","inputs":[]},{"type":"error","name":"FeeExceedsMaxAllowed","inputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"maxUSDCentsPerMessage","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry","inputs":[]},{"type":"error","name":"InsufficientFeeTokenAmount","inputs":[]},{"type":"error","name":"InvalidAddressLength","inputs":[{"name":"length","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidConfig","inputs":[]},{"type":"error","name":"InvalidDataLength","inputs":[{"name":"location","type":"uint8","internalType":"enum ExtraArgsCodec.EncodingErrorLocation"},{"name":"offset","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidDataLength","inputs":[{"name":"location","type":"uint8","internalType":"enum MessageV1Codec.EncodingErrorLocation"}]},{"type":"error","name":"InvalidDestChainAddress","inputs":[{"name":"destChainAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidDestChainConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidExtraArgsTag","inputs":[{"name":"expected","type":"bytes4","internalType":"bytes4"},{"name":"actual","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"MustBeCalledByRouter","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustSpecifyDefaultOrRequiredCCVs","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"RouterMustSetOriginalSender","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"SourceTokenDataTooLarge","inputs":[{"name":"token","type":"address","internalType":"address"},{"name":"actualLength","type":"uint256","internalType":"uint256"},{"name":"maxLength","type":"uint32","internalType":"uint32"}]},{"type":"error","name":"TokenArgsNotSupportedOnPoolV1","inputs":[]},{"type":"error","name":"TokenReceiverNotAllowed","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"UnsupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const OnRampBin = "0x61010060405234610367576040516161a838819003601f8101601f191683016001600160401b0381118482101761036c578392829160405283398101039060e08212610367576080821261036757610055610382565b81519092906001600160401b03811681036103675783526020820151926001600160a01b03841684036103675760208101938452604083015163ffffffff81168103610367576040820190815260606100af8186016103a1565b83820190815293607f1901126103675760405192606084016001600160401b0381118582101761036c576040526100e8608086016103a1565b845260a08501519485151586036103675760c061010c9160208701978852016103a1565b9560408501968752331561035657600180546001600160a01b0319163317905583516001600160401b0316158015610344575b8015610332575b8015610323575b6103085792516001600160401b031660805291516001600160a01b0390811660a0529151821660c0525163ffffffff1660e052815116158015610319575b6103085780516002805484516001600160a81b03199091166001600160a01b039384161790151560a01b60ff60a01b161790558351600380546001600160a01b031916919092161790557f0a7df5db91fe3762aa97fa5fb05e9c7adfb1fb97fa4c95ec9cfc0d755e6ef85c9260e09260006060610206610382565b8281526020810183905260408101839052015260805160a051855160c0516001600160401b0390931695926001600160a01b039081169263ffffffff92831691166060610251610382565b89815260208082019384526040808301958652929091019586528151998a5291516001600160a01b03908116928a0192909252915192909216908701529051811660608601529051811660808501529051151560a084015290511660c0820152a1604051615df290816103b68239608051818181610a3a015281816114d10152611d51015260a0518181816112a80152611d7d015260c051818181611dd8015261278f015260e051818181611da90152613f0e0152f35b6306b7c75960e31b60005260046000fd5b508151151561018b565b5063ffffffff8351161561014d565b5081516001600160a01b031615610146565b5080516001600160a01b03161561013f565b639b15e16f60e01b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b60405190608082016001600160401b0381118382101761036c57604052565b51906001600160a01b03821682036103675756fe6080604052600436101561001257600080fd5b60003560e01c806306285c6914610117578063181f5a771461011257806320487ded1461010d5780632490769e1461010857806348a98aa4146101035780635cb80c5d146100fe5780636def4ce7146100f95780637437ff9f146100f457806379ba5097146100ef57806389933a51146100ea5780638da5cb5b146100e557806390423fa2146100e0578063df0aa9e9146100db578063e8d80861146100d6578063f2fde38b146100d15763fbca3b74146100cc57600080fd5b611cd3565b611c22565b611bb3565b611202565b61109b565b611054565b610f57565b610e0f565b610d9c565b610d0e565b610ab7565b610a72565b6105e9565b610357565b6102c9565b3461017a57600036600319011261017a576080610132611d19565b61017860405180926001600160a01b036060809267ffffffffffffffff815116855282602082015116602086015263ffffffff6040820151166040860152015116910152565bf35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff8211176101b157604052565b61017f565b6080810190811067ffffffffffffffff8211176101b157604052565b6040810190811067ffffffffffffffff8211176101b157604052565b90601f8019910116810190811067ffffffffffffffff8211176101b157604052565b604051906102206101c0836101ee565b565b60405190610220610160836101ee565b6040519061022060a0836101ee565b6040519061022060c0836101ee565b67ffffffffffffffff81116101b157601f01601f191660200190565b6040519061027b6020836101ee565b60008252565b60005b8381106102945750506000910152565b8181015183820152602001610284565b906020916102bd81518092818552858086019101610281565b601f01601f1916010190565b3461017a57600036600319011261017a5761032860408051906102ec81836101ee565b600c82527f4f6e52616d7020322e302e3000000000000000000000000000000000000000006020830152519182916020835260208301906102a4565b0390f35b67ffffffffffffffff81160361017a57565b35906102208261032c565b908160a091031261017a5790565b3461017a57604036600319011261017a576004356103748161032c565b60243567ffffffffffffffff811161017a57610394903690600401610349565b6103b28267ffffffffffffffff166000526006602052604060002090565b918254916001600160a01b036103dd6103d1856001600160a01b031690565b6001600160a01b031690565b161561054e57604081019160016103f48484611e00565b90501161052457610328946104979461048361043c6104166080870187611e36565b6104236020890189611e36565b905015918261050e575b61043687611f99565b88612f5b565b956104456120b3565b61044f8288611e00565b90506104b7575b6040880161047981519260608b0193845161047360028b01611e69565b916134f1565b9092525285611e00565b151590506104a95760f01c90505b90613a25565b60405190815292839250602083019150565b506001015461ffff16610491565b506105096104d66104d16104cb848a611e00565b90612117565b612125565b60206104e56104cb858b611e00565b01356104fc60208b01516001600160e01b03191690565b9060e08b015192896132c2565b610456565b915061051a8989611e00565b905015159161042d565b7f68c2514e0000000000000000000000000000000000000000000000000000000060005260046000fd5b7fbff66cef0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff821660045260246000fd5b6000fd5b90602060031983011261017a5760043567ffffffffffffffff811161017a5760040160009280601f830112156105e55781359367ffffffffffffffff85116105e257506020808301928560051b01011161017a579190565b80fd5b8380fd5b3461017a576105f73661058a565b90610600614363565b6000915b80831061060d57005b61061883828461212f565b9261062284612152565b67ffffffffffffffff81169081158015610a2e575b8015610a18575b80156109ff575b6109c8578561086691610880610876836108706106b760e083019561069d6106976106708987612189565b61068f6106856101008a95949501809a612189565b94909236916121bf565b9236916121bf565b906143a1565b67ffffffffffffffff166000526006602052604060002090565b9687956106f26106c960208a01612125565b88906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b61086061084260c060408b019a61075961070b8d612167565b8c547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e09190911b7cff0000000000000000000000000000000000000000000000000000000016178c55565b6107b761076860808301612221565b8c547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016178c55565b6107dd60016107c860a08401612221565b9c019b8c9061ffff1661ffff19825416179055565b61083c8d6107ed6060840161222b565b81547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690151560e81b7dff000000000000000000000000000000000000000000000000000000000016179055565b0161217f565b885465ffffffff0000191660109190911b65ffffffff000016178855565b8d612189565b9060038901612333565b8a612189565b9060028601612333565b6101208801906108926103d183612125565b156109b7576108a36108ed92612125565b7fffffffffffff0000000000000000000000000000000000000000ffffffffffff79ffffffffffffffffffffffffffffffffffffffff00000000000083549260301b169116179055565b61014087019061091161090b610903848b611e36565b939050612167565b60ff1690565b0361098c57956109727f99415f1fd5d7f97dec3730fd98d0161792f21251c2e963782304b609b288cb269261095761094d600198999a85611e36565b906004840161242c565b610960856158c5565b505460a01c67ffffffffffffffff1690565b610981604051928392836125c7565b0390a2019190610604565b6109969087611e36565b906109b36040519283926303aeba3960e41b8452600484016123d6565b0390fd5b6306b7c75960e31b60005260046000fd5b7fc35aa79d0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b5063ffffffff610a1160c0880161217f565b1615610645565b5060ff610a2760408801612167565b161561063e565b5067ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168214610637565b6001600160a01b0381160361017a57565b3461017a57604036600319011261017a57610a8e60043561032c565b610aa2602435610a9d81610a61565b61274a565b6040516001600160a01b039091168152602090f35b3461017a57610ac53661058a565b906001600160a01b0360035416918215610bde5760005b818110610ae557005b610af66103d16104d18385876144b9565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091906001600160a01b03831690602081602481855afa8015610bd9576001948892600092610ba9575b5081610b5d575b5050505001610adc565b81610b8d7f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e9385610b9d94615949565b6040519081529081906020820190565b0390a338858180610b53565b610bcb91925060203d8111610bd2575b610bc381836101ee565b8101906144c9565b9038610b4c565b503d610bb9565b61273e565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b906020808351928381520192019060005b818110610c265750505090565b82516001600160a01b0316845260209384019390920191600101610c19565b80516001600160a01b03168252610d0b9160208281015167ffffffffffffffff169082015260408281015160ff169082015260608281015115159082015260808281015161ffff169082015260a08281015161ffff169082015260c08281015163ffffffff169082015260e0828101516001600160a01b031690820152610140610cf9610ce5610100850151610160610100860152610160850190610c08565b610120850151848203610120860152610c08565b920151906101408184039101526102a4565b90565b3461017a57602036600319011261017a5767ffffffffffffffff600435610d348161032c565b610d3c6127e9565b50166000526006602052610328610d566040600020611f99565b604051918291602083526020830190610c45565b6102209092919260608101936001600160a01b0360408092828151168552602081015115156020860152015116910152565b3461017a57600036600319011261017a57600060408051610dbc81610195565b8281528260208201520152610328604051610dd681610195565b60ff6002546001600160a01b038116835260a01c16151560208201526001600160a01b0360035416604082015260405191829182610d6a565b3461017a57600036600319011261017a576000546001600160a01b0381163303610e8b5773ffffffffffffffffffffffffffffffffffffffff19600154913382841617600155166000556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b6040810160408252825180915260206060830193019060005b818110610f37575050506020818303910152815180825260208201916020808360051b8301019401926000915b838310610f0a57505050505090565b9091929394602080610f28600193601f198682030187528951610c45565b97019301930191939290610efb565b825167ffffffffffffffff16855260209485019490920191600101610ece565b3461017a57600036600319011261017a57600454610f748161209b565b90610f8260405192836101ee565b808252601f19610f918261209b565b0160005b81811061103d575050610fa7816120cf565b9060005b818110610fc357505061032860405192839283610eb5565b80610ffb610fe2610fd5600194615a05565b67ffffffffffffffff1690565b610fec8387612861565b9067ffffffffffffffff169052565b61102161101c61069d61100e8488612861565b5167ffffffffffffffff1690565b611f99565b61102b8287612861565b526110368186612861565b5001610fab565b6020906110486127e9565b82828701015201610f95565b3461017a57600036600319011261017a5760206001600160a01b0360015416604051908152f35b359061022082610a61565b8015150361017a57565b359061022082611086565b3461017a57606036600319011261017a5760006040516110ba81610195565b6004356110c681610a61565b81526024356110d481611086565b60208201908152604435906110e882610a61565b604083019182526110f7614363565b6001600160a01b038351161580156111f8575b6111e9576001600160a01b0383926111a16111cc93611170847f0a7df5db91fe3762aa97fa5fb05e9c7adfb1fb97fa4c95ec9cfc0d755e6ef85c9851166001600160a01b031673ffffffffffffffffffffffffffffffffffffffff196002541617600255565b51151560ff60a01b1974ff000000000000000000000000000000000000000060025492151560a01b16911617600255565b51166001600160a01b031673ffffffffffffffffffffffffffffffffffffffff196003541617600355565b6111d4611d19565b6111e3604051928392836144d8565b0390a180f35b6004846306b7c75960e31b8152fd5b508051151561110a565b3461017a57608036600319011261017a5761121e60043561032c565b60243567ffffffffffffffff811161017a5761123e903690600401610349565b6044359061124d606435610a61565b6040517f2cbc26bb0000000000000000000000000000000000000000000000000000000081526004803560801b77ffffffffffffffff0000000000000000000000000000000016908201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610bd957600091611b84575b50611b475760025460a01c60ff16611b1d576113147401000000000000000000000000000000000000000060ff60a01b196002541617600255565b61133460043567ffffffffffffffff166000526006602052604060002090565b906001600160a01b036064351615611af357815461135b6103d16001600160a01b03831681565b3303611ac95781611370608086940182611e36565b61137d6020840184611e36565b9050159081611ab0575b61139087611f99565b61139d9390600435612f5b565b9160a01c67ffffffffffffffff166113b49061288a565b84547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff1660a082901b7bffffffffffffffff000000000000000000000000000000000000000016178555825163ffffffff1694602084015161141d906001600160e01b03191690565b6040805130602080830191909152815297919061143a90896101ee565b604080516064356001600160a01b031660208083019190915281529890611461908a6101ee565b61146b8680611e36565b85549a9160e08c901c60ff16913690611483926128a9565b9060ff1661149091614589565b60a0890151916114a360408a018a611e00565b6114ad9150612922565b936114bb60208b018b611e36565b9690976114c6610210565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681529a67ffffffffffffffff6004351660208d015267ffffffffffffffff1660408c0152600060608c015263ffffffff1660808b01526001600160e01b03191660a08a0152600060c08a015260e089015261154e60048801611ef7565b6101008901526101208801526101408701526101608601526101808501523690611577926128a9565b6101a08301526115856120b3565b6115926040850185611e00565b9050611a30575b83611612926115e16115bc88946040860151606087015161047360028701611e69565b60608601528060408601526115db60808601516001600160a01b031690565b906145fa565b60c08601526115ee612972565b986115fc6040840184611e00565b15159050611a225760f01c90505b600435613a25565b63ffffffff90911660608401526020870195918652116119f857611637845183614688565b6116446040830183611e00565b90506118d2575b61165781959295614f34565b80835260208151910120906116706040850151516129f6565b6040840190815294606087019360005b604087015180518210156118235760206116b36103d16103d16116a6866116e196612861565b516001600160a01b031690565b6116c18460608c0151612861565b5190604051808095819463958021a760e01b835260043560048401612a40565b03915afa8015610bd9576001600160a01b03916000916117f5575b501680156117b557906000888c9388838961175f611728888f611720606091612125565b980151612861565b51604051998a97889687957f2969470600000000000000000000000000000000000000000000000000000000875260048701612b8b565b03925af18015610bd9578161178d91600194600091611794575b508b51906117878383612861565b52612861565b5001611680565b6117af913d8091833e6117a781836101ee565b810190612aa3565b38611779565b6105866117c96116a68460408c0151612861565b6341e3ac5360e11b6000526001600160a01b031660049081523567ffffffffffffffff16602452604490565b611816915060203d811161181c575b61180e81836101ee565b810190612729565b386116fc565b503d611804565b6103288680858d7f371bc2ff0a006f4ef863b1d27a065d4e9f938b6d883eb154572b4aea593b32cc8e8a6118568f612125565b936118646040820182611e00565b1590506118c65760206118816104cb8360406118b1950190611e00565b0135955b51915192516040519384936001600160a01b03606435169867ffffffffffffffff600435169886612d5c565b0390a4610b8d60ff60a01b1960025416600255565b506118b1600095611885565b61193a6119246118e86104cb6040860186611e00565b60c08601805151156119dd5751905b60208701516001600160e01b0319169060e0880151926064359161191f600435913690612991565b614929565b6101808301519061193482612854565b52612854565b5061195c60406119508651828701515190612861565b51015163ffffffff1690565b60a061196c610180840151612854565b5101515163ffffffff8216811161198457505061164b565b610586925061199c6104d16104cb6040870187611e00565b7f06cf7cbc000000000000000000000000000000000000000000000000000000006000526001600160a01b031660045260245263ffffffff16604452606490565b506119f26119eb8680611e36565b36916128a9565b906118f7565b7f07da6ee60000000000000000000000000000000000000000000000000000000060005260046000fd5b506001015461ffff1661160a565b5093506001611a426040840184611e00565b90500361052457611612838388966115e16115bc611aa4611a6c6104d16104cb6040880188611e00565b6020611a7e6104cb6040890189611e00565b0135611a9560208901516001600160e01b03191690565b9060e0890151926004356132c2565b94505050925050611599565b9050611abf6040840184611e00565b9050151590611387565b7f1c0a35290000000000000000000000000000000000000000000000000000000060005260046000fd5b7fa4ec74790000000000000000000000000000000000000000000000000000000060005260046000fd5b7f3ee5aeb50000000000000000000000000000000000000000000000000000000060005260046000fd5b7ffdbd6a72000000000000000000000000000000000000000000000000000000006000526105866004359067ffffffffffffffff60249216600452565b611ba6915060203d602011611bac575b611b9e81836101ee565b810190612875565b386112d9565b503d611b94565b3461017a57602036600319011261017a5767ffffffffffffffff600435611bd98161032c565b166000526006602052600167ffffffffffffffff60406000205460a01c160167ffffffffffffffff8111611c1d5760405167ffffffffffffffff9091168152602090f35b612235565b3461017a57602036600319011261017a576001600160a01b03600435611c4781610a61565b611c4f614363565b16338114611ca9578073ffffffffffffffffffffffffffffffffffffffff1960005416176000556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461017a57602036600319011261017a57611cef60043561032c565b7f9e7177c80000000000000000000000000000000000000000000000000000000060005260046000fd5b60006060604051611d29816101b6565b8281528260208201528260408201520152604051611d46816101b6565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602082015263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660408201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016606082015290565b903590601e198136030182121561017a570180359067ffffffffffffffff821161017a57602001918160061b3603831361017a57565b903590601e198136030182121561017a570180359067ffffffffffffffff821161017a5760200191813603831361017a57565b906040519182815491828252602082019060005260206000209260005b818110611e9b575050610220925003836101ee565b84546001600160a01b0316835260019485019487945060209093019201611e86565b90600182811c92168015611eed575b6020831014611ed757565b634e487b7160e01b600052602260045260246000fd5b91607f1691611ecc565b9060405191826000825492611f0b84611ebd565b8084529360018116908115611f775750600114611f30575b50610220925003836101ee565b90506000929192526020600020906000915b818310611f5b5750509060206102209282010138611f23565b6020919350806001915483858901015201910190918492611f42565b90506020925061022094915060ff191682840152151560051b82010138611f23565b906120936004611fa7610222565b9361201661200b8254611fd0611fc3826001600160a01b031690565b6001600160a01b03168952565b67ffffffffffffffff60a082901c16602089015260ff60e082901c16604089015261200560e882901c60ff16151560608a0152565b60f01c90565b61ffff166080870152565b612069612059600183015461203a61202f8261ffff1690565b61ffff1660a08a0152565b63ffffffff601082901c1660c089015260301c6001600160a01b031690565b6001600160a01b031660e0870152565b61207560028201611e69565b61010086015261208760038201611e69565b61012086015201611ef7565b610140830152565b67ffffffffffffffff81116101b15760051b60200190565b604051906120c26020836101ee565b6000808352366020840137565b906120d98261209b565b6120e660405191826101ee565b82815280926120f7601f199161209b565b0190602036910137565b634e487b7160e01b600052603260045260246000fd5b90156121205790565b612101565b35610d0b81610a61565b91908110156121205760051b8101359061015e198136030182121561017a570190565b35610d0b8161032c565b60ff81160361017a57565b35610d0b8161215c565b63ffffffff81160361017a57565b35610d0b81612171565b903590601e198136030182121561017a570180359067ffffffffffffffff821161017a57602001918160051b3603831361017a57565b9291906121cb8161209b565b936121d960405195866101ee565b602085838152019160051b810192831161017a57905b8282106121fb57505050565b60208091833561220a81610a61565b8152019101906121ef565b61ffff81160361017a57565b35610d0b81612215565b35610d0b81611086565b634e487b7160e01b600052601160045260246000fd5b906d04ee2d6d415b85acef81000000008202918083046d04ee2d6d415b85acef81000000001490151715611c1d57565b906e01ed09bead87c0378d8e64000000008202918083046e01ed09bead87c0378d8e64000000001490151715611c1d57565b908160031b9180830460081490151715611c1d57565b908160011b917f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811603611c1d57565b908160011b9180830460021490151715611c1d57565b81810292918115918404141715611c1d57565b818110612327575050565b6000815560010161231c565b9067ffffffffffffffff83116101b1576801000000000000000083116101b1578154838355808410612397575b5090600052602060002060005b83811061237a5750505050565b600190602084359461238b86610a61565b0193818401550161236d565b6123af9083600052846020600020918201910161231c565b38612360565b908060209392818452848401376000828201840152601f01601f1916010190565b916020610d0b9381815201916123b5565b9190601f81116123f657505050565b610220926000526020600020906020601f840160051c83019310612422575b601f0160051c019061231c565b9091508190612415565b90929167ffffffffffffffff81116101b1576124528161244c8454611ebd565b846123e7565b6000601f8211600114612493578190612484939495600092612488575b50508160011b916000199060031b1c19161790565b9055565b01359050388061246f565b601f198216946124a884600052602060002090565b91805b8781106124e35750836001959697106124c9575b505050811b019055565b0135600019600384901b60f8161c191690553880806124bf565b909260206001819286860135815501940191016124ab565b35906102208261215c565b359061022082612215565b359061022082612171565b9035601e198236030181121561017a57016020813591019167ffffffffffffffff821161017a578160051b3603831361017a57565b9160209082815201919060005b81811061256b5750505090565b9091926020806001926001600160a01b03873561258781610a61565b16815201940192910161255e565b9035601e198236030181121561017a57016020813591019167ffffffffffffffff821161017a57813603831361017a57565b67ffffffffffffffff610d0b9392168152604060208201526125fd604082016125ef8461033e565b67ffffffffffffffff169052565b61261c61260c6020840161107b565b6001600160a01b03166060830152565b61263561262b604084016124fb565b60ff166080830152565b61264d61264460608401611090565b151560a0830152565b61266761265c60808401612506565b61ffff1660c0830152565b61268161267660a08401612506565b61ffff1660e0830152565b61269e61269060c08401612511565b63ffffffff16610100830152565b6127166126e96126c86126b460e086018661251c565b6101606101208701526101a0860191612551565b6126d661010086018661251c565b858303603f190161014087015290612551565b9261270b6126fa610120830161107b565b6001600160a01b0316610160850152565b610140810190612595565b91610180603f19828603019101526123b5565b9081602091031261017a5751610d0b81610a61565b6040513d6000823e3d90fd5b6001600160a01b03604051917fbbe4f6db0000000000000000000000000000000000000000000000000000000083521660048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa8015610bd9576001600160a01b03916000916127cc57501690565b6127e5915060203d60201161181c5761180e81836101ee565b1690565b60405190610160820182811067ffffffffffffffff8211176101b15760405260606101408360008152600060208201526000604082015260008382015260006080820152600060a0820152600060c0820152600060e082015282610100820152826101208201520152565b8051156121205760200190565b80518210156121205760209160051b010190565b9081602091031261017a5751610d0b81611086565b67ffffffffffffffff1667ffffffffffffffff8114611c1d5760010190565b9291926128b582610250565b916128c360405193846101ee565b82948184528183011161017a578281602093846000960137010152565b6040519060c0820182811067ffffffffffffffff8211176101b157604052606060a0836000815282602082015282604082015282808201528260808201520152565b9061292c8261209b565b61293960405191826101ee565b828152809261294a601f199161209b565b019060005b82811061295b57505050565b6020906129666128e0565b8282850101520161294f565b6040519061297f82610195565b60606040838281528260208201520152565b919082604091031261017a576040516129a9816101d2565b602080829480356129b981610a61565b84520135910152565b604051906129d16020836101ee565b600080835282815b8281106129e557505050565b8060606020809385010152016129d9565b90612a008261209b565b612a0d60405191826101ee565b8281528092612a1e601f199161209b565b019060005b828110612a2f57505050565b806060602080938501015201612a23565b60409067ffffffffffffffff610d0b949316815281602082015201906102a4565b81601f8201121561017a578051612a7781610250565b92612a8560405194856101ee565b8184526020828401011161017a57610d0b9160208085019101610281565b9060208282031261017a57815167ffffffffffffffff811161017a57610d0b9201612a61565b9080602083519182815201916020808360051b8301019401926000915b838310612af557505050505090565b9091929394602080612b7c600193601f198682030187528951908151815260a0612b6b612b59612b47612b358887015160c08a88015260c08701906102a4565b604087015186820360408801526102a4565b606086015185820360608701526102a4565b608085015184820360808601526102a4565b9201519060a08184039101526102a4565b97019301930191939290612ae6565b919390610d0b9593612cd9612cf19260a08652612bb560a08701825167ffffffffffffffff169052565b602081015167ffffffffffffffff1660c0870152604081015167ffffffffffffffff1660e0870152606081015163ffffffff16610100870152608081015163ffffffff1661012087015260a08101516001600160e01b03191661014087015260c08101516101608701526101a0612cc4612cac612c94612c7c612c64612c4e8c61026060e08a0151916101c061018082015201906102a4565b6101008801518d8203609f1901888f01526102a4565b6101208701518c8203609f19016101c08e01526102a4565b6101408601518b8203609f19016101e08d01526102a4565b6101608501518a8203609f19016102008c01526102a4565b610180840151898203609f19016102208b0152612ac9565b910151868203609f19016102408801526102a4565b95602085015260408401906001600160a01b03169052565b606082015260808184039101526102a4565b9080602083519182815201916020808360051b8301019401926000915b838310612d2f57505050505090565b9091929394602080612d4d600193601f1986820301875289516102a4565b97019301930191939290612d20565b95949290916001600160a01b03612d8693168752602087015260a0604087015260a08601906102a4565b938085036060820152825180865260208601906020808260051b8901019501916000905b828210612dc85750505050610d0b9394506080818403910152612d03565b90919295602080612e29600193601f198d820301865260a060808c516001600160a01b03815116845263ffffffff86820151168685015263ffffffff60408201511660408501526060810151606085015201519181608082015201906102a4565b980192019201909291612daa565b60405190610100820182811067ffffffffffffffff8211176101b157604052606060e08360008152600060208201528260408201528280820152600060808201528260a08201528260c08201520152565b9060041161017a5790600490565b9093929384831161017a57841161017a578101920390565b919091356001600160e01b031981169260048110612eca575050565b6001600160e01b0319929350829060040360031b1b161690565b9160608383031261017a57825167ffffffffffffffff811161017a5782612f0c918501612a61565b926020810151612f1b81612171565b92604082015167ffffffffffffffff811161017a57610d0b9201612a61565b60409067ffffffffffffffff610d0b959316815281602082015201916123b5565b91929092612f67612e37565b600483101580613146575b15613090575090612f82916151f5565b925b80613075575b60408401612fa781519260608701938451610120880151916153bb565b9092525260c083015151613025575b50608082016001600160a01b03612fd482516001600160a01b031690565b1615612ffa575b5050610d0b612ff560208301516001600160e01b03191690565b61556d565b61301160e061301e9301516001600160a01b031690565b6001600160a01b03169052565b3880612fdb565b6130396130356060840151151590565b1590565b15612fb6577f68a8cf4a0000000000000000000000000000000000000000000000000000000060005267ffffffffffffffff1660045260246000fd5b5063ffffffff613089845163ffffffff1690565b1615612f8a565b94916000906130e8926130b16103d16103d16002546001600160a01b031690565b906040518095819482937f9cc199960000000000000000000000000000000000000000000000000000000084528a60048501612f3a565b03915afa8015610bd95760009060009060009061311a575b60a088015263ffffffff16865290505b60c0850152612f84565b50505061313c613110913d806000833e61313481836101ee565b810190612ee4565b9192508291613100565b5063534eea5560e11b6001600160e01b031961316b6131658686612e88565b90612eae565b1614612f72565b60208183031261017a5780519067ffffffffffffffff821161017a57019080601f8301121561017a5781516131a68161209b565b926131b460405194856101ee565b81845260208085019260051b82010192831161017a57602001905b8282106131dc5750505090565b6020809183516131eb81610a61565b8152019101906131cf565b95949060009460a09467ffffffffffffffff613243956001600160a01b036001600160e01b031995168b521660208a0152604089015216606087015260c0608087015260c08601906102a4565b930152565b9060028201809211611c1d57565b9060018201809211611c1d57565b6001019081600111611c1d57565b9060148201809211611c1d57565b90600c8201809211611c1d57565b91908201809211611c1d57565b6000198114611c1d5760010190565b80548210156121205760005260206000200190600090565b929394919060036132e78567ffffffffffffffff166000526006602052604060002090565b01936001600160a01b036132fc81841661274a565b169182156134d4576040516301ffc9a760e01b8152634a050aa160e11b6004820152602081602481875afa908115610bd9576000916134b5575b50156134a55761337b600095969798604051998a96879586957f06b859ef000000000000000000000000000000000000000000000000000000008752600487016131f6565b03915afa928315610bd957600093613480575b50825115613475578251906133ad6133a88454809461328e565b6120cf565b906000928394845b8751811015613414576133cb6116a6828a612861565b6001600160a01b0381161561340857906134026001926133f46133ed8a61329b565b9989612861565b906001600160a01b03169052565b016133b5565b50955060018096613402565b509195509193613426575b5050815290565b60005b828110613436575061341f565b8061346f61345c613449600194866132aa565b90546001600160a01b039160031b1c1690565b6133f46134688861329b565b9789612861565b01613429565b9150610d0b90611e69565b61349e9193503d806000833e61349681836101ee565b810190613172565b913861338e565b505050509250610d0b9150611e69565b6134ce915060203d602011611bac57611b9e81836101ee565b38613336565b635f8b555b60e11b6000526001600160a01b031660045260246000fd5b9391929361350d613505825186519061328e565b86519061328e565b9061352061351a836120cf565b926129f6565b94600096875b8351891015613586578861357c61356f60019361355761354d6116a68e9f9d9e9d8b612861565b6133f4838c612861565b613575613564858c612861565b51918093849161329b565b9c612861565b528b612861565b5001979695613526565b959250929350955060005b865181101561361a576135a76116a68289612861565b60006001600160a01b038216815b8881106135ee575b50509060019291156135d1575b5001613591565b6135e8906133f46135e18961329b565b9888612861565b386135ca565b816135ff6103d16116a6848c612861565b1461360c576001016135b5565b5060019150819050386135bd565b509390945060005b85518110156136ab576136386116a68288612861565b60006001600160a01b038216815b87811061367f575b5050906001929115613662575b5001613622565b613679906133f46136728861329b565b9787612861565b3861365b565b816136906103d16116a6848b612861565b1461369d57600101613646565b50600191508190503861364e565b50828252918252925090565b6040519060a0820182811067ffffffffffffffff8211176101b15760405260606080836000815260006020820152600060408201526000838201520152565b906137008261209b565b61370d60405191826101ee565b828152809261371e601f199161209b565b019060005b82811061372f57505050565b60209061373a6136b7565b82828501015201613723565b9081606091031261017a57805161375c81612215565b916040602083015161376d81612171565b920151610d0b81612171565b9160209082815201919060005b8181106137935750505090565b9091926040806001926001600160a01b0387356137af81610a61565b16815260208781013590820152019401929101613786565b949391929067ffffffffffffffff168552608060208601526138206138016137ef8580612595565b60a060808a01526101208901916123b5565b61380e6020860186612595565b888303607f190160a08a0152906123b5565b6040840135601e198536030181121561017a578401916020833593019167ffffffffffffffff841161017a578360061b3603831361017a57610220956138a861387f6138bb936060976138c9978d60c0607f1982860301910152613779565b9161389e61388e88830161107b565b6001600160a01b031660e08d0152565b6080810190612595565b8a8303607f19016101008c0152906123b5565b9087820360408901526102a4565b9401906001600160e01b0319169052565b9063ffffffff8091169116019063ffffffff8211611c1d57565b908160a091031261017a57805191602082015161391081612171565b91604081015161391f81612171565b916080606083015161393081612215565b920151610d0b81611086565b9260c0946001600160a01b039167ffffffffffffffff6001600160e01b03199584610d0b9b9a9616885216602087015260408601521660608401521660808201528160a082015201906102a4565b9081606091031261017a57805161375c81612171565b600119810191908211611c1d57565b600019810191908211611c1d57565b600219810191908211611c1d57565b91908203918211611c1d57565b919082608091031261017a5781516139f181612171565b916020810151916060604083015192015190565b8115613a0f570490565b634e487b7160e01b600052601260045260246000fd5b9382946000906000956040810194613a5f613a5a613a55885151613a4d60408c01809c611e00565b91905061328e565b613248565b6136f6565b9660009586955b88518051881015613c97576103d16103d16116a68a613a8494612861565b613ab860206060880192613a998b8551612861565b51908a60405180958194829363958021a760e01b845260048401612a40565b03915afa8015610bd9576001600160a01b0391600091613c79575b50168015613c3e579060608e9392613aec8b8451612861565b5190613b0360208b01516001600160e01b03191690565b958b613b3e604051988995869485947ff4cdd89e000000000000000000000000000000000000000000000000000000008652600486016137c7565b03915afa8015610bd957600193613bdb938b8f8f95600080958197613be4575b509083929161ffff613b8685613b7f6116a6613bcf99613bd59d9e51612861565b9451612861565b5191613ba2613b93610232565b6001600160a01b039095168552565b63ffffffff8916602085015263ffffffff8b16604085015216606083015260808201526117878383612861565b506138da565b996138da565b96019596613a66565b613bd597506116a6965084939291509361ffff613b8682613b7f613c21613bcf9960603d8111613c37575b613c1981836101ee565b810190613746565b9c9196909c9d5050505050505090919293613b5e565b503d613c0f565b61058688613c506116a68c8f51612861565b6341e3ac5360e11b6000526001600160a01b031660045267ffffffffffffffff16602452604490565b613c91915060203d811161181c5761180e81836101ee565b38613ad3565b50919a9496929395509897968a613cae8187611e00565b9050613fe9575b50508651613cc2906139a0565b99613cd06020860186611e36565b91613cdc915086611e00565b9560609150019486613ced87612125565b91613cf8938a6156ad565b613d028b89612861565b52613d0d8a88612861565b50613d188a88612861565b516020015163ffffffff16613d2c916138da565b90613d378a88612861565b516040015163ffffffff16613d4b916138da565b91613d54610232565b33815290600060208301819052604083015261ffff166060820152613d7761026c565b60808201528651613d87906139af565b90613d928289612861565b52613d9d9087612861565b506002546001600160a01b031692613db490612125565b6040517f910d8f5900000000000000000000000000000000000000000000000000000000815267ffffffffffffffff96909616600487015263ffffffff9182166024870152911660448501526001600160a01b03166064840152826084815a93608094fa958615610bd95760008097600094600091613fa9575b5084613e3c613e419261224b565b613a05565b906000965b8651881015613f0457613e8d6001916060613e618b8b612861565b5101613e6e868251612309565b9052858a14613e95575b6060613e848b8b612861565b5101519061328e565b970196613e46565b8b8873eba517d2000000000000000000000000000000006001600160a01b03613ec860808c01516001600160a01b031690565b1603613ed6575b5050613e78565b613e3c613ee29261227b565b613efb6060613ef18d8d612861565b510191825161328e565b90528b88613ecf565b97965097505050507f000000000000000000000000000000000000000000000000000000000000000090613f4181613e3c63ffffffff851661227b565b8511613f4e575050929190565b90613f74613f5f6105869387612309565b6e01ed09bead87c0378d8e6400000000900490565b7f25c2df0a0000000000000000000000000000000000000000000000000000000060005260045263ffffffff16602452604490565b9050613e419850613e3c9450613fd7915060803d608011613fe2575b613fcf81836101ee565b8101906139da565b919950945084613e2e565b503d613fc5565b610a9d6103d16104d16104cb614002948a989698611e00565b926001600160a01b03600091515194169060e08801908151614022610232565b6001600160a01b0385168152908260208301528260408301528260608301526080820152614050878d612861565b5261405b868c612861565b506040516301ffc9a760e01b8152634a050aa160e11b600482015291602083602481875afa8015610bd9578f948c89968f96948d948f968891614344575b50614237575b505050505050156140de575b6119506140cf6140d6956140c960206119506140c997604097612861565b906138da565b958b612861565b90388a613cb5565b50506141649160608c61410f6104d16104cb6141086103d16103d16002546001600160a01b031690565b938b611e00565b6040517f947f821700000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8c1660048201526001600160a01b03909116602482015294859190829081906044820190565b03915afa908115610bd9576119506140cf6040926140c960206119508f8b906140d69b6140c99a6000806000926141f9575b63ffffffff9293506141e69060606141ae8888612861565b5101946141db8a6141bf8a8a612861565b51019160406141ce8b8b612861565b51019063ffffffff169052565b9063ffffffff169052565b16905297509750505050955050506140ab565b50505063ffffffff6142256141e69260603d606011614230575b61421d81836101ee565b81019061398a565b909350915082614196565b503d614213565b8495985060a0969750614287602061427760608261426e6104cb6142676104d16104cb8b6142c09c9d9e9f611e00565b998d611e00565b01359901612125565b9a01516001600160e01b03191690565b905190604051998a97889687967f1826b1e70000000000000000000000000000000000000000000000000000000088526004880161393c565b03915afa8015610bd9578592828c939181908294614308575b506142fc9060606142ea8888612861565b5101926141db60206141bf8a8a612861565b5288888f8c813861409f565b9150506142fc9250614332915060a03d60a01161433d575b61432a81836101ee565b8101906138f4565b9491929190506142d9565b503d614320565b61435d915060203d602011611bac57611b9e81836101ee565b38614099565b6001600160a01b0360015416330361437757565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b8051916143af81518461328e565b92831561448f5760005b8481106143c7575050505050565b81811015614474576143dc6116a68286612861565b6001600160a01b0381168015610bde576143f583613256565b878110614407575050506001016143b9565b84811015614451576001600160a01b036144246116a6838a612861565b168214614433576001016143f5565b630285c9b960e61b6000526001600160a01b03831660045260246000fd5b6001600160a01b0361446f6116a661446988856139cd565b89612861565b614424565b61448a6116a661448484846139cd565b85612861565b6143dc565b7f7b6c02970000000000000000000000000000000000000000000000000000000060005260046000fd5b91908110156121205760051b0190565b9081602091031261017a575190565b9160806102209294936145288160e08101976001600160a01b036060809267ffffffffffffffff815116855282602082015116602086015263ffffffff6040820151166040860152015116910152565b01906001600160a01b0360408092828151168552602081015115156020860152015116910152565b906020610d0b9281815201906102a4565b9061456b82610250565b61457860405191826101ee565b82815280926120f7601f1991610250565b90815160208210806145f0575b6145bf57036145a25790565b6109b3906040519182916303aeba3960e41b835260048301614550565b5090602081015190816145d1846122ad565b1c6145a257506145e082614561565b9160200360031b1b602082015290565b5060208114614596565b918251601481029080820460141490151715611c1d5761461c61462191613264565b613272565b9061463361462e83613280565b614561565b90601461463f83612854565b5360009260215b86518510156146715760146001916146616116a6888b612861565b60601b8187015201940193614646565b919550936020935060601b90820152828152012090565b906146986103d160608401612125565b6146a9600019936040810190611e00565b9050614721575b6146ba82516139af565b9260005b8481106146cc575050505050565b80826001921461471c5760606146e28287612861565b5101518015614716576147109061470a6146fc8489612861565b51516001600160a01b031690565b86615949565b016146be565b50614710565b614710565b915061472d81516139be565b9161473b6146fc8484612861565b6040516301ffc9a760e01b8152634a050aa160e11b60048201526020816024816001600160a01b0386165afa908115610bd9576000916147a2575b50614782575b506146b0565b61479c9060606147928686612861565b5101519083615949565b3861477c565b6147bb915060203d602011611bac57611b9e81836101ee565b38614776565b604051906147ce826101d2565b60606020838281520152565b919060408382031261017a57604051906147f3826101d2565b8193805167ffffffffffffffff811161017a5782614812918301612a61565b835260208101519167ffffffffffffffff831161017a576020926148369201612a61565b910152565b9060208282031261017a57815167ffffffffffffffff811161017a57610d0b92016147da565b9060806001600160a01b0381614880855160a0865260a08601906102a4565b9467ffffffffffffffff60208201511660208601528260408201511660408601526060810151606086015201511691015290565b906020610d0b928181520190614861565b919060408382031261017a57825167ffffffffffffffff811161017a576020916148f09185016147da565b92015190565b6001600160e01b0319614915610d0b9593606084526060840190614861565b9316602082015260408184039101526102a4565b9092946149346128e0565b5060208201805115614d4f57614957610a9d6103d185516001600160a01b031690565b956001600160a01b038716916040516301ffc9a760e01b8152602081806149a560048201907faff2afbf00000000000000000000000000000000000000000000000000000000602083019252565b0381875afa908115610bd957600091614d30575b5015614d00578051906149ca6147c1565b505185516001600160a01b0316906149e0610232565b88815267ffffffffffffffff8a1660208201529a6001600160a01b031660408c015260608b01526001600160a01b031660808a01526040516301ffc9a760e01b8152634a050aa160e11b60048201528381806024810103815a93602094fa908115610bd957600091614ce1575b5015614bdb5750906000929183614a959899604051998a95869485937ffbc801a7000000000000000000000000000000000000000000000000000000008552600485016148f6565b03925af18015610bd957600094600091614b87575b50614b5c614b119596614b4b614b1f614b3d956116a6614af261090b614ae86020999e9c67ffffffffffffffff166000526006602052604060002090565b5460e01c60ff1690565b946040519b8c918983019190916001600160a01b036020820193169052565b03601f1981018c528b6101ee565b6040519586918683019190916001600160a01b036020820193169052565b03601f1981018652856101ee565b614b56818751614589565b94614589565b93015193614b68610241565b958652602086015260408501526060840152608083015260a082015290565b614b11955060209150614ae896614b4b614b1f614b3d956116a6614af261090b614bc6614b5c983d806000833e614bbe81836101ee565b8101906148c5565b9e909e99505050505095505050969550614aaa565b9792906001600160e01b031916614cb75751614c8d57614c2f6000929183926040519485809481937f9a4575b9000000000000000000000000000000000000000000000000000000008352600483016148b4565b03925af1918215610bd957614b1195614b4b614b1f614b5c936116a6614af261090b614ae8614b3d9a60209a600091614c6a575b509c61069d565b614c8791503d806000833e614c7f81836101ee565b81019061483b565b38614c63565b7f9218ad0a0000000000000000000000000000000000000000000000000000000060005260046000fd5b7f4bae66b40000000000000000000000000000000000000000000000000000000060005260046000fd5b614cfa915060203d602011611bac57611b9e81836101ee565b38614a4d565b610586614d1486516001600160a01b031690565b635f8b555b60e11b6000526001600160a01b0316600452602490565b614d49915060203d602011611bac57611b9e81836101ee565b386149b9565b7f5cf044490000000000000000000000000000000000000000000000000000000060005260046000fd5b9592614dfb947fffffffffffffffff0000000000000000000000000000000000000000000000006001600160e01b031994928186948160459d9b97600160f81b8e5260c01b1660018d015260c01b1660098b015260c01b16601189015260e01b16601987015260e01b16601d85015260218401906001600160e01b0319169052565b60258201520190565b90614e1760209282815194859201610281565b0190565b9360019694936001600160f81b03198094899896828a9660f81b168152614e4b8251809360208985019101610281565b019160f81b1683820152614e69825180936020600285019101610281565b01019160f81b1683820152614e88825180936020600285019101610281565b01010190565b60017fffff000000000000000000000000000000000000000000000000000000000000956002958760049a9681956001600160f81b0319610d0b9f9e9c9860f81b168152614ee58251809360208985019101610281565b019160f01b1683820152614f03825180936020600385019101610281565b01019160f01b1683820152614f218251809360208985019101610281565b01019160f01b1660028201520190614e04565b60e081019060ff825151116151df57610100810160ff815151116151c95761012082019260ff845151116151b357610140830160ff8151511161519d5761016084019061ffff8251511161518757610180850193600185515111615171576101a086019361ffff8551511161515b5760609551805161511f575b50865167ffffffffffffffff16602088015167ffffffffffffffff16906040890151614fe19067ffffffffffffffff1690565b986060810151614ff49063ffffffff1690565b9060808101516150079063ffffffff1690565b60a08201516001600160e01b0319169160c00151926040519c8d96602088019661503097614d79565b03601f198101885261504290886101ee565b519081516150509060ff1690565b9051805160ff1698519081516150669060ff1690565b906040519a8b95602087019561507b96614e1b565b03601f198101875261508d90876101ee565b5191825161509b9060ff1690565b9151805161ffff169480516150b19061ffff1690565b92519283516150c19061ffff1690565b9260405197889760208901976150d698614e8e565b03601f19810182526150e890826101ee565b604051928392602084016150fb91614e04565b61510491614e04565b61510d91614e04565b03601f1981018252610d0b90826101ee565b61513491965061512e90612854565b51615b11565b9461ffff8651116151455738614fae565b635a102da160e11b600052602260045260246000fd5b635a102da160e11b600052602360045260246000fd5b635a102da160e11b600052602160045260246000fd5b635a102da160e11b600052602060045260246000fd5b635a102da160e11b600052601f60045260246000fd5b635a102da160e11b600052601e60045260246000fd5b635a102da160e11b600052601d60045260246000fd5b635a102da160e11b600052601c60045260246000fd5b906151fe612e37565b91601382106153a057803563534eea5560e11b6001600160e01b031982160361535e5750600481013560e01c835260088101356001600160e01b0319166020840152600d600c82013560001a615253816120cf565b60408601908152615263826129f6565b906060870191825260005b83811061531257505050506152d683836152cc6152c06152b66152af61529c6152e098876152ea9c9b615c3a565b6001600160a01b0390911660808d015290565b8585615cde565b92919036916128a9565b60a08a01528383615d2d565b94919036916128a9565b60c0880152615cde565b93919036916128a9565b60e084015281036152f9575090565b63d9437f9d60e01b600052600360045260245260446000fd5b8060019161535761534161533a61532d6153519a8d8d615c3a565b91906133f4868a51612861565b8b8b615cde565b9391889a919a51949a36916128a9565b92612861565b520161526e565b7f55a0e02c0000000000000000000000000000000000000000000000000000000060005263534eea5560e11b6004526001600160e01b03191660245260446000fd5b63d9437f9d60e01b6000526002600452602482905260446000fd5b9093919281511561554757506153d081615d5a565b80519260005b8481106153e557509093925050565b6153f56103d16116a68386612861565b15615402576001016153d6565b93919461541c6133a8615414856139af565b84519061328e565b9261543961543461542c836139af565b85519061328e565b6129f6565b968792600097885b8481106154e95750505050505060005b81518110156154dc576000805b86811061549d575b50906001916154985761549261547f6116a68386612861565b6133f461548b8961329b565b9887612861565b01615451565b615492565b6154aa6116a68287612861565b6001600160a01b036154c26103d16116a68789612861565b9116146154d15760010161545e565b506001905080615466565b5050909180825283529190565b90919293949882821461553d579061552f615522836155158b6133f46001976153516116a6898e612861565b6155286135648589612861565b9e612861565b528c612861565b505b01908994939291615441565b9850600190615531565b919350501561556257506155596120b3565b90610d0b6129c2565b90610d0b82516129f6565b6001600160e01b031981161561563d577dffff000000000000000000000000000000000000000000000000000000008116156156345760ff60015b1660f082901c806155f6575b506001036155bf5750565b7fc512f96c000000000000000000000000000000000000000000000000000000006000526001600160e01b03191660045260246000fd5b60005b6010811061560757506155b4565b63ffffffff6001821b831616615620575b6001016155f9565b9161562c600191613256565b929050615618565b60ff60006155a8565b50565b9081602091031261017a5751610d0b81612215565b936156986080946001600160e01b03196001600160a01b039567ffffffffffffffff6156a6969b9a9b16895216602088015260a0604088015260a0870190610c08565b9085820360608701526102a4565b9416910152565b929190926156b96136b7565b506156d88167ffffffffffffffff166000526006602052604060002090565b805490959060e01c60ff1691608085019283516156fb906001600160a01b031690565b60019098015460101c63ffffffff16865163ffffffff1661571b916138da565b9661572790608f61328e565b9460a08701958651516157399161328e565b9160ff1691615747836122c3565b6157509161328e565b9161575a906122f3565b61576590606761328e565b61576e91612309565b6157779161328e565b63ffffffff1692516001600160a01b03169473eba517d2000000000000000000000000000000006001600160a01b038716036158045750505061ffff92506157f6906157e96000935b51956157dc6157cd610232565b6001600160a01b039099168952565b63ffffffff166020880152565b63ffffffff166040860152565b166060830152608082015290565b61581a6103d1602094976001600160a01b031690565b906040615831858301516001600160e01b03191690565b91015192615871875198604051998a96879586957f58c0bafd00000000000000000000000000000000000000000000000000000000875260048701615655565b03915afa908115610bd9576157e96157f69261ffff95600091615896575b50936157c0565b6158b8915060203d6020116158be575b6158b081836101ee565b810190615640565b3861588f565b503d6158a6565b8060005260056020526040600020541560001461594357600454680100000000000000008110156101b15760018101600455600060045482101561212057600490527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01819055600454906000526005602052604060002055600190565b50600090565b91602091600091604051906001600160a01b03858301937fa9059cbb00000000000000000000000000000000000000000000000000000000855216602483015260448201526044815261599d6064826101ee565b519082855af11561273e576000513d6159fc57506001600160a01b0381163b155b6159c55750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b600114156159be565b6004548110156121205760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b015490565b966002615ae597615aca6022610d0b9f9e9c9799600199859f9b6001600160f81b031990615aca9f82615aca9c615ad19c600160f81b8452600184015260f81b166021820152615a938251809360208985019101610281565b019160f81b1683820152615ab1825180936020602385019101610281565b010191888301906001600160f81b03199060f81b169052565b0190614e04565b80926001600160f81b03199060f81b169052565b80927fffff0000000000000000000000000000000000000000000000000000000000009060f01b169052565b602081019060ff82515111615c2257604081019160ff83515111615c0c57606082019160ff83515111615bf657608081019260ff84515111615be05760a0820161ffff81515111615bca57610d0b94615bbc9351945191615b73835160ff1690565b975191615b81835160ff1690565b945190615b8f825160ff1690565b905193615b9d855160ff1690565b935196615bac885161ffff1690565b966040519c8d9b60208d01615a3a565b03601f1981018352826101ee565b635a102da160e11b600052602860045260246000fd5b635a102da160e11b600052602760045260246000fd5b635a102da160e11b600052602660045260246000fd5b635a102da160e11b600052602560045260246000fd5b635a102da160e11b6000526105866024906024600452565b929190926001820191848311615cc55781013560001a828115615cba575060148103615c8d578201938411615c7257013560601c9190565b63d9437f9d60e01b6000526001600452602482905260446000fd5b7f6d1eca280000000000000000000000000000000000000000000000000000000060005260045260246000fd5b945050505060009190565b63d9437f9d60e01b600052600060045260245260446000fd5b91906002820191818311615cc5578381013560f01c0160020192818411615d1257918391615d0b93612e96565b9290929190565b63d9437f9d60e01b6000526001600452602483905260446000fd5b91906001820191818311615cc5578381013560001a0160010192818411615d1257918391615d0b93612e96565b80519060005b828110615d6c57505050565b60018101808211611c1d575b838110615d885750600101615d60565b6001600160a01b03615d9a8385612861565b5116615dac6103d16116a68487612861565b14615db957600101615d78565b610586615dc96116a68486612861565b630285c9b960e61b6000526001600160a01b031660045260249056fea164736f6c634300081a000a" - -type OnRampContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewOnRampContract( - address common.Address, - backend bind.ContractBackend, -) (*OnRampContract, error) { - parsed, err := abi.JSON(strings.NewReader(OnRampABI)) - if err != nil { - return nil, err - } - return &OnRampContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *OnRampContract) Address() common.Address { - return c.address -} - -func (c *OnRampContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *OnRampContract) ApplyDestChainConfigUpdates(opts *bind.TransactOpts, args []DestChainConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyDestChainConfigUpdates", args) -} - -func (c *OnRampContract) SetDynamicConfig(opts *bind.TransactOpts, args DynamicConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", args) -} - -func (c *OnRampContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *OnRampContract) GetDestChainConfig(opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDestChainConfig", args) - if err != nil { - var zero DestChainConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DestChainConfig)).(*DestChainConfig), nil -} - -func (c *OnRampContract) GetDynamicConfig(opts *bind.CallOpts) (DynamicConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - if err != nil { - var zero DynamicConfig - return zero, err - } - return *abi.ConvertType(out[0], new(DynamicConfig)).(*DynamicConfig), nil -} - -func (c *OnRampContract) GetStaticConfig(opts *bind.CallOpts) (StaticConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getStaticConfig") - if err != nil { - var zero StaticConfig - return zero, err - } - return *abi.ConvertType(out[0], new(StaticConfig)).(*StaticConfig), nil -} - -type DestChainConfig struct { - Router common.Address - MessageNumber uint64 - AddressBytesLength uint8 - TokenReceiverAllowed bool - MessageNetworkFeeUSDCents uint16 - TokenNetworkFeeUSDCents uint16 - BaseExecutionGasCost uint32 - DefaultExecutor common.Address - LaneMandatedCCVs []common.Address - DefaultCCVs []common.Address - OffRamp []byte -} - -type DestChainConfigArgs struct { - DestChainSelector uint64 - Router common.Address - AddressBytesLength uint8 - TokenReceiverAllowed bool - MessageNetworkFeeUSDCents uint16 - TokenNetworkFeeUSDCents uint16 - BaseExecutionGasCost uint32 - DefaultCCVs []common.Address - LaneMandatedCCVs []common.Address - DefaultExecutor common.Address - OffRamp []byte -} - -type DynamicConfig struct { - FeeQuoter common.Address - ReentrancyGuardEntered bool - FeeAggregator common.Address -} - -type StaticConfig struct { - ChainSelector uint64 - RmnRemote common.Address - MaxUSDCentsPerMessage uint32 - TokenAdminRegistry common.Address -} - type ConstructorArgs struct { - StaticConfig StaticConfig - DynamicConfig DynamicConfig + StaticConfig gobindings.OnRampStaticConfig `json:"staticConfig"` + DynamicConfig gobindings.OnRampDynamicConfig `json:"dynamicConfig"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "onramp:deploy", - Version: Version, - Description: "Deploys the OnRamp contract", - ContractMetadata: &bind.MetaData{ - ABI: OnRampABI, - Bin: OnRampBin, - }, + Name: "onramp:deploy", + Version: Version, + Description: "Deploys the OnRamp contract", + ContractMetadata: gobindings.OnRampMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(OnRampBin), + EVM: common.FromHex(gobindings.OnRampMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ApplyDestChainConfigUpdates = contract.NewWrite(contract.WriteParams[[]DestChainConfigArgs, *OnRampContract]{ - Name: "onramp:apply-dest-chain-config-updates", - Version: Version, - Description: "Calls applyDestChainConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, []DestChainConfigArgs], - Validate: func([]DestChainConfigArgs) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args []DestChainConfigArgs, - ) (*types.Transaction, error) { - return c.ApplyDestChainConfigUpdates(opts, args) - }, -}) +func NewWriteApplyDestChainConfigUpdates(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.OnRampDestChainConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.OnRampDestChainConfigArgs, gobindings.OnRampInterface]{ + Name: "onramp:apply-dest-chain-config-updates", + Version: Version, + Description: "Calls applyDestChainConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.OnRampDestChainConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args []gobindings.OnRampDestChainConfigArgs, + ) (*types.Transaction, error) { + return c.ApplyDestChainConfigUpdates(opts, args) + }, + }) +} -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[DynamicConfig, *OnRampContract]{ - Name: "onramp:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, DynamicConfig], - Validate: func(DynamicConfig) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args DynamicConfig, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args) - }, -}) +func NewWriteSetDynamicConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.OnRampDynamicConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.OnRampDynamicConfig, gobindings.OnRampInterface]{ + Name: "onramp:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args gobindings.OnRampDynamicConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args gobindings.OnRampDynamicConfig, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args) + }, + }) +} -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *OnRampContract]{ - Name: "onramp:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: OnRampABI, - NewContract: NewOnRampContract, - IsAllowedCaller: contract.OnlyOwner[*OnRampContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *OnRampContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) +func NewWriteWithdrawFeeTokens(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.OnRampInterface]{ + Name: "onramp:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.OnRampMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.OnRampInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.OnRampInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} -var GetDestChainConfig = contract.NewRead(contract.ReadParams[uint64, DestChainConfig, *OnRampContract]{ - Name: "onramp:get-dest-chain-config", - Version: Version, - Description: "Calls getDestChainConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args uint64) (DestChainConfig, error) { - return c.GetDestChainConfig(opts, args) - }, -}) +func NewReadGetDestChainConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[uint64], gobindings.OnRampDestChainConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, gobindings.OnRampDestChainConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-dest-chain-config", + Version: Version, + Description: "Calls getDestChainConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args uint64) (gobindings.OnRampDestChainConfig, error) { + return c.GetDestChainConfig(opts, args) + }, + }) +} -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, DynamicConfig, *OnRampContract]{ - Name: "onramp:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args struct{}) (DynamicConfig, error) { - return c.GetDynamicConfig(opts) - }, -}) +func NewReadGetDynamicConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OnRampDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OnRampDynamicConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OnRampDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} -var GetStaticConfig = contract.NewRead(contract.ReadParams[struct{}, StaticConfig, *OnRampContract]{ - Name: "onramp:get-static-config", - Version: Version, - Description: "Calls getStaticConfig on the contract", - ContractType: ContractType, - NewContract: NewOnRampContract, - CallContract: func(c *OnRampContract, opts *bind.CallOpts, args struct{}) (StaticConfig, error) { - return c.GetStaticConfig(opts) - }, -}) +func NewReadGetStaticConfig(c gobindings.OnRampInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.OnRampStaticConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.OnRampStaticConfig, gobindings.OnRampInterface]{ + Name: "onramp:get-static-config", + Version: Version, + Description: "Calls getStaticConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.OnRampInterface, opts *bind.CallOpts, args struct{}) (gobindings.OnRampStaticConfig, error) { + return c.GetStaticConfig(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/proxy/proxy.go b/chains/evm/deployment/v2_0_0/operations/proxy/proxy.go index 63a43c7476..1d2330da46 100644 --- a/chains/evm/deployment/v2_0_0/operations/proxy/proxy.go +++ b/chains/evm/deployment/v2_0_0/operations/proxy/proxy.go @@ -3,187 +3,124 @@ package proxy import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/proxy" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "Proxy" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const ProxyABI = `[{"type":"constructor","inputs":[{"name":"target","type":"address","internalType":"address"},{"name":"feeAggregator","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"fallback","stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getFeeAggregator","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getTarget","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"setFeeAggregator","inputs":[{"name":"feeAggregator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setTarget","inputs":[{"name":"target","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"FeeAggregatorUpdated","inputs":[{"name":"oldFeeAggregator","type":"address","indexed":true,"internalType":"address"},{"name":"newFeeAggregator","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"TargetUpdated","inputs":[{"name":"oldTarget","type":"address","indexed":true,"internalType":"address"},{"name":"newTarget","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const ProxyBin = "0x60803461013757601f610bb138819003918201601f19168301916001600160401b0383118484101761013c57808492604094855283398101031261013757610052602061004b83610152565b9201610152565b90331561012657600180546001600160a01b031916331790556001600160a01b031690811561011557600280546001600160a01b03198116841790915560405192906001600160a01b03167f331faca2e54d546f21863baefddc0bc0b9fe7554216f8798e32574255571713f600080a3600380546001600160a01b039283166001600160a01b0319821681179092559091167f5f93cfaedcfeead9f6922f03a6557cc9c40dd65f320e80dd4aa68fce736bf723600080a3610a4a90816101678239f35b6342bcdf7f60e11b60005260046000fd5b639b15e16f60e01b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101375756fe6080604052600436101561001a575b341561086f575b600080fd5b60003560e01c806315b358e0146100aa578063181f5a77146100a55780635cb80c5d146100a0578063776d1a011461009b57806379ba5097146100965780638da5cb5b146100915780639cb406c91461008c578063f00e6a2a146100875763f2fde38b0361000e57610627565b6105d5565b610583565b610531565b610448565b610357565b6102da565b610208565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356100e581610159565b6100ed6108a8565b73ffffffffffffffffffffffffffffffffffffffff80600354921691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600355167f5f93cfaedcfeead9f6922f03a6557cc9c40dd65f320e80dd4aa68fce736bf723600080a3005b73ffffffffffffffffffffffffffffffffffffffff81160361001557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176101c257604052565b610177565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176101c257604052565b346100155760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557604051610243816101a6565b600b81527f50726f787920322e302e30000000000000000000000000000000000000000000602082015260405190602082528181519182602083015260005b8381106102c25750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b60208282018101516040878401015285935001610282565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043567ffffffffffffffff8111610015573660238201121561001557806004013567ffffffffffffffff8111610015573660248260051b84010111610015576024610355920161071b565b005b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff6004356103a781610159565b6103af6108a8565b16801561041e5773ffffffffffffffffffffffffffffffffffffffff600254827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600255167f331faca2e54d546f21863baefddc0bc0b9fe7554216f8798e32574255571713f600080a3005b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b346100155760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760005473ffffffffffffffffffffffffffffffffffffffff81163303610507577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b346100155760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346100155760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b346100155760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff60043561067781610159565b61067f6108a8565b163381146106f157807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b73ffffffffffffffffffffffffffffffffffffffff6003541691821561041e5760005b81811061074b5750505050565b61077a61076161075c8385876108f3565b610932565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290919073ffffffffffffffffffffffffffffffffffffffff831690602081602481855afa801561086a57600194889260009261083a575b50816107ee575b505050500161073e565b8161081e7f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e938561082e9461095a565b6040519081529081906020820190565b0390a3388581806107e4565b61085c91925060203d8111610863575b61085481836101c7565b81019061093f565b90386107dd565b503d61084a565b61094e565b60008073ffffffffffffffffffffffffffffffffffffffff6002541636828037818036925af13d6000803e6108a3573d6000fd5b3d6000f35b73ffffffffffffffffffffffffffffffffffffffff6001541633036108c957565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b91908110156109035760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3561093c81610159565b90565b90816020910312610015575190565b6040513d6000823e3d90fd5b916020916000916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb0000000000000000000000000000000000000000000000000000000085521660248301526044820152604481526109bb6064826101c7565b519082855af11561094e576000513d610a34575073ffffffffffffffffffffffffffffffffffffffff81163b155b6109f05750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b600114156109e956fea164736f6c634300081a000a" - -type ProxyContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewProxyContract( - address common.Address, - backend bind.ContractBackend, -) (*ProxyContract, error) { - parsed, err := abi.JSON(strings.NewReader(ProxyABI)) - if err != nil { - return nil, err - } - return &ProxyContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *ProxyContract) Address() common.Address { - return c.address -} - -func (c *ProxyContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *ProxyContract) SetTarget(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setTarget", args) -} - -func (c *ProxyContract) SetFeeAggregator(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setFeeAggregator", args) -} - -func (c *ProxyContract) WithdrawFeeTokens(opts *bind.TransactOpts, args []common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", args) -} - -func (c *ProxyContract) GetTarget(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getTarget") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *ProxyContract) GetFeeAggregator(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getFeeAggregator") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - type ConstructorArgs struct { - Target common.Address - FeeAggregator common.Address + Target common.Address `json:"target"` + FeeAggregator common.Address `json:"feeAggregator"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "proxy:deploy", - Version: Version, - Description: "Deploys the Proxy contract", - ContractMetadata: &bind.MetaData{ - ABI: ProxyABI, - Bin: ProxyBin, - }, + Name: "proxy:deploy", + Version: Version, + Description: "Deploys the Proxy contract", + ContractMetadata: gobindings.ProxyMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(ProxyBin), + EVM: common.FromHex(gobindings.ProxyMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var SetTarget = contract.NewWrite(contract.WriteParams[common.Address, *ProxyContract]{ - Name: "proxy:set-target", - Version: Version, - Description: "Calls setTarget on the contract", - ContractType: ContractType, - ContractABI: ProxyABI, - NewContract: NewProxyContract, - IsAllowedCaller: contract.OnlyOwner[*ProxyContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *ProxyContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetTarget(opts, args) - }, -}) +func NewWriteSetTarget(c gobindings.ProxyInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.ProxyInterface]{ + Name: "proxy:set-target", + Version: Version, + Description: "Calls setTarget on the contract", + ContractType: ContractType, + ContractABI: gobindings.ProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ProxyInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ProxyInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetTarget(opts, args) + }, + }) +} -var SetFeeAggregator = contract.NewWrite(contract.WriteParams[common.Address, *ProxyContract]{ - Name: "proxy:set-fee-aggregator", - Version: Version, - Description: "Calls setFeeAggregator on the contract", - ContractType: ContractType, - ContractABI: ProxyABI, - NewContract: NewProxyContract, - IsAllowedCaller: contract.OnlyOwner[*ProxyContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *ProxyContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetFeeAggregator(opts, args) - }, -}) +func NewWriteSetFeeAggregator(c gobindings.ProxyInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.ProxyInterface]{ + Name: "proxy:set-fee-aggregator", + Version: Version, + Description: "Calls setFeeAggregator on the contract", + ContractType: ContractType, + ContractABI: gobindings.ProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ProxyInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ProxyInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetFeeAggregator(opts, args) + }, + }) +} -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[[]common.Address, *ProxyContract]{ - Name: "proxy:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: ProxyABI, - NewContract: NewProxyContract, - IsAllowedCaller: contract.OnlyOwner[*ProxyContract, []common.Address], - Validate: func([]common.Address) error { return nil }, - CallContract: func( - c *ProxyContract, - opts *bind.TransactOpts, - args []common.Address, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args) - }, -}) +func NewWriteWithdrawFeeTokens(c gobindings.ProxyInterface) *cld_ops.Operation[contract.FunctionInput[[]common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]common.Address, gobindings.ProxyInterface]{ + Name: "proxy:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.ProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.ProxyInterface, opts *bind.CallOpts, caller common.Address, args []common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.ProxyInterface, + opts *bind.TransactOpts, + args []common.Address, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args) + }, + }) +} -var GetTarget = contract.NewRead(contract.ReadParams[struct{}, common.Address, *ProxyContract]{ - Name: "proxy:get-target", - Version: Version, - Description: "Calls getTarget on the contract", - ContractType: ContractType, - NewContract: NewProxyContract, - CallContract: func(c *ProxyContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetTarget(opts) - }, -}) +func NewReadGetTarget(c gobindings.ProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.ProxyInterface]{ + Name: "proxy:get-target", + Version: Version, + Description: "Calls getTarget on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ProxyInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetTarget(opts) + }, + }) +} -var GetFeeAggregator = contract.NewRead(contract.ReadParams[struct{}, common.Address, *ProxyContract]{ - Name: "proxy:get-fee-aggregator", - Version: Version, - Description: "Calls getFeeAggregator on the contract", - ContractType: ContractType, - NewContract: NewProxyContract, - CallContract: func(c *ProxyContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetFeeAggregator(opts) - }, -}) +func NewReadGetFeeAggregator(c gobindings.ProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.ProxyInterface]{ + Name: "proxy:get-fee-aggregator", + Version: Version, + Description: "Calls getFeeAggregator on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.ProxyInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetFeeAggregator(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/rmn/rmn.go b/chains/evm/deployment/v2_0_0/operations/rmn/rmn.go index e8533a5bf5..e0f7f30d3e 100644 --- a/chains/evm/deployment/v2_0_0/operations/rmn/rmn.go +++ b/chains/evm/deployment/v2_0_0/operations/rmn/rmn.go @@ -3,277 +3,191 @@ package rmn import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/rmn" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "RMN" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const RMNABI = `[{"type":"constructor","inputs":[{"name":"curseAdmins","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"curse","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"curse","inputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getCursedSubjects","inputs":[],"outputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"stateMutability":"view"},{"type":"function","name":"isCursed","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isCursed","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"uncurse","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"uncurse","inputs":[{"name":"subjects","type":"bytes16[]","internalType":"bytes16[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Cursed","inputs":[{"name":"subjects","type":"bytes16[]","indexed":false,"internalType":"bytes16[]"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"Uncursed","inputs":[{"name":"subjects","type":"bytes16[]","indexed":false,"internalType":"bytes16[]"}],"anonymous":false},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NotCursed","inputs":[{"name":"subject","type":"bytes16","internalType":"bytes16"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const RMNBin = "0x60806040523461020f576118b28038038061001981610214565b92833981019060208183031261020f578051906001600160401b03821161020f570181601f8201121561020f578051916001600160401b0383116101c8578260051b9160208061006a818601610214565b80968152019382010191821161020f57602001915b8183106101ef578333156101de57600180546001600160a01b031916331790556020906100ab82610214565b60008152600036813760408051929083016001600160401b038111848210176101c8576040528252808383015260005b8151811015610142576001906001600160a01b036100f98285610239565b5116856101058261027b565b610112575b5050016100db565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a1858561010a565b50505160005b81518110156101b9576001600160a01b036101638284610239565b51169081156101a8577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef848361019a600195610379565b50604051908152a101610148565b6342bcdf7f60e11b60005260046000fd5b6040516114d890816103da8239f35b634e487b7160e01b600052604160045260246000fd5b639b15e16f60e01b60005260046000fd5b82516001600160a01b038116810361020f5781526020928301920161007f565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176101c857604052565b805182101561024d5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b805482101561024d5760005260206000200190600090565b600081815260036020526040902054801561037257600019810181811161035c5760025460001981019190821161035c5780820361030b575b50505060025480156102f557600019016102cf816002610263565b8154906000199060031b1b19169055600255600052600360205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b61034461031c61032d936002610263565b90549060031b1c9283926002610263565b819391549060031b91821b91600019901b19161790565b905560005260036020526040600020553880806102b4565b634e487b7160e01b600052601160045260246000fd5b5050600090565b806000526003602052604060002054156000146103d357600254680100000000000000008110156101c8576103ba61032d8260018594016002556002610263565b9055600254906000526003602052604060002055600190565b5060009056fe6080604052600436101561001257600080fd5b60003560e01c8063181f5a77146100e75780632451a627146100e25780632cbc26bb146100dd578063397796f7146100d857806362eed415146100d35780636d2d3993146100ce57806379ba5097146100c95780638da5cb5b146100c457806391a2749a146100bf5780639a19b329146100ba578063d881e092146100b5578063f2fde38b146100b05763f8bb876e146100ab57600080fd5b610b89565b610a96565b6109f5565b61093c565b6107c7565b6106e2565b6105f9565b6104a6565b610429565b6103f0565b6103a5565b6102a4565b61017d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761013757604052565b6100ec565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761013757604052565b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f576040516101b88161011b565b600981527f524d4e20322e302e300000000000000000000000000000000000000000000000602082015260405190602082528181519182602083015260005b8381106102375750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604080968601015201168101030190f35b602082820181015160408784010152859350016101f7565b600080fd5b602060408183019282815284518094520192019060005b8181106102785750505090565b825173ffffffffffffffffffffffffffffffffffffffff1684526020938401939092019160010161026b565b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760405180602060025491828152019060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9060005b8181106103335761032f856103238187038261013c565b60405191829182610254565b0390f35b825484526020909301926001928301920161030c565b600435907fffffffffffffffffffffffffffffffff000000000000000000000000000000008216820361024f57565b35907fffffffffffffffffffffffffffffffff000000000000000000000000000000008216820361024f57565b3461024f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760206103e66103e1610349565b610b9f565b6040519015158152f35b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760206103e6610c3c565b3461024f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f57610460610349565b610468610c99565b8051156104a1577fffffffffffffffffffffffffffffffff0000000000000000000000000000000061049f92166020820152610f8a565b005b610d28565b3461024f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f576104dd610349565b6104e5610c99565b908151156104a1577fffffffffffffffffffffffffffffffff0000000000000000000000000000000016602082015261051c6110b5565b60005b81518110156105c45761055d7fffffffffffffffffffffffffffffffff000000000000000000000000000000006105568385610d57565b5116611258565b1561056a5760010161051f565b610595907fffffffffffffffffffffffffffffffff0000000000000000000000000000000092610d57565b51167f73281fa10000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6040517f0676e709c9cc74fa0519fd78f7c33be0f1b2b0bae0507c724aef7229379c6ba190806105f48582610999565b0390a1005b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760005473ffffffffffffffffffffffffffffffffffffffff811633036106b8577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b67ffffffffffffffff81116101375760051b60200190565b9080601f8301121561024f5781359061076482610734565b92610772604051948561013c565b82845260208085019360051b82010191821161024f57602001915b81831061079a5750505090565b823573ffffffffffffffffffffffffffffffffffffffff8116810361024f5781526020928301920161078d565b3461024f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760043567ffffffffffffffff811161024f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc823603011261024f576040516108408161011b565b816004013567ffffffffffffffff811161024f57610864906004369185010161074c565b8152602482013567ffffffffffffffff811161024f5761049f92600461088d923692010161074c565b6020820152610d6b565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261024f576004359067ffffffffffffffff821161024f578060238301121561024f5781600401356108ed81610734565b926108fb604051948561013c565b8184526024602085019260051b82010192831161024f57602401905b8282106109245750505090565b6020809161093184610378565b815201910190610917565b3461024f5761094a36610897565b6109526110b5565b60005b81518110156105c45761098c7fffffffffffffffffffffffffffffffff000000000000000000000000000000006105568385610d57565b1561056a57600101610955565b602060408183019282815284518094520192019060005b8181106109bd5750505090565b82517fffffffffffffffffffffffffffffffff00000000000000000000000000000000168452602093840193909201916001016109b0565b3461024f5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760405180602060045491828152019060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9060005b818110610a805761032f85610a748187038261013c565b60405191829182610999565b8254845260209093019260019283019201610a5d565b3461024f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261024f5760043573ffffffffffffffffffffffffffffffffffffffff811680910361024f57610aee6110b5565b338114610b5f57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461024f5761049f610b9a36610897565b610f8a565b60045415610c36577fffffffffffffffffffffffffffffffff0000000000000000000000000000000016600052600560205260406000205415801590610be25790565b507f010000000000000000000000000000010000000000000000000000000000000060005260056020527f8f496e4ceafb62bf7f18e44784f657270af67789253a1cc665c8d949978172bc54151590565b90565b50600090565b60045415610c94577f010000000000000000000000000000010000000000000000000000000000000060005260056020527f8f496e4ceafb62bf7f18e44784f657270af67789253a1cc665c8d949978172bc54151590565b600090565b60408051909190610caa838261013c565b60018152917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001366020840137565b90610ce382610734565b610cf0604051918261013c565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610d1e8294610734565b0190602036910137565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156104a15760209160051b010190565b610d736110b5565b60208101519160005b8351811015610e415780610daf610d9560019387610d57565b5173ffffffffffffffffffffffffffffffffffffffff1690565b610deb610de673ffffffffffffffffffffffffffffffffffffffff83165b73ffffffffffffffffffffffffffffffffffffffff1690565b611404565b610df7575b5001610d7c565b60405173ffffffffffffffffffffffffffffffffffffffff9190911681527fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758090602090a138610df0565b5091505160005b8151811015610f2557610e5e610d958284610d57565b9073ffffffffffffffffffffffffffffffffffffffff821615610efb577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef610ef283610eca610ec5610dcd60019773ffffffffffffffffffffffffffffffffffffffff1690565b611398565b5060405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390a101610e48565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b5050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610f855760010190565b610f29565b90610fad610dcd60015473ffffffffffffffffffffffffffffffffffffffff1690565b33036110a8575b610fbe8251610cd9565b916000805b8251811015611064578061100a611005610fdf60019487610d57565b517fffffffffffffffffffffffffffffffff000000000000000000000000000000001690565b611144565b611015575b01610fc3565b61105f611025610fdf8387610d57565b61103861103186610f58565b9589610d57565b907fffffffffffffffffffffffffffffffff00000000000000000000000000000000169052565b61100f565b5090509190918015610f255781526040517f1716e663a90a76d3b6c7e5f680673d1b051454c19c627e184c8daf28f3104f749181906110a39082610999565b0390a1565b6110b0611100565b610fb4565b73ffffffffffffffffffffffffffffffffffffffff6001541633036110d657565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b3360005260036020526040600020541561111657565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000610c33911660046113cd565b80548210156104a15760005260206000200190600090565b916111c1918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b80548015611229577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906111fa8282611171565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600081815260056020526040902054908115611335577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820190828211610f8557600454927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411610f855783836000956112f495036112fa575b5050506112e360046111c5565b600590600052602052604060002090565b55600190565b6112e36113269161131c61131261132c956004611171565b90549060031b1c90565b9283916004611171565b90611189565b553880806112d6565b5050600090565b8054906801000000000000000082101561013757816113639160016111c194018155611171565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b600081815260036020526040902054610c36576113b681600261133c565b600254906000526003602052604060002055600190565b600082815260018201602052604090205461133557806113ef8360019361133c565b80549260005201602052604060002055600190565b600081815260036020526040902054908115611335577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820190828211610f8557600254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8401938411610f855783836112f494600096036114a0575b50505061148f60026111c5565b600390600052602052604060002090565b61148f611326916114b86113126114c2956002611171565b9283916002611171565b5538808061148256fea164736f6c634300081a000a" - -type RMNContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewRMNContract( - address common.Address, - backend bind.ContractBackend, -) (*RMNContract, error) { - parsed, err := abi.JSON(strings.NewReader(RMNABI)) - if err != nil { - return nil, err - } - return &RMNContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *RMNContract) Address() common.Address { - return c.address -} - -func (c *RMNContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *RMNContract) Curse(opts *bind.TransactOpts, args [16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "curse", args) -} - -func (c *RMNContract) Curse0(opts *bind.TransactOpts, args [][16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "curse0", args) +type ConstructorArgs struct { + CurseAdmins []common.Address `json:"curseAdmins"` } -func (c *RMNContract) Uncurse(opts *bind.TransactOpts, args [16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "uncurse", args) -} +var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ + Name: "rmn:deploy", + Version: Version, + Description: "Deploys the RMN contract", + ContractMetadata: gobindings.RMNMetaData, + BytecodeByTypeAndVersion: map[string]contract.Bytecode{ + cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { + EVM: common.FromHex(gobindings.RMNMetaData.Bin), + }, + }, +}) -func (c *RMNContract) Uncurse0(opts *bind.TransactOpts, args [][16]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "uncurse0", args) +func NewWriteCurse(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[16]byte, gobindings.RMNInterface]{ + Name: "rmn:curse", + Version: Version, + Description: "Calls curse on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNInterface, opts *bind.CallOpts, caller common.Address, args [16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNInterface, + opts *bind.TransactOpts, + args [16]byte, + ) (*types.Transaction, error) { + return c.Curse(opts, args) + }, + }) } -func (c *RMNContract) IsCursed(opts *bind.CallOpts, args [16]byte) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isCursed", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil +func NewWriteCurse0(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[[][16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[][16]byte, gobindings.RMNInterface]{ + Name: "rmn:curse0", + Version: Version, + Description: "Calls curse0 on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNInterface, opts *bind.CallOpts, caller common.Address, args [][16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNInterface, + opts *bind.TransactOpts, + args [][16]byte, + ) (*types.Transaction, error) { + return c.Curse0(opts, args) + }, + }) } -func (c *RMNContract) IsCursed0(opts *bind.CallOpts) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isCursed0") - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil +func NewWriteUncurse(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[16]byte, gobindings.RMNInterface]{ + Name: "rmn:uncurse", + Version: Version, + Description: "Calls uncurse on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNInterface, opts *bind.CallOpts, caller common.Address, args [16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNInterface, + opts *bind.TransactOpts, + args [16]byte, + ) (*types.Transaction, error) { + return c.Uncurse(opts, args) + }, + }) } -func (c *RMNContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) +func NewWriteUncurse0(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[[][16]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[][16]byte, gobindings.RMNInterface]{ + Name: "rmn:uncurse0", + Version: Version, + Description: "Calls uncurse0 on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNInterface, opts *bind.CallOpts, caller common.Address, args [][16]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNInterface, + opts *bind.TransactOpts, + args [][16]byte, + ) (*types.Transaction, error) { + return c.Uncurse0(opts, args) + }, + }) } -func (c *RMNContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil +func NewReadIsCursed(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[[16]byte], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[[16]byte, bool, gobindings.RMNInterface]{ + Name: "rmn:is-cursed", + Version: Version, + Description: "Calls isCursed on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNInterface, opts *bind.CallOpts, args [16]byte) (bool, error) { + return c.IsCursed(opts, args) + }, + }) } -func (c *RMNContract) GetCursedSubjects(opts *bind.CallOpts) ([][16]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getCursedSubjects") - if err != nil { - var zero [][16]byte - return zero, err - } - return *abi.ConvertType(out[0], new([][16]byte)).(*[][16]byte), nil +func NewReadIsCursed0(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, bool, gobindings.RMNInterface]{ + Name: "rmn:is-cursed0", + Version: Version, + Description: "Calls isCursed0 on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNInterface, opts *bind.CallOpts, args struct{}) (bool, error) { + return c.IsCursed0(opts) + }, + }) } -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.RMNInterface]{ + Name: "rmn:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.RMNMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.RMNInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.RMNInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) } -type ConstructorArgs struct { - CurseAdmins []common.Address +func NewReadGetAllAuthorizedCallers(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.RMNInterface]{ + Name: "rmn:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) } -var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "rmn:deploy", - Version: Version, - Description: "Deploys the RMN contract", - ContractMetadata: &bind.MetaData{ - ABI: RMNABI, - Bin: RMNBin, - }, - BytecodeByTypeAndVersion: map[string]contract.Bytecode{ - cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(RMNBin), +func NewReadGetCursedSubjects(c gobindings.RMNInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [][16]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [][16]byte, gobindings.RMNInterface]{ + Name: "rmn:get-cursed-subjects", + Version: Version, + Description: "Calls getCursedSubjects on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.RMNInterface, opts *bind.CallOpts, args struct{}) ([][16]byte, error) { + return c.GetCursedSubjects(opts) }, - }, - Validate: func(ConstructorArgs) error { return nil }, -}) - -var Curse = contract.NewWrite(contract.WriteParams[[16]byte, *RMNContract]{ - Name: "rmn:curse", - Version: Version, - Description: "Calls curse on the contract", - ContractType: ContractType, - ContractABI: RMNABI, - NewContract: NewRMNContract, - IsAllowedCaller: contract.IsAuthorizedCaller[*RMNContract, [16]byte], - Validate: func([16]byte) error { return nil }, - CallContract: func( - c *RMNContract, - opts *bind.TransactOpts, - args [16]byte, - ) (*types.Transaction, error) { - return c.Curse(opts, args) - }, -}) - -var Curse0 = contract.NewWrite(contract.WriteParams[[][16]byte, *RMNContract]{ - Name: "rmn:curse0", - Version: Version, - Description: "Calls curse0 on the contract", - ContractType: ContractType, - ContractABI: RMNABI, - NewContract: NewRMNContract, - IsAllowedCaller: contract.IsAuthorizedCaller[*RMNContract, [][16]byte], - Validate: func([][16]byte) error { return nil }, - CallContract: func( - c *RMNContract, - opts *bind.TransactOpts, - args [][16]byte, - ) (*types.Transaction, error) { - return c.Curse0(opts, args) - }, -}) - -var Uncurse = contract.NewWrite(contract.WriteParams[[16]byte, *RMNContract]{ - Name: "rmn:uncurse", - Version: Version, - Description: "Calls uncurse on the contract", - ContractType: ContractType, - ContractABI: RMNABI, - NewContract: NewRMNContract, - IsAllowedCaller: contract.OnlyOwner[*RMNContract, [16]byte], - Validate: func([16]byte) error { return nil }, - CallContract: func( - c *RMNContract, - opts *bind.TransactOpts, - args [16]byte, - ) (*types.Transaction, error) { - return c.Uncurse(opts, args) - }, -}) - -var Uncurse0 = contract.NewWrite(contract.WriteParams[[][16]byte, *RMNContract]{ - Name: "rmn:uncurse0", - Version: Version, - Description: "Calls uncurse0 on the contract", - ContractType: ContractType, - ContractABI: RMNABI, - NewContract: NewRMNContract, - IsAllowedCaller: contract.OnlyOwner[*RMNContract, [][16]byte], - Validate: func([][16]byte) error { return nil }, - CallContract: func( - c *RMNContract, - opts *bind.TransactOpts, - args [][16]byte, - ) (*types.Transaction, error) { - return c.Uncurse0(opts, args) - }, -}) - -var IsCursed = contract.NewRead(contract.ReadParams[[16]byte, bool, *RMNContract]{ - Name: "rmn:is-cursed", - Version: Version, - Description: "Calls isCursed on the contract", - ContractType: ContractType, - NewContract: NewRMNContract, - CallContract: func(c *RMNContract, opts *bind.CallOpts, args [16]byte) (bool, error) { - return c.IsCursed(opts, args) - }, -}) - -var IsCursed0 = contract.NewRead(contract.ReadParams[struct{}, bool, *RMNContract]{ - Name: "rmn:is-cursed0", - Version: Version, - Description: "Calls isCursed0 on the contract", - ContractType: ContractType, - NewContract: NewRMNContract, - CallContract: func(c *RMNContract, opts *bind.CallOpts, args struct{}) (bool, error) { - return c.IsCursed0(opts) - }, -}) - -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *RMNContract]{ - Name: "rmn:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: RMNABI, - NewContract: NewRMNContract, - IsAllowedCaller: contract.OnlyOwner[*RMNContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *RMNContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) - -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *RMNContract]{ - Name: "rmn:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewRMNContract, - CallContract: func(c *RMNContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) - -var GetCursedSubjects = contract.NewRead(contract.ReadParams[struct{}, [][16]byte, *RMNContract]{ - Name: "rmn:get-cursed-subjects", - Version: Version, - Description: "Calls getCursedSubjects on the contract", - ContractType: ContractType, - NewContract: NewRMNContract, - CallContract: func(c *RMNContract, opts *bind.CallOpts, args struct{}) ([][16]byte, error) { - return c.GetCursedSubjects(opts) - }, -}) + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go b/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go index 85c218baa2..300c28ac9a 100644 --- a/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go @@ -3,127 +3,62 @@ package siloed_lock_release_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_lock_release_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "SiloedLockReleaseTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const SiloedLockReleaseTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"configureLockBoxes","inputs":[{"name":"lockBoxConfigs","type":"tuple[]","internalType":"struct SiloedLockReleaseTokenPool.LockBoxConfig[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lockBox","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllLockBoxConfigs","inputs":[],"outputs":[{"name":"lockBoxConfigs","type":"tuple[]","internalType":"struct SiloedLockReleaseTokenPool.LockBoxConfig[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lockBox","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getLockBox","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"address","internalType":"contract ILockBox"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"LockBoxNotConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const SiloedLockReleaseTokenPoolBin = "0x60e080604052346101f65760a081615e25803803809161001f8285610247565b8339810103126101f6578051906001600160a01b0382168083036101f65761004960208301610280565b906100566040840161028e565b9261006f60806100686060840161028e565b920161028e565b94331561023657600180546001600160a01b0319163317905582158015610225575b8015610214575b6102035760805260c052308103610170575b5060a052600380546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055604051615b8290816102a38239608051818181610253015281816108a1015281816122cb015281816129b801528181612bd20152818161303d01528181613643015281816136900152614ce0015260a0518181816135160152818161479e015281816147e80152614f91015260c0518181816102e1015281816114040152818161235801528181612a4601526130cb0152f35b60206004916040519283809263313ce56760e01b82525afa600091816101c2575b50156100aa5760ff1660ff82168181036101ab57506100aa565b6332ad3e0760e11b60005260045260245260446000fd5b9091506020813d6020116101fb575b816101de60209383610247565b810103126101f6576101ef90610280565b9038610191565b600080fd5b3d91506101d1565b630a64406560e11b60005260046000fd5b506001600160a01b03821615610098565b506001600160a01b03861615610091565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b0382119082101761026a57604052565b634e487b7160e01b600052604160045260246000fd5b519060ff821682036101f657565b51906001600160a01b03821682036101f65756fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146138a45750806306b859ef146137cc578063181f5a771461376b5780631826b1e7146136b457806321df0da714613670578063240028e8146136195780632422ac451461353a57806324f65ee7146134fc5780632bc3c64d146134c75780632cab0fb614612faf57806337a3210d14612f88578063390775371461291a5780634c5ef0ed146128d357806362ddd3c41461284c5780637437ff9f1461280b57806379ba50971461275e5780638926f54f146127185780638da5cb5b146126f15780639a4575b91461225f578063a42a7b8b14612116578063acdb8f7b14611f92578063acfecf9114611e9a578063ae39a25714611d6b578063b6cfa3b714611cb0578063b794658014611c78578063bfeffd3f14611be6578063c4bffe2b14611ad9578063c7230a60146118ac578063dc04fa1f14611428578063dc0bd971146113e4578063dcbd41bc146111fa578063e8a1da1714610b81578063ea6396db14610a43578063ec6ae7a714610a00578063efd07eec1461083d578063f2fde38b146107885763fbc801a7146101b857600080fd5b34610616576060600319360112610616576004359067ffffffffffffffff8211610616578160040160a06003198436030112610784576101f66139d6565b9160443567ffffffffffffffff8111610784579061021c61023993923690600401613acd565b9390610226614432565b5061023186856151f5565b943691613c0b565b936084860194610248866143cc565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361074757602487019677ffffffffffffffff000000000000000000000000000000006102a1896143e0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156106ba578591610718575b506106f05767ffffffffffffffff610328896143e0565b16610340816000526007602052604060002054151590565b156106c55760206001600160a01b0360025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa80156106ba578590610676575b6001600160a01b03915016330361064a576064810135946103b58787613dd4565b7fffffffff00000000000000000000000000000000000000000000000000000000851694851561062857610411907fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16906148d4565b61042d8161041e8b6143cc565b6104278d6143e0565b90615507565b6001600160a01b03600354169384610511575b6105078a6104d66104d18e6104558e8e613dd4565b9361046885610463846143e0565b614c8e565b7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff6104a461049e856143e0565b936143cc565b604080516001600160a01b039092168252336020830152810188905292169180606081015b0390a26143e0565b6145a3565b906104df614f8a565b604051926104ec84613b94565b83526020830152604051928392604084526040840190613cb5565b9060208301520390f35b843b15610624578694928a949286928d604051998a98899788967fa8027c0f00000000000000000000000000000000000000000000000000000000885260048801608090528061056091615471565b6084890160a0905261012489019061057792613df5565b9361058190613ab8565b67ffffffffffffffff1660a488015260440161059c90613a76565b6001600160a01b031660c48701528d60e48701526105b990613a76565b6001600160a01b031661010486015260248501528381036003190160448501526105e291613afb565b90606483015203925af1801561061957610601575b8080808080610440565b61060c828092613be8565b61061657806105f7565b80fd5b6040513d84823e3d90fd5b8680fd5b50610645816106368b6143cc565b61063f8d6143e0565b906154c1565b61042d565b6024847f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b506020813d6020116106b2575b8161069060209383613be8565b810103126106ae576106a96001600160a01b0391613de1565b610394565b8480fd5b3d9150610683565b6040513d87823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008552600452602484fd5b6004847f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b61073a915060203d602011610740575b6107328183613be8565b810190614712565b38610311565b503d610728565b6024836001600160a01b0361075b896143cc565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b5080fd5b5034610616576020600319360112610616576001600160a01b036107aa613a34565b6107b2614a40565b1633811461081557807fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b5034610616576020600319360112610616576004359067ffffffffffffffff821161061657366023830112156106165781600401359167ffffffffffffffff8311610784576024810190602436918560061b010111610784579161089f614a40565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690825b8181106108d7578380f35b6001600160a01b036108f560206108ef84868a614702565b016143cc565b1680156109d8576040517f75151b63000000000000000000000000000000000000000000000000000000008152846004820152602081602481855afa9081156109cd5786916109af575b5015610983579061097c60019267ffffffffffffffff61096861096385888c614702565b6143e0565b1690818852600f60205260408820556157f6565b50016108cc565b602485857f961c9a4f000000000000000000000000000000000000000000000000000000008252600452fd5b6109c7915060203d8111610740576107328183613be8565b3861093f565b6040513d88823e3d90fd5b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b503461061657806003193601126106165760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b503461061657608060031936011261061657610a5d613a34565b50610a66613a8a565b610a6e613a05565b5060643567ffffffffffffffff8111610b7d579167ffffffffffffffff604092610a9e60e0953690600401613acd565b50508260c08551610aae81613bcc565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610ae682613bcc565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346106165760406003193601126106165760043567ffffffffffffffff811161078457610bb3903690600401613cdf565b9060243567ffffffffffffffff81116111f65790610bd684923690600401613cdf565b939091610be1614a40565b83905b82821061103c5750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b81811015611038578060051b830135858112156106ae578301610120813603126106ae5760405194610c4886613bb0565b610c5182613ab8565b8652602082013567ffffffffffffffff81116107845782019436601f8701121561078457853595610c8187613d41565b96610c8f6040519889613be8565b80885260208089019160051b830101903682116106ae5760208301905b828210611009575050505060208701958652604083013567ffffffffffffffff8111610b7d57610cdf9036908501613c52565b9160408801928352610d09610cf7366060870161464f565b9460608a0195865260c036910161464f565b956080890196875283515115610fe157610d2d67ffffffffffffffff8a5116615796565b15610faa5767ffffffffffffffff8951168252600860205260408220610d54865182614fc5565b610d62885160028301614fc5565b6004855191019080519067ffffffffffffffff8211610f7d57610d85835461448e565b601f8111610f42575b50602090601f8311600114610edf57610dbe9291869183610ed4575b50506000198260011b9260031b1c19161790565b90555b815b88518051821015610df85790610df2600192610deb8367ffffffffffffffff8f51169261444b565b5190614a7e565b01610dc3565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610ec667ffffffffffffffff6001979694985116925193519151610e92610e5d60405196879687526101006020880152610100870190613afb565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610c17565b015190508e80610daa565b8386528186209190601f198416875b818110610f2a5750908460019594939210610f11575b505050811b019055610dc1565b015160001960f88460031b161c191690558d8080610f04565b92936020600181928786015181550195019301610eee565b610f6d9084875260208720601f850160051c81019160208610610f73575b601f0160051c01906146eb565b8d610d8e565b9091508190610f60565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff81116106245760209161102d8392833691890101613c52565b815201910190610cac565b8380f35b9267ffffffffffffffff6110596109638486889a9699979a614622565b1691611064836155da565b156111ca57828452600860205261108060056040862001615577565b94845b86518110156110b95760019085875260086020526110b2600560408920016110ab838b61444b565b51906156da565b5001611083565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110f5815461448e565b80611189575b505050018054908881558161116b575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610be4565b885260208820908101905b8181101561110b57888155600101611176565b601f811160011461119f5750555b888a806110fb565b818352602083206111ba91601f01861c8101906001016146eb565b8082528160208120915555611197565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b8380fd5b50346106165760206003193601126106165760043567ffffffffffffffff81116107845761122c903690600401613d10565b6001600160a01b03600a5416331415806113cf575b6113a357825b818110611252578380f35b61125d8183856145c5565b67ffffffffffffffff61126f826143e0565b1690611288826000526007602052604060002054151590565b1561137757907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e083611337611311602060019897018b6112c9826145d5565b1561133e5787905260046020526112f060408d206112ea366040880161464f565b90614fc5565b868c52600560205261130c60408d206112ea3660a0880161464f565b6145d5565b91604051921515835261132a60208401604083016146a7565b60a06080840191016146a7565ba201611247565b60026040828a61130c945260086020526113608282206112ea36858c0161464f565b8a8152600860205220016112ea3660a0880161464f565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b0360015416331415611241565b503461061657806003193601126106165760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106165760406003193601126106165760043567ffffffffffffffff81116107845761145a903690600401613d10565b60243567ffffffffffffffff81116111f65761147a903690600401613cdf565b919092611485614a40565b845b8281106114f157505050825b81811061149e578380f35b8067ffffffffffffffff6114b86109636001948688614622565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a201611493565b67ffffffffffffffff6115086109638386866145c5565b16611520816000526007602052604060002054151590565b15611881576115308285856145c5565b602081019060e0810190611543826145d5565b156118555760a0810161271061ffff61155b836145e2565b1610156118465760c082019161271061ffff611576856145e2565b16101561180e5763ffffffff61158b866145f1565b16156117e257858c52600b60205260408c206115a6866145f1565b63ffffffff169080549060408401916115be836145f1565b60201b67ffffffff00000000169360608601946115da866145f1565b60401b6bffffffff00000000000000001696608001966115f9886145f1565b60601b6fffffffff00000000000000000000000016916116188a6145e2565b60801b71ffff0000000000000000000000000000000016936116398c6145e2565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556116ec876145d5565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661173d90614602565b63ffffffff16875261174e90614602565b63ffffffff16602087015261176290614602565b63ffffffff16604086015261177690614602565b63ffffffff16606085015261178a90614613565b61ffff16608084015261179c90614613565b61ffff1660a08301526117ae90613b3c565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a2600101611487565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61181d866145e2565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61181d6024936145e2565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346106165760406003193601126106165760043567ffffffffffffffff8111610784576118de903690600401613cdf565b906118e7613a60565b916001600160a01b036001541633141580611ac4575b611a98576001600160a01b038316908115611a7057845b81811061191f578580f35b6001600160a01b0361193a611935838588614622565b6143cc565b1690604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa8015611a655785908990611a2b575b6001945080611994575b50505001611914565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000006020828101919091526001600160a01b038b166024830152604482018390527f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e929091611a1c90611a1681606481015b03601f198101835282613be8565b86615af8565b604051908152a338848161198b565b5050909160203d8111611a5e575b611a438183613be8565b60208260009281010312610616575090846001939251611981565b503d611a39565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b03600c54163314156118fd565b5034610616578060031936011261061657604051906006548083528260208101600684526020842092845b818110611bcd575050611b1992500383613be8565b8151611b3d611b2782613d41565b91611b356040519384613be8565b808352613d41565b91601f19602083019301368437805b8451811015611b7e578067ffffffffffffffff611b6b6001938861444b565b5116611b77828661444b565b5201611b4c565b50925090604051928392602084019060208552518091526040840192915b818110611baa575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611b9c565b8454835260019485019487945060209093019201611b04565b5034610616576020600319360112610616576004356001600160a01b03811680910361078457611c14614a40565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d581209604080516001600160a01b0384168152856020820152a1161760035580f35b503461061657602060031936011261061657611cac611c986104d1613aa1565b604051918291602083526020830190613afb565b0390f35b5034610616576020600319360112610616577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611ced6139a2565b611cf5614a40565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b503461061657606060031936011261061657611d85613a34565b90611d8e613a60565b604435926001600160a01b0384168085036111f657611dab614a40565b6001600160a01b03821680156109d85794611e94917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556001600160a01b0385167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c55604051938493849160409194936001600160a01b03809281606087019816865216602085015216910152565b0390a180f35b50346106165767ffffffffffffffff611eb236613c70565b929091611ebd614a40565b1691611ed6836000526007602052604060002054151590565b156111ca578284526008602052611f0560056040862001611ef8368486613c0b565b60208151910120906156da565b15611f4a57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d7691611f44604051928392602084526020840191613df5565b0390a280f35b82611f8e836040519384937f74f23c7c0000000000000000000000000000000000000000000000000000000085526004850152604060248501526044840191613df5565b0390fd5b5034610616578060031936011261061657600d5490611fb082613d41565b91611fbe6040519384613be8565b808352601f19611fcd82613d41565b01825b8181106120eb575050600d54825b82811061204b57505050604051918291602083016020845282518091526020604085019301915b818110612013575050500390f35b8251805167ffffffffffffffff1685526020908101516001600160a01b03168186015286955060409094019390920191600101612005565b92939192818110156120be57600190600d8652806020872001548660031b1c808752600f6020526001600160a01b0360408820541667ffffffffffffffff6040519261209684613b94565b16825260208201526120a8828661444b565b526120b3818561444b565b500193929193611fde565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b602090604095939495516120fe81613b94565b86815286838201528282860101520193929193611fd0565b50346106165760206003193601126106165767ffffffffffffffff612139613aa1565b168152600860205261215060056040832001615577565b8051601f1961217761216183613d41565b9261216f6040519485613be8565b808452613d41565b01835b81811061224e575050825b82518110156121cb578061219b6001928561444b565b51855260096020526121af604086206144e1565b6121b9828561444b565b526121c4818461444b565b5001612185565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061220357505050500390f35b9193602061223e827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613afb565b96019201920185949391926121f4565b80606060208093860101520161217a565b50346106165760206003193601126106165760043567ffffffffffffffff811161078457806004019060a06003198236030112610b7d5761229e614432565b506040516020936122af8583613be8565b80825260848301916122c0836143cc565b6001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116036126dd57602484019477ffffffffffffffff00000000000000000000000000000000612319876143e0565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015287816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156126625784916126c0575b506126985767ffffffffffffffff61239f876143e0565b166123b7816000526007602052604060002054151590565b1561266d57876001600160a01b0360025416916024604051809481937fa8d87a3b00000000000000000000000000000000000000000000000000000000835260048301525afa8015612662578490612627575b6001600160a01b0391501633036125fb576064850135946124378661242e876143cc565b61063f8a6143e0565b6001600160a01b036003541691826124fa575b886124ca6104d18a8a7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8c61248b84610463876143e0565b6104c96124a061249a876143e0565b926143cc565b604080516001600160a01b0390921682523360208301528101959095529116929081906060820190565b906124d3614f8a565b604051926124e084613b94565b835281830152611cac604051928284938452830190613cb5565b823b156106ae57918791858094604051968795869485937fa8027c0f00000000000000000000000000000000000000000000000000000000855260048501608090528061254691615471565b6084860160a0905261012486019061255d92613df5565b9161256790613ab8565b67ffffffffffffffff1660a485015260440161258290613a76565b6001600160a01b031660c48401528b60e484015261259f8b613a76565b6001600160a01b03166101048401528360248401528281036003190160448401526125c991613afb565b8a606483015203925af18015610619576125e6575b80808061244a565b6125f1828092613be8565b61061657806125de565b6024837f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b508781813d831161265b575b61263d8183613be8565b810103126111f6576126566001600160a01b0391613de1565b61240a565b503d612633565b6040513d86823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008452600452602483fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6126d79150883d8a11610740576107328183613be8565b38612388565b506001600160a01b0361075b6024936143cc565b503461061657806003193601126106165760206001600160a01b0360015416604051908152f35b503461061657602060031936011261061657602061275467ffffffffffffffff612740613aa1565b166000526007602052604060002054151590565b6040519015158152f35b503461061657806003193601126106165780546001600160a01b03811633036127e3577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551682556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b5034610616578060031936011261061657600254600a54600c54604080516001600160a01b0394851681529284166020840152921691810191909152606090f35b50346106165761285b36613c70565b61286793929193614a40565b67ffffffffffffffff8216612889816000526007602052604060002054151590565b156128a857506128a5929361289f913691613c0b565b90614a7e565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b5034610616576040600319360112610616576128ed613aa1565b906024359067ffffffffffffffff8211610616576020612754846129143660048701613c52565b906143f5565b5034610616576020600319360112610616576004359067ffffffffffffffff82116106165781600401906101006003198436030112610616578060405161296081613b49565b528060405161296e81613b49565b52606483013560c484019361299e61299861299361298c888861437b565b3691613c0b565b61472a565b836147e5565b9360848201956129ad876143cc565b6001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016911603612f7457602483019377ffffffffffffffff00000000000000000000000000000000612a06866143e0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115612ef7578791612f55575b50612f2d5767ffffffffffffffff612a8d866143e0565b16612aa5816000526007602052604060002054151590565b15612f025760206001600160a01b0360025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115612ef7578791612ed8575b5015612eac57612b0f856143e0565b92612b2560a486019461291461298c878561437b565b15612e6557612b4688612b378b6143cc565b612b40896143e0565b90615395565b6001600160a01b03600354169283612cad575b505050505060440191612b6b836143cc565b612b74836143e0565b6001600160a01b03612b8582614327565b16803b156111f657608484928367ffffffffffffffff936001600160a01b0360405197889687957f74fd18ac000000000000000000000000000000000000000000000000000000008752837f00000000000000000000000000000000000000000000000000000000000000001660048801521660248601528c60448601521660648401525af1801561061957612c98575b5050608067ffffffffffffffff6020956001600160a01b03612c64612c5e61049e7ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc0976143e0565b966143cc565b816040519716875233898801521660408601528560608601521692a260405190612c8d82613b49565b815260405190518152f35b612ca3828092613be8565b6106165780612c16565b833b15612e6157878795938195938c93604051988997889687957f6371157400000000000000000000000000000000000000000000000000000000875260048701606090528d612cfd8780615471565b60648a0161010090526101648a0190612d1592613df5565b94612d1f90613ab8565b67ffffffffffffffff166084890152604401612d3a90613a76565b6001600160a01b031660a488015260c4870152612d5690613a76565b6001600160a01b031660e4860152612d6e9084615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c86840301610104870152612da39291613df5565b90612dae9083615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c85840301610124860152612de39291613df5565b9060e48a01612df191615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c84840301610144850152612e269291613df5565b8b602483015282604483015203925af1801561266257908491612e4c575b808080612b59565b81612e5691613be8565b610b7d578238612e44565b8780fd5b83612e6f9161437b565b611f8e6040519283927f24eb47e5000000000000000000000000000000000000000000000000000000008452602060048501526024840191613df5565b6024867f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b612ef1915060203d602011610740576107328183613be8565b38612b00565b6040513d89823e3d90fd5b7fa9902c7e000000000000000000000000000000000000000000000000000000008752600452602486fd5b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b612f6e915060203d602011610740576107328183613be8565b38612a76565b6024856001600160a01b0361075b8a6143cc565b503461061657806003193601126106165760206001600160a01b0360035416604051908152f35b5034610616576040600319360112610616576004359067ffffffffffffffff8211610616578160040190610100600319843603011261061657612ff06139d6565b9181604051612ffe81613b49565b5260648401359360c481019361302361301d61299361298c888761437b565b876147e5565b946084830196613032886143cc565b6001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116036134b357602484019477ffffffffffffffff0000000000000000000000000000000061308b876143e0565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115611a65578891613494575b5061346c5767ffffffffffffffff613112876143e0565b1661312a816000526007602052604060002054151590565b156134415760206001600160a01b0360025416916044604051809481937f83826b2b00000000000000000000000000000000000000000000000000000000835260048301523360248301525afa908115611a65578891613422575b50156133f657613194866143e0565b936131aa60a487019561291461298c888661437b565b156133ec577fffffffff00000000000000000000000000000000000000000000000000000000169081156133d1576131f4896131e58c6143cc565b6131ee8a6143e0565b90615401565b6001600160a01b0360035416938461321a575b50505050505060440191612b6b836143cc565b843b156133cd57868995938c959387938b6040519a8b998a9889977f63711574000000000000000000000000000000000000000000000000000000008952600489016060905261326a8780615471565b60648b0161010090526101648b019061328292613df5565b9461328c90613ab8565b67ffffffffffffffff1660848a01526044016132a790613a76565b6001600160a01b031660a489015260c48801526132c390613a76565b6001600160a01b031660e48701526132db9084615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c878403016101048801526133109291613df5565b9061331b9083615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c868403016101248701526133509291613df5565b9060e48b0161335e91615471565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c858403016101448601526133939291613df5565b908c6024840152604483015203925af18015612662576133b8575b8080808080613207565b926133c68160449395613be8565b92906133ae565b8880fd5b6133e7896133de8c6143cc565b612b408a6143e0565b6131f4565b612e6f858361437b565b6024877f728fe07b00000000000000000000000000000000000000000000000000000000815233600452fd5b61343b915060203d602011610740576107328183613be8565b38613185565b7fa9902c7e000000000000000000000000000000000000000000000000000000008852600452602487fd5b6004877f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6134ad915060203d602011610740576107328183613be8565b386130fb565b6024866001600160a01b0361075b8b6143cc565b50346106165760206003193601126106165760206134eb6134e6613aa1565b614327565b6001600160a01b0360405191168152f35b5034610616578060031936011261061657602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461061657604060031936011261061657613554613aa1565b6024359182151583036106165761014061361761357185856142a4565b6135c760409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b503461061657602060031936011261061657602090613636613a34565b90506001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b503461061657806003193601126106165760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346106165760c0600319360112610616576136ce613a34565b506136d7613a8a565b6136df613a4a565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036106165760a4359067ffffffffffffffff82116106165760a063ffffffff8061ffff613744888861373d3660048b01613acd565b50506140f4565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b503461061657806003193601126106165750611cac60405161378e604082613be8565b602081527f53696c6f65644c6f636b52656c65617365546f6b656e506f6f6c20322e302e306020820152604051918291602083526020830190613afb565b50346106165760c0600319360112610616576137e6613a34565b6137ee613a8a565b906064357fffffffff00000000000000000000000000000000000000000000000000000000811681036111f65760843567ffffffffffffffff81116106ae5761383b903690600401613acd565b9160a435936002851015610624576138569560443591613e16565b90604051918291602083016020845282518091526020604085019301915b818110613882575050500390f35b82516001600160a01b0316845285945060209384019390920191600101613874565b905034610784576020600319360112610784576020907fffffffff000000000000000000000000000000000000000000000000000000006138e36139a2565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613978575b811561394e575b8115613924575b5015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361391d565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613916565b7f940a1542000000000000000000000000000000000000000000000000000000008114915061390f565b600435907fffffffff00000000000000000000000000000000000000000000000000000000821682036139d157565b600080fd5b602435907fffffffff00000000000000000000000000000000000000000000000000000000821682036139d157565b604435907fffffffff00000000000000000000000000000000000000000000000000000000821682036139d157565b600435906001600160a01b03821682036139d157565b606435906001600160a01b03821682036139d157565b602435906001600160a01b03821682036139d157565b35906001600160a01b03821682036139d157565b6024359067ffffffffffffffff821682036139d157565b6004359067ffffffffffffffff821682036139d157565b359067ffffffffffffffff821682036139d157565b9181601f840112156139d15782359167ffffffffffffffff83116139d157602083818601950101116139d157565b919082519283825260005b848110613b27575050601f19601f8460006020809697860101520116010190565b80602080928401015182828601015201613b06565b359081151582036139d157565b6020810190811067ffffffffffffffff821117613b6557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613b6557604052565b60a0810190811067ffffffffffffffff821117613b6557604052565b60e0810190811067ffffffffffffffff821117613b6557604052565b90601f601f19910116810190811067ffffffffffffffff821117613b6557604052565b92919267ffffffffffffffff8211613b655760405191613c35601f8201601f191660200184613be8565b8294818452818301116139d1578281602093846000960137010152565b9080601f830112156139d157816020613c6d93359101613c0b565b90565b9060406003198301126139d15760043567ffffffffffffffff811681036139d157916024359067ffffffffffffffff82116139d157613cb191600401613acd565b9091565b613c6d916020613cce8351604084526040840190613afb565b920151906020818403910152613afb565b9181601f840112156139d15782359167ffffffffffffffff83116139d1576020808501948460051b0101116139d157565b9181601f840112156139d15782359167ffffffffffffffff83116139d1576020808501948460081b0101116139d157565b67ffffffffffffffff8111613b655760051b60200190565b81810292918115918404141715613d6c57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115613da5570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91908203918211613d6c57565b51906001600160a01b03821682036139d157565b601f8260209493601f19938186528686013760008582860101520116010190565b9295939091946001600160a01b03600354169586156140d257809760028710156140a3576001600160a01b0398613f5d957fffffffff0000000000000000000000000000000000000000000000000000000093896140795767ffffffffffffffff8216600052600b60205260406000209060405191613e9483613bcc565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c1615159182910152614025575b50505067ffffffffffffffff905b6040519b8c997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c4840191613df5565b928180600095869560a483015203915afa918215614018578192613f8057505090565b9091503d8083833e613f928183613be8565b810190602081830312610b7d5780519067ffffffffffffffff82116111f6570181601f82011215610b7d57805190613fc982613d41565b93613fd76040519586613be8565b82855260208086019360051b8301019384116106165750602001905b8282106140005750505090565b6020809161400d84613de1565b815201910190613ff3565b50604051903d90823e3d90fd5b92935067ffffffffffffffff9285871615614061575061271061405061ffff61405794511683613d59565b0490613dd4565b915b903880613efe565b61407392506140506127109183613d59565b91614059565b67ffffffffffffffff91925061409d9061409761299336898b613c0b565b906147e5565b91613f0c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b50505050505050506040516140e8602082613be8565b60008152600036813790565b67ffffffffffffffff909291926141327fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16856148d4565b16600052600b60205260406000206040519061414d82613bcc565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526141fa577fffffffff00000000000000000000000000000000000000000000000000000000166141ef57505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b6040519061422082613bb0565b60006080838281528260208201528260408201528260608201520152565b9060405161424b81613bb0565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff916142b6614213565b506142bf614213565b506142f357166000526008602052604060002090613c6d6142e760026142ec6142e78661423e565b6149bb565b940161423e565b169081600052600460205261430e6142e7604060002061423e565b916000526005602052613c6d6142e7604060002061423e565b67ffffffffffffffff1661433a8161535e565b91901561434e57506001600160a01b031690565b7f4fe6a5880000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156139d1570180359067ffffffffffffffff82116139d1576020019181360383136139d157565b356001600160a01b03811681036139d15790565b3567ffffffffffffffff811681036139d15790565b9067ffffffffffffffff613c6d92166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b6040519061443f82613b94565b60606020838281520152565b805182101561445f5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c921680156144d7575b60208310146144a857565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161449d565b90604051918260008254926144f58461448e565b8084529360018116908115614563575060011461451c575b5061451a92500383613be8565b565b90506000929192526020600020906000915b81831061454757505090602061451a928201013861450d565b602091935080600191548385890101520191019091849261452e565b6020935061451a9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013861450d565b67ffffffffffffffff166000526008602052613c6d60046040600020016144e1565b919081101561445f5760081b0190565b3580151581036139d15790565b3561ffff811681036139d15790565b3563ffffffff811681036139d15790565b359063ffffffff821682036139d157565b359061ffff821682036139d157565b919081101561445f5760051b0190565b35906fffffffffffffffffffffffffffffffff821682036139d157565b91908260609103126139d1576040516060810181811067ffffffffffffffff821117613b655760405260406146a281839561468981613b3c565b855261469760208201614632565b602086015201614632565b910152565b6fffffffffffffffffffffffffffffffff6146e5604080936146c881613b3c565b15158652836146d960208301614632565b16602087015201614632565b16910152565b8181106146f6575050565b600081556001016146eb565b919081101561445f5760061b0190565b908160209103126139d1575180151581036139d15790565b8051801561479a5760200361475c5780516020828101918301839003126139d157519060ff821161475c575060ff1690565b611f8e906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613afb565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff8211613d6c57565b60ff16604d8111613d6c57600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff8116928284146148cd578284116148a3579061482a916147c0565b91604d60ff8416118015614888575b6148525750509061484c613c6d926147d4565b90613d59565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614892836147d4565b8015613da557600019048411614839565b6148ac916147c0565b91604d60ff841611614852575050906148c7613c6d926147d4565b90613d9b565b5050505090565b7fffffffff0000000000000000000000000000000000000000000000000000000081169081156149b65761490781615283565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c16166149b65761ffff8360e01c1680159182156149a5575b5050614951575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614947565b505050565b6149c3614213565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614a206020850193614a1a614a0d63ffffffff87511642613dd4565b8560808901511690613d59565b90615276565b80821015614a3957505b16825263ffffffff4216905290565b9050614a2a565b6001600160a01b03600154163303614a5457565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614c645767ffffffffffffffff81516020830120921691826000526008602052614ab3816005604060002001615850565b15614c205760005260096020526040600020815167ffffffffffffffff8111613b6557614ae0825461448e565b601f8111614bee575b506020601f8211600114614b645791614b3e827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614b5495600091614b59575b506000198260011b9260031b1c19161790565b9055604051918291602083526020830190613afb565b0390a2565b905084015138614b2b565b601f1982169083600052806000209160005b818110614bd6575092614b549492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614bbd575b5050811b019055611c98565b85015160001960f88460031b161c191690553880614bb1565b9192602060018192868a015181550194019201614b76565b614c1a90836000526020600020601f840160051c81019160208510610f7357601f0160051c01906146eb565b38614ae9565b5090611f8e6040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613afb565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b90614c9882614327565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03929092166024820181905260448201849052937f00000000000000000000000000000000000000000000000000000000000000009291614d0e8160648101611a08565b60206000809483519082885af183513d82614f65575b505015614f0e575b506001600160a01b03831693853b15610b7d5767ffffffffffffffff604051927fa36a7fee0000000000000000000000000000000000000000000000000000000084528660048501521660248301526044820152818160648183895af18015610619578290614efe575b50506040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152306004820152846024820152602081604481875afa908115610619578291614ecc575b50614ded575b50505050565b604051926020828186017f095ea7b300000000000000000000000000000000000000000000000000000000815287602488015281604488015260448752614e35606488613be8565b86519082875af1903d83519083614ead575b505050614de757614ea493614e9f91604051917f095ea7b30000000000000000000000000000000000000000000000000000000060208401526024830152604482015260448152614e99606482613be8565b82615af8565b615af8565b38808080614de7565b91925090614ec257503b15155b388080614e47565b6001915014614eba565b90506020813d602011614ef6575b81614ee760209383613be8565b810103126139d1575138614de1565b3d9150614eda565b614f0791613be8565b3881614d96565b614f5f90614f596040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015288602482015285604482015260448152611a16606482613be8565b84615af8565b38614d2c565b909150614f8257506001600160a01b0384163b15155b3880614d24565b600114614f7b565b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613c6d604082613be8565b815191929115615147576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff602085015116106150e45761451a91925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615145604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604084015116158015906151d6575b6151755761451a9192615008565b606483615145604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615167565b906127109167ffffffffffffffff61520f602083016143e0565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561526057606061ffff61525c935460901c16910135613d59565b0490565b606061ffff61525c935460801c16910135613d59565b91908201809211613d6c57565b7fffffffff00000000000000000000000000000000000000000000000000000000811690811561535a577dffff000000000000000000000000000000000000000000000000000000008116156153515760ff60015b169060f01c8061531b575b506001036152ee5750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b6010811061532c57506152e3565b6001811b821661533f575b60010161531e565b9160018101809111613d6c5791615337565b60ff60006152d8565b5050565b80600052600f602052604060002054801560001461538d5750600052600e602052604060002054151590600090565b600192909150565b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c9216928360005260086020526153de818360026040600020016158a5565b604080516001600160a01b03909216825260208201929092529081908101614b54565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c16156154665750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f9918360005260056020526153de818360406000206158a5565b9061451a9350615395565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156139d157016020813591019167ffffffffffffffff82116139d15781360383136139d157565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da81789449216928360005260086020526153de818360406000206158a5565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c161561556c5750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e918360005260046020526153de818360406000206158a5565b9061451a93506154c1565b906040519182815491828252602082019060005260206000209260005b8181106155a957505061451a92500383613be8565b8454835260019485019487945060209093019201615594565b805482101561445f5760005260206000200190600090565b60008181526007602052604090205480156156d3576000198101818111613d6c57600654906000198201918211613d6c57818103615682575b5050506006548015615653576000190161562e8160066155c2565b60001982549160031b1b19169055600655600052600760205260006040812055600190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6156bb6156936156a49360066155c2565b90549060031b1c92839260066155c2565b81939154906000199060031b92831b921b19161790565b90556000526007602052604060002055388080615613565b5050600090565b906001820191816000528260205260406000205480151560001461578d576000198101818111613d6c578254906000198201918211613d6c57818103615756575b5050508054801561565357600019019061573582826155c2565b60001982549160031b1b191690555560005260205260006040812055600190565b6157766157666156a493866155c2565b90549060031b1c928392866155c2565b90556000528360205260406000205538808061571b565b50505050600090565b806000526007602052604060002054156000146157f05760065468010000000000000000811015613b65576157d76156a482600185940160065560066155c2565b9055600654906000526007602052604060002055600190565b50600090565b80600052600e602052604060002054156000146157f057600d5468010000000000000000811015613b65576158376156a4826001859401600d55600d6155c2565b9055600d5490600052600e602052604060002055600190565b60008281526001820160205260409020546156d35780549068010000000000000000821015613b65578261588e6156a48460018096018555846155c2565b905580549260005201602052604060002055600190565b9182549060ff8260a01c16158015615af0575b614de7576fffffffffffffffffffffffffffffffff821691600185019081546158fd63ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642613dd4565b9081615a52575b5050848110615a13575083831061595e5750506159336fffffffffffffffffffffffffffffffff928392613dd4565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c9283156159d2578161597691613dd4565b92600019810190808211613d6c5761599961599e926001600160a01b0396615276565b613d9b565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b6001600160a01b0383837fd0c8d23a000000000000000000000000000000000000000000000000000000006000526000196004526024521660445260646000fd5b82856001600160a01b03927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615ac657615a6d92614a1a9160801c90613d59565b80841015615ac15750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880615904565b615a78565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b5082156158b8565b906000602091828151910182855af115615b69576000513d615b6057506001600160a01b0381163b155b615b295750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415615b22565b6040513d6000823e3d90fdfea164736f6c634300081a000a" - -type SiloedLockReleaseTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewSiloedLockReleaseTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*SiloedLockReleaseTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(SiloedLockReleaseTokenPoolABI)) - if err != nil { - return nil, err - } - return &SiloedLockReleaseTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *SiloedLockReleaseTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *SiloedLockReleaseTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetLockBox(opts *bind.CallOpts, args uint64) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getLockBox", args) - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedLockReleaseTokenPoolContract) GetAllLockBoxConfigs(opts *bind.CallOpts) ([]LockBoxConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllLockBoxConfigs") - if err != nil { - var zero []LockBoxConfig - return zero, err - } - return *abi.ConvertType(out[0], new([]LockBoxConfig)).(*[]LockBoxConfig), nil -} - -type LockBoxConfig struct { - RemoteChainSelector uint64 - LockBox common.Address -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "siloed-lock-release-token-pool:deploy", - Version: Version, - Description: "Deploys the SiloedLockReleaseTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: SiloedLockReleaseTokenPoolABI, - Bin: SiloedLockReleaseTokenPoolBin, - }, + Name: "siloed-lock-release-token-pool:deploy", + Version: Version, + Description: "Deploys the SiloedLockReleaseTokenPool contract", + ContractMetadata: gobindings.SiloedLockReleaseTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(SiloedLockReleaseTokenPoolBin), + EVM: common.FromHex(gobindings.SiloedLockReleaseTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetLockBox = contract.NewRead(contract.ReadParams[uint64, common.Address, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-lock-box", - Version: Version, - Description: "Calls getLockBox on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args uint64) (common.Address, error) { - return c.GetLockBox(opts, args) - }, -}) +func NewReadGetLockBox(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, common.Address, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-lock-box", + Version: Version, + Description: "Calls getLockBox on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args uint64) (common.Address, error) { + return c.GetLockBox(opts, args) + }, + }) +} -var GetAllLockBoxConfigs = contract.NewRead(contract.ReadParams[struct{}, []LockBoxConfig, *SiloedLockReleaseTokenPoolContract]{ - Name: "siloed-lock-release-token-pool:get-all-lock-box-configs", - Version: Version, - Description: "Calls getAllLockBoxConfigs on the contract", - ContractType: ContractType, - NewContract: NewSiloedLockReleaseTokenPoolContract, - CallContract: func(c *SiloedLockReleaseTokenPoolContract, opts *bind.CallOpts, args struct{}) ([]LockBoxConfig, error) { - return c.GetAllLockBoxConfigs(opts) - }, -}) +func NewReadGetAllLockBoxConfigs(c gobindings.SiloedLockReleaseTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, gobindings.SiloedLockReleaseTokenPoolInterface]{ + Name: "siloed-lock-release-token-pool:get-all-lock-box-configs", + Version: Version, + Description: "Calls getAllLockBoxConfigs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedLockReleaseTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, error) { + return c.GetAllLockBoxConfigs(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool/siloed_usdc_token_pool.go b/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool/siloed_usdc_token_pool.go index c9a685238c..c2acde35bd 100644 --- a/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool/siloed_usdc_token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool/siloed_usdc_token_pool.go @@ -3,178 +3,106 @@ package siloed_usdc_token_pool import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_usdc_token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "SiloedUSDCTokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const SiloedUSDCTokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyAuthorizedCallerUpdates","inputs":[{"name":"authorizedCallerArgs","type":"tuple","internalType":"struct AuthorizedCallers.AuthorizedCallerArgs","components":[{"name":"addedCallers","type":"address[]","internalType":"address[]"},{"name":"removedCallers","type":"address[]","internalType":"address[]"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"burnLockedUSDC","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"cancelExistingCCTPMigrationProposal","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"configureLockBoxes","inputs":[{"name":"lockBoxConfigs","type":"tuple[]","internalType":"struct SiloedLockReleaseTokenPool.LockBoxConfig[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lockBox","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"excludeTokensFromBurn","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllAuthorizedCallers","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getAllLockBoxConfigs","inputs":[],"outputs":[{"name":"lockBoxConfigs","type":"tuple[]","internalType":"struct SiloedLockReleaseTokenPool.LockBoxConfig[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lockBox","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentProposedCCTPChainMigration","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getExcludedTokensByChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getLockBox","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"address","internalType":"contract ILockBox"}],"stateMutability":"view"},{"type":"function","name":"getLockedUSDCToBurn","inputs":[],"outputs":[{"name":"lockedUSDCToBurn","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"proposeCCTPMigration","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setCircleMigratorAddress","inputs":[{"name":"migrator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setLockedUSDCToBurn","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"lockedUSDCToBurn","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerAdded","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"AuthorizedCallerRemoved","inputs":[{"name":"caller","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"CCTPMigrationCancelled","inputs":[{"name":"existingProposalSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"CCTPMigrationExecuted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"USDCBurned","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"CCTPMigrationProposed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"CircleMigratorAddressSet","inputs":[{"name":"migratorAddress","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedUSDCToBurnSet","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"lockedUSDCToBurn","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"event","name":"TokensExcludedFromBurn","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"burnableAmountAfterExclusion","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainAlreadyMigrated","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"ExistingMigrationProposal","inputs":[]},{"type":"error","name":"InsufficientLiquidity","inputs":[{"name":"availableLiquidity","type":"uint256","internalType":"uint256"},{"name":"requestedAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"InvalidChainSelector","inputs":[]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"LockBoxCannotBeShared","inputs":[{"name":"chainSelectorA","type":"uint64","internalType":"uint64"},{"name":"chainSelectorB","type":"uint64","internalType":"uint64"},{"name":"lockBox","type":"address","internalType":"address"}]},{"type":"error","name":"LockBoxNotConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NoMigrationProposalPending","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OnlyCircle","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"UnauthorizedCaller","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const SiloedUSDCTokenPoolBin = "0x60e080604052346103505760a0816164e2803803809161001f82856103a0565b8339810103126103505780516001600160a01b03811680820361035057610048602084016103c3565b610054604085016103d1565b9061006d6080610066606088016103d1565b96016103d1565b926020956040519561007f88886103a0565b600087526000368137331561038f57600180546001600160a01b031916331790558215801561037e575b801561036d575b61035c5760805260c052853082036102c9575b505060a052600380546001600160a01b039283166001600160a01b0319918216179091556002805493909216921691909117905560405161010483826103a0565b60008152600036813760408051929083016001600160401b038111848210176102b3576040528252808383015260005b815181101561019b576001906001600160a01b0361015282856103e5565b51168561015e82610427565b61016b575b505001610134565b7fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a13885610163565b50505160005b8151811015610212576001600160a01b036101bc82846103e5565b5116908115610201577feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef84836101f3600195610525565b50604051908152a1016101a1565b6342bcdf7f60e11b60005260046000fd5b604051615f5c908161058682396080518181816102c8015281816107130152818161235a015281816127e801528181612e9b01528181613023015281816132d40152818161348001528181613881015281816138ce0152614f83015260a0518181816136d3015281816149d801528181614a220152615234015260c051818181610356015281816114f1015281816123e701528181612f2901526133620152f35b634e487b7160e01b600052604160045260246000fd5b60405163313ce56760e01b815291829060049082905afa60009181610320575b506102f5575b856100c3565b60ff1660ff821681810361030957506102ef565b6332ad3e0760e11b60005260045260245260446000fd5b9091508681813d8311610355575b61033881836103a0565b8101031261035057610349906103c3565b90386102e9565b600080fd5b503d61032e565b630a64406560e11b60005260046000fd5b506001600160a01b038216156100b0565b506001600160a01b038616156100a9565b639b15e16f60e01b60005260046000fd5b601f909101601f19168101906001600160401b038211908210176102b357604052565b519060ff8216820361035057565b51906001600160a01b038216820361035057565b80518210156103f95760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b80548210156103f95760005260206000200190600090565b600081815260116020526040902054801561051e57600019810181811161050857601054600019810191908211610508578082036104b7575b50505060105480156104a1576000190161047b81601061040f565b8154906000199060031b1b19169055601055600052601160205260006040812055600190565b634e487b7160e01b600052603160045260246000fd5b6104f06104c86104d993601061040f565b90549060031b1c928392601061040f565b819391549060031b91821b91600019901b19161790565b90556000526011602052604060002055388080610460565b634e487b7160e01b600052601160045260246000fd5b5050600090565b8060005260116020526040600020541560001461057f57601054680100000000000000008110156102b3576105666104d9826001859401601055601061040f565b9055601054906000526011602052604060002055600190565b5060009056fe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714613a9c5750806306b859ef14613a0a578063181f5a77146139a95780631826b1e7146138f257806321df0da7146138ae578063240028e8146138575780632422ac45146137785780632451a627146136f757806324f65ee7146136b95780632bc3c64d146136845780632cab0fb61461326657806337a3210d1461323f5780633907753714612e285780634ad01f0b14612d925780634c5ef0ed14612d4b57806350d1a35a14612c165780636160701b14612b9757806362ddd3c414612b10578063714bf90714612a8e5780637437ff9f14612a4d57806379ba5097146129a05780638926f54f1461295a5780638a5e52bb146127455780638da5cb5b1461271e57806391a2749a1461258a5780639a4575b9146122f5578063a42a7b8b146121ac578063acdb8f7b14612084578063acfecf9114611f8c578063ae39a25714611e5d578063b6cfa3b714611da2578063b794658014611d6a578063bfeffd3f14611cd8578063c4bffe2b14611bf1578063c7230a60146119c4578063cd306a6c14611999578063dc04fa1f14611515578063dc0bd971146114d1578063dcbd41bc146112e7578063de814c57146111e8578063e4d4c143146111ca578063e8a1da1714610b3e578063ea6396db14610a00578063ec6ae7a7146109bd578063efd07eec146106a7578063f2fde38b146105f2578063f65a8886146105b95763fbc801a71461023157600080fd5b346105b65760606003193601126105b65760043567ffffffffffffffff81116105b25760a060031982360301126105b25761026a613bc9565b6044359067ffffffffffffffff82116105ae5761028e6102ae923690600401613c97565b9290610298614687565b506102a683866004016154d6565b933691613e18565b5060848301926102bd84614636565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361057157602481019477ffffffffffffffff0000000000000000000000000000000061031687614621565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115610566578291610537575b5061050f5750936104366104b7936104b29360646104e8986103af6103aa87614621565b6156b4565b0135906103bc8383614080565b7fffffffff000000000000000000000000000000000000000000000000000000008216156104f257610419610431927fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1690614b0e565b61042289614636565b61042b87614621565b906159f0565b614080565b936104498561044484614621565b614f31565b7ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff61048561047f85614621565b93614636565b604080516001600160a01b039092168252336020830152810188905292169180606081015b0390a2614621565b6147f8565b906104c061522d565b604051926104cd84613da1565b83526020830152604051928392604084526040840190613f48565b9060208301520390f35b610431915061050089614636565b61050987614621565b906159aa565b807f53ad11d80000000000000000000000000000000000000000000000000000000060049252fd5b610559915060203d60201161055f575b6105518183613df5565b810190614c7a565b38610386565b503d610547565b6040513d84823e3d90fd5b6024856001600160a01b0361058587614636565b7f961c9a4f00000000000000000000000000000000000000000000000000000000835216600452fd5b8380fd5b5080fd5b80fd5b50346105b65760206003193601126105b657604060209167ffffffffffffffff6105e1613c80565b168152601383522054604051908152f35b50346105b65760206003193601126105b6576001600160a01b03610614613c27565b61061c614ce3565b1633811461067f57807fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782556001600160a01b03600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12788380a380f35b6004827fdad89dca000000000000000000000000000000000000000000000000000000008152fd5b50346105b65760206003193601126105b6576004359067ffffffffffffffff82116105b657366023830112156105b65781600401359167ffffffffffffffff83116105b2576024810190602436918560061b0101116105b25791610709614ce3565b610711614ce3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690825b8181106108945783600d5461075281613fd4565b61075b82613fd4565b835b8381106108565750835b838110610772578480f35b6001600160a01b0361078482846146a0565b511660018201808311610829575b8581106107a3575050600101610767565b6001600160a01b036107bc8286949699979598996146a0565b511684146107d4576001019594919395929092610792565b67ffffffffffffffff91506107f890826107f0606498866146a0565b5116936146a0565b5116907f30daa72d000000000000000000000000000000000000000000000000000000008452600452602452604452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b8067ffffffffffffffff61086b600193615268565b911661087783876146a0565b526001600160a01b0361088a83866146a0565b911690520161075d565b6001600160a01b036108b260206108ac84868a6154c6565b01614636565b168015610995576040517f75151b63000000000000000000000000000000000000000000000000000000008152846004820152602081602481855afa90811561098a57869161096c575b5015610940579061093960019267ffffffffffffffff61092561092085888c6154c6565b614621565b1690818852600f6020526040882055615933565b500161073e565b602485857f961c9a4f000000000000000000000000000000000000000000000000000000008252600452fd5b610984915060203d811161055f576105518183613df5565b386108fc565b6040513d88823e3d90fd5b6004857f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b50346105b657806003193601126105b65760207fffffffff0000000000000000000000000000000000000000000000000000000060025460401b16604051908152f35b50346105b65760806003193601126105b657610a1a613c27565b50610a23613c69565b610a2b613bf8565b5060643567ffffffffffffffff8111610b3a579167ffffffffffffffff604092610a5b60e0953690600401613c97565b50508260c08551610a6b81613dd9565b82815282602082015282878201528260608201528260808201528260a08201520152168152600b6020522060405190610aa382613dd9565b5461ffff818163ffffffff82169485815263ffffffff60208201818560201c1681528160408401818760401c168152816060860193818960601c16855260ff60c060808901988a8c60801c168a528a60a082019c60901c168c52019b60a01c1615158b526040519b8c52511660208b0152511660408901525116606087015251166080850152511660a083015251151560c0820152f35b8280fd5b50346105b65760406003193601126105b65760043567ffffffffffffffff81116105b257610b70903690600401613f72565b9060243567ffffffffffffffff81116105ae5790610b9384923690600401613f72565b939091610b9e614ce3565b83905b8282106110105750505081927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee182360301935b8181101561100c578060051b83013585811215611003578301610120813603126110035760405194610c0586613dbd565b813567ffffffffffffffff81168103611007578652602082013567ffffffffffffffff81116105b25782019436601f870112156105b257853595610c4887613ec2565b96610c566040519889613df5565b80885260208089019160051b830101903682116110035760208301905b828210610fd0575050505060208701958652604083013567ffffffffffffffff8111610b3a57610ca69036908501613e5f565b9160408801928352610cd0610cbe36606087016148a4565b9460608a0195865260c03691016148a4565b956080890196875283515115610fa857610cf467ffffffffffffffff8a51166158fa565b15610f715767ffffffffffffffff8951168252600860205260408220610d1b865182615296565b610d29885160028301615296565b6004855191019080519067ffffffffffffffff8211610f4457610d4c83546146e3565b601f8111610f09575b50602090601f8311600114610ea657610d859291869183610e9b575b50506000198260011b9260031b1c19161790565b90555b815b88518051821015610dbf5790610db9600192610db28367ffffffffffffffff8f5116926146a0565b5190614d21565b01610d8a565b5050977f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2939199975095610e8d67ffffffffffffffff6001979694985116925193519151610e59610e2460405196879687526101006020880152610100870190613d08565b9360408601906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b60a08401906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b0390a1019392909193610bd4565b015190508e80610d71565b8386528186209190601f198416875b818110610ef15750908460019594939210610ed8575b505050811b019055610d88565b015160001960f88460031b161c191690558d8080610ecb565b92936020600181928786015181550195019301610eb5565b610f349084875260208720601f850160051c81019160208610610f3a575b601f0160051c019061494d565b8d610d55565b9091508190610f27565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60248267ffffffffffffffff8b51167f1d5ad3c5000000000000000000000000000000000000000000000000000000008252600452fd5b6004827f14c880ca000000000000000000000000000000000000000000000000000000008152fd5b813567ffffffffffffffff8111610fff57602091610ff48392833691890101613e5f565b815201910190610c73565b8680fd5b8480fd5b600080fd5b8380f35b9267ffffffffffffffff61102d6109208486889a9699979a614877565b169161103883615ab7565b1561119e57828452600860205261105460056040862001615632565b94845b865181101561108d5760019085875260086020526110866005604089200161107f838b6146a0565b5190615b4b565b5001611057565b50939692909450949094808752600860205260056040882088815588600182015588600282015588600382015588600482016110c981546146e3565b8061115d575b505050018054908881558161113f575b5050907f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599166020836001948a52600482528985604082208281550155808a52600582528985604082208281550155604051908152a101909194939294610ba1565b885260208820908101905b818110156110df5788815560010161114a565b601f81116001146111735750555b888a806110cf565b8183526020832061118e91601f01861c81019060010161494d565b808252816020812091555561116b565b602484847f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b50346105b657806003193601126105b6576020601454604051908152f35b50346105b65760406003193601126105b657611202613c80565b67ffffffffffffffff60243591611217614ce3565b169081156112bf578167ffffffffffffffff60125460a01c16036112975760407fe1e6c22ce6b566f66cdb457ec2e7910ff1f9a9e5654ed75303476fa87046822091838552601360205281852061126f828254614940565b905561128960145485875260136020528387205490614080565b82519182526020820152a280f35b6004837fa94cb988000000000000000000000000000000000000000000000000000000008152fd5b6004837f656535ce000000000000000000000000000000000000000000000000000000008152fd5b50346105b65760206003193601126105b65760043567ffffffffffffffff81116105b257611319903690600401613fa3565b6001600160a01b03600a5416331415806114bc575b61149057825b81811061133f578380f35b61134a81838561481a565b67ffffffffffffffff61135c82614621565b1690611375826000526007602052604060002054151590565b1561146457907f41f7c8f7cfdad9350aa495e6c54cbbf750a07ab38a9098aed1256e30dd1682bb60e0836114246113fe602060019897018b6113b68261482a565b1561142b5787905260046020526113dd60408d206113d736604088016148a4565b90615296565b868c5260056020526113f960408d206113d73660a088016148a4565b61482a565b91604051921515835261141760208401604083016148fc565b60a06080840191016148fc565ba201611334565b60026040828a6113f99452600860205261144d8282206113d736858c016148a4565b8a8152600860205220016113d73660a088016148a4565b602486837f1e670e4b000000000000000000000000000000000000000000000000000000008252600452fd5b6024837f8e4a23d600000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b036001541633141561132e565b50346105b657806003193601126105b65760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105b65760406003193601126105b65760043567ffffffffffffffff81116105b257611547903690600401613fa3565b60243567ffffffffffffffff81116105ae57611567903690600401613f72565b919092611572614ce3565b845b8281106115de57505050825b81811061158b578380f35b8067ffffffffffffffff6115a56109206001948688614877565b16808652600b6020528560408120557f5479bbc0288b7eaeaf2ace0943b88016cc648964fcd42919a86fd93b15fdbee88680a201611580565b67ffffffffffffffff6115f561092083868661481a565b1661160d816000526007602052604060002054151590565b1561196e5761161d82858561481a565b602081019060e08101906116308261482a565b156119425760a0810161271061ffff61164883614837565b1610156119335760c082019161271061ffff61166385614837565b1610156118fb5763ffffffff61167886614846565b16156118cf57858c52600b60205260408c2061169386614846565b63ffffffff169080549060408401916116ab83614846565b60201b67ffffffff00000000169360608601946116c786614846565b60401b6bffffffff00000000000000001696608001966116e688614846565b60601b6fffffffff00000000000000000000000016916117058a614837565b60801b71ffff0000000000000000000000000000000016936117268c614837565b60901b73ffff00000000000000000000000000000000000016957fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16177fffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffff16177fffffffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffff1617171781556117d98761482a565b81547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161790556040519661182a90614857565b63ffffffff16875261183b90614857565b63ffffffff16602087015261184f90614857565b63ffffffff16604086015261186390614857565b63ffffffff16606085015261187790614868565b61ffff16608084015261188990614868565b61ffff1660a083015261189b90613d49565b151560c082015260e07ffae1e296719dac5269c3886fb5002bb29bf17ae403060c6eb063a55abaaa104191a2600101611574565b60248c877f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b60248c61ffff61190a86614837565b7f95f3517a00000000000000000000000000000000000000000000000000000000835216600452fd5b8a61ffff61190a602493614837565b60248a857f12332265000000000000000000000000000000000000000000000000000000008252600452fd5b7f1e670e4b000000000000000000000000000000000000000000000000000000008752600452602486fd5b50346105b657806003193601126105b657602067ffffffffffffffff60125460a01c16604051908152f35b50346105b65760406003193601126105b65760043567ffffffffffffffff81116105b2576119f6903690600401613f72565b906119ff613c53565b916001600160a01b036001541633141580611bdc575b611bb0576001600160a01b038316908115611b8857845b818110611a37578580f35b6001600160a01b03611a52611a4d838588614877565b614636565b1690604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa8015611b7d5785908990611b43575b6001945080611aac575b50505001611a2c565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000006020828101919091526001600160a01b038b166024830152604482018390527f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e929091611b3490611b2e81606481015b03601f198101835282613df5565b86615ed2565b604051908152a3388481611aa3565b5050909160203d8111611b76575b611b5b8183613df5565b602082600092810103126105b6575090846001939251611a99565b503d611b51565b6040513d8a823e3d90fd5b6004857f8579befe000000000000000000000000000000000000000000000000000000008152fd5b6024847fcb1afbd700000000000000000000000000000000000000000000000000000000815233600452fd5b506001600160a01b03600c5416331415611a15565b50346105b657806003193601126105b657604051906006548083528260208101600684526020842092845b818110611cbf575050611c3192500383613df5565b611c3b8251613fd4565b815b8351811015611c6f578067ffffffffffffffff611c5c600193876146a0565b5116611c6882856146a0565b5201611c3d565b5090604051918291602083016020845282518091526020604085019301915b818110611c9c575050500390f35b825167ffffffffffffffff16845285945060209384019390920191600101611c8e565b8454835260019485019487945060209093019201611c1c565b50346105b65760206003193601126105b6576004356001600160a01b0381168091036105b257611d06614ce3565b7fffffffffffffffffffffffff00000000000000000000000000000000000000006003547fbaff46844acf36d6ee996f489a1a288709c4542bd33cd557770afd267d581209604080516001600160a01b0384168152856020820152a1161760035580f35b50346105b65760206003193601126105b657611d9e611d8a6104b2613c80565b604051918291602083526020830190613d08565b0390f35b50346105b65760206003193601126105b6577f307cf716eade81675bea3ccb6917b0f91baa2160056765d9a83d76f819caf06a6020611ddf613b9a565b611de7614ce3565b6002547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff0000000000000000000000000000000000000000808460401c16169116176002557fffffffff0000000000000000000000000000000000000000000000000000000060405191168152a180f35b50346105b65760606003193601126105b657611e77613c27565b90611e80613c53565b604435926001600160a01b0384168085036105ae57611e9d614ce3565b6001600160a01b03821680156109955794611f86917f3f1036e85d016a93254a0b1415844f79b85424959d90ae5ad51ce8f4533fe70195967fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002556001600160a01b0385167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a557fffffffffffffffffffffffff0000000000000000000000000000000000000000600c541617600c55604051938493849160409194936001600160a01b03809281606087019816865216602085015216910152565b0390a180f35b50346105b65767ffffffffffffffff611fa436613e7d565b929091611faf614ce3565b1691611fc8836000526007602052604060002054151590565b1561119e578284526008602052611ff760056040862001611fea368486613e18565b6020815191012090615b4b565b1561203c57907f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d769161203660405192839260208452602084019161408d565b0390a280f35b82612080836040519384937f74f23c7c000000000000000000000000000000000000000000000000000000008552600485015260406024850152604484019161408d565b0390fd5b50346105b657806003193601126105b657600d546120a181613ec2565b906120af6040519283613df5565b808252601f196120be82613ec2565b01835b818110612189575050825b818110612138578284604051918291602083016020845282518091526020604085019301915b818110612100575050500390f35b8251805167ffffffffffffffff1685526020908101516001600160a01b031681860152869550604090940193909201916001016120f2565b806001600160a01b0361214c600193615268565b604051929167ffffffffffffffff9061216485613da1565b16835216602082015261217782866146a0565b5261218281856146a0565b50016120cc565b60209060405161219881613da1565b8681528683820152828287010152016120c1565b50346105b65760206003193601126105b65767ffffffffffffffff6121cf613c80565b16815260086020526121e660056040832001615632565b8051601f1961220d6121f783613ec2565b926122056040519485613df5565b808452613ec2565b01835b8181106122e4575050825b82518110156122615780612231600192856146a0565b518552600960205261224560408620614736565b61224f82856146a0565b5261225a81846146a0565b500161221b565b81846040519182916020830160208452825180915260408401602060408360051b870101940192905b82821061229957505050500390f35b919360206122d4827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc060019597998495030186528851613d08565b960192019201859493919261228a565b806060602080938601015201612210565b50346105b65760206003193601126105b65760043567ffffffffffffffff81116105b25760a060031982360301126105b25761232f614687565b50602091806040516123418582613df5565b526084820161234f81614636565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361257657602483019277ffffffffffffffff000000000000000000000000000000006123a885614621565b60801b16604051907f2cbc26bb000000000000000000000000000000000000000000000000000000008252600482015285816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561256b57849161254e575b506125265760649061242b6103aa86614621565b013591806124f9575091817ff33bc26b4413b0e7f19f1ea739fdf99098c0061f1f87d954b11f5293fad9ae1067ffffffffffffffff8561247d6104b2966124746124c999614636565b61050988614621565b61248a8461044487614621565b6104aa61249f61249987614621565b92614636565b604080516001600160a01b0390921682523360208301528101959095529116929081906060820190565b906124d261522d565b604051926124df84613da1565b835281830152611d9e604051928284938452830190613f48565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b6004837f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b6125659150863d881161055f576105518183613df5565b38612417565b6040513d86823e3d90fd5b906001600160a01b03610585602493614636565b50346105b65760206003193601126105b65760043567ffffffffffffffff81116105b257604060031982360301126105b257604051906125c982613da1565b806004013567ffffffffffffffff81116105ae576125ed9060043691840101613eda565b825260248101359067ffffffffffffffff82116105ae5760046126139236920101613eda565b60208201908152612622614ce3565b5191805b835181101561268c57806001600160a01b03612644600193876146a0565b511661264f81615e3e565b61265b575b5001612626565b60207fc3803387881faad271c47728894e3e36fac830ffc8602ca6fc07733cbda7758091604051908152a138612654565b509051815b815181101561271a576001600160a01b036126ac82846146a0565b511680156126f257907feb1b9b92e50b7f88f9ff25d56765095ac6e91540eee214906f4036a908ffbdef6020836126e46001956158c1565b50604051908152a101612691565b6004847f8579befe000000000000000000000000000000000000000000000000000000008152fd5b8280f35b50346105b657806003193601126105b65760206001600160a01b0360015416604051908152f35b50346105b657806003193601126105b6576012546001600160a01b03811633036129325767ffffffffffffffff8160a01c1690811561129757826001600160a01b03612790846145cd565b7fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff6127ca6014548786526013602052604086205490614080565b9416601255826014556127dc85615882565b50166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690803b15610b3a576040517f74fd18ac0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015267ffffffffffffffff86166024820152604481018590523060648201529083908290608490829084905af1908115612927578391612912575b5050803b156105b2578180916024604051809481937f42966c680000000000000000000000000000000000000000000000000000000083528860048401525af18015610566576128fd575b507fdea60ddd4c7ebdab804f5694c70350cca7893ece3efeecb142312eacac5c73e46040848482519182526020820152a180f35b8161290791613df5565b610b3a5782386128c9565b8161291c91613df5565b6105b257813861287e565b6040513d85823e3d90fd5b6004827f5fff6eee000000000000000000000000000000000000000000000000000000008152fd5b50346105b65760206003193601126105b657602061299667ffffffffffffffff612982613c80565b166000526007602052604060002054151590565b6040519015158152f35b50346105b657806003193601126105b65780546001600160a01b0381163303612a25577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551682556001600160a01b033391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b6004827f02b543c6000000000000000000000000000000000000000000000000000000008152fd5b50346105b657806003193601126105b657600254600a54600c54604080516001600160a01b0394851681529284166020840152921691810191909152606090f35b50346105b65760206003193601126105b6577f084e6f0e9791c2e56153bd49e6ec6dd63ba9a72c258d71558d74c63fc75b716860206001600160a01b03612ad3613c27565b612adb614ce3565b16807fffffffffffffffffffffffff00000000000000000000000000000000000000006012541617601255604051908152a180f35b50346105b657612b1f36613e7d565b612b2b93929193614ce3565b67ffffffffffffffff8216612b4d816000526007602052604060002054151590565b15612b6c5750612b699293612b63913691613e18565b90614d21565b80f35b7f1e670e4b000000000000000000000000000000000000000000000000000000008452600452602483fd5b50346105b65760406003193601126105b657612bb1613c80565b67ffffffffffffffff60243591612bc6614ce3565b169081156112bf578167ffffffffffffffff60125460a01c1603611297576020817f9cd13f8e5084fb8da7065c7a18e763c679accd381b4e9beff9c2b716493d008f92601455604051908152a280f35b50346105b65760206003193601126105b657612c30613c80565b612c38614ce3565b67ffffffffffffffff81169081156112bf576012549067ffffffffffffffff8260a01c16612d2357612c77836000526016602052604060002054151590565b612cf757916020917fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff7bffffffffffffffff00000000000000000000000000000000000000007f20331f191af84dbff48b162aa5a5985e7891ae646297b0a2ac80487f9109ef49958760145560a01b16911617601255604051908152a180f35b602484847f1c49a87b000000000000000000000000000000000000000000000000000000008252600452fd5b6004847f692bc131000000000000000000000000000000000000000000000000000000008152fd5b50346105b65760406003193601126105b657612d65613c80565b906024359067ffffffffffffffff82116105b657602061299684612d8c3660048701613e5f565b9061464a565b50346105b657806003193601126105b657612dab614ce3565b60125467ffffffffffffffff8160a01c16908115611297577f375f1ad1194a2bec317c5efec05cc63ffa06ddd0c4b276619f6fd47298eda518917fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff602092166012558084526013825283604081205583601455604051908152a180f35b50346105b65760206003193601126105b6576004359067ffffffffffffffff82116105b657816004019061010060031984360301126105b65780604051612e6e81613d56565b5280604051612e7c81613d56565b5260648301359060848401612e9081614636565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361257657602485019377ffffffffffffffff00000000000000000000000000000000612ee986614621565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa90811561256b578491613220575b5061252657612f6a6103aa86614621565b612f7385614621565b90612f9060a4880192612d8c612f898585614c92565b3691613e18565b156131d957505082612fa4612fb392614636565b612fad86614621565b9061574c565b67ffffffffffffffff612fc584614621565b1693848252601360205260408220549485158015906131c1575b80156131a4575b613145575b5060440193509091612ffc84614636565b9161300682614621565b926001600160a01b03613018856145cd565b166001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001694813b156105ae576040517f74fd18ac0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015267ffffffffffffffff929092166024820152604481018890529216606483015282908290608490829084905af1801561056657613130575b5050608067ffffffffffffffff6020956001600160a01b036130fe6124997ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc096614621565b60405196875233898801521660408601528560608601521692a26040519061312582613d56565b815260405190518152f35b61313b828092613df5565b6105b657806130b9565b85841161317457826044939495965052601360205260408320613169858254614080565b905584939291612feb565b60448385887fa17e11d5000000000000000000000000000000000000000000000000000000008352600452602452fd5b506131bc816000526016602052604060002054151590565b612fe6565b5067ffffffffffffffff60125460a01c168114612fdf565b6131e39250614c92565b6120806040519283927f24eb47e500000000000000000000000000000000000000000000000000000000845260206004850152602484019161408d565b613239915060203d60201161055f576105518183613df5565b38612f59565b50346105b657806003193601126105b65760206001600160a01b0360035416604051908152f35b50346105b65760406003193601126105b6576004359067ffffffffffffffff82116105b6578160040161010060031984360301126105b2576132a6613bc9565b90826040516132b481613d56565b5260648401359160848501906132c982614636565b6001600160a01b03807f00000000000000000000000000000000000000000000000000000000000000001691160361367057602486019277ffffffffffffffff0000000000000000000000000000000061332285614621565b60801b16604051907f2cbc26bb00000000000000000000000000000000000000000000000000000000825260048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa908115613665578791613646575b5061361e576133a36103aa85614621565b6133ac84614621565b906133c260a4890192612d8c612f898585614c92565b156131d9575084917fffffffff0000000000000000000000000000000000000000000000000000000016159050613604576133ff61340e92614636565b61340884614621565b906157b8565b67ffffffffffffffff61342082614621565b1693848452601360205260408420549485158015906135ec575b80156135cf575b61356f575b50604491929394500161345881614636565b9161346281614621565b856001600160a01b03613474836145cd565b16946001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001695803b15610b3a576040517f74fd18ac0000000000000000000000000000000000000000000000000000000081526001600160a01b03808916600483015267ffffffffffffffff90951660248201526044810189905293909116606484015282908183816084810103925af1801561098a57926001600160a01b036130fe61249960809560209a67ffffffffffffffff967ffc5e3a5bddc11d92c2dc20fae6f7d5eb989f056be35239f7de7e86150609abc09961355f575b5050614621565b8161356991613df5565b38613558565b85841161359e57846044939495965052601360205260408520613593858254614080565b905584939291613446565b5050506044927fa17e11d5000000000000000000000000000000000000000000000000000000008352600452602452fd5b506135e7816000526016602052604060002054151590565b613441565b5067ffffffffffffffff60125460a01c16811461343a565b61361061361992614636565b612fad84614621565b61340e565b6004867f53ad11d8000000000000000000000000000000000000000000000000000000008152fd5b61365f915060203d60201161055f576105518183613df5565b38613392565b6040513d89823e3d90fd5b6024856001600160a01b0361058585614636565b50346105b65760206003193601126105b65760206136a86136a3613c80565b6145cd565b6001600160a01b0360405191168152f35b50346105b657806003193601126105b657602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105b657806003193601126105b65760405160108054808352908352909160208301917f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae672915b81811061376257611d9e8561375681870382613df5565b60405191829182613cc5565b825484526020909301926001928301920161373f565b50346105b65760406003193601126105b657613792613c80565b6024359182151583036105b6576101406138556137af858561454a565b61380560409392935180946fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565b60a08301906fffffffffffffffffffffffffffffffff6080809282815116855263ffffffff6020820151166020860152604081015115156040860152826060820151166060860152015116910152565bf35b50346105b65760206003193601126105b657602090613874613c27565b90506001600160a01b03807f0000000000000000000000000000000000000000000000000000000000000000169116146040519015158152f35b50346105b657806003193601126105b65760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346105b65760c06003193601126105b65761390c613c27565b50613915613c69565b61391d613c3d565b50608435917fffffffff00000000000000000000000000000000000000000000000000000000831683036105b65760a4359067ffffffffffffffff82116105b65760a063ffffffff8061ffff613982888861397b3660048b01613c97565b505061439a565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b50346105b657806003193601126105b65750611d9e6040516139cc604082613df5565b601981527f53696c6f656455534443546f6b656e506f6f6c20322e302e30000000000000006020820152604051918291602083526020830190613d08565b50346105b65760c06003193601126105b657613a24613c27565b613a2c613c69565b6064357fffffffff00000000000000000000000000000000000000000000000000000000811681036105ae5760843567ffffffffffffffff811161100357613a78903690600401613c97565b93909260a4359560028710156105b657611d9e61375688888888604435888a6140ae565b9050346105b25760206003193601126105b2576020907fffffffff00000000000000000000000000000000000000000000000000000000613adb613b9a565b167faff2afbf000000000000000000000000000000000000000000000000000000008114908115613b70575b8115613b46575b8115613b1c575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483613b15565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150613b0e565b7f940a15420000000000000000000000000000000000000000000000000000000081149150613b07565b600435907fffffffff000000000000000000000000000000000000000000000000000000008216820361100757565b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361100757565b604435907fffffffff000000000000000000000000000000000000000000000000000000008216820361100757565b600435906001600160a01b038216820361100757565b606435906001600160a01b038216820361100757565b602435906001600160a01b038216820361100757565b6024359067ffffffffffffffff8216820361100757565b6004359067ffffffffffffffff8216820361100757565b9181601f840112156110075782359167ffffffffffffffff8311611007576020838186019501011161100757565b602060408183019282815284518094520192019060005b818110613ce95750505090565b82516001600160a01b0316845260209384019390920191600101613cdc565b919082519283825260005b848110613d34575050601f19601f8460006020809697860101520116010190565b80602080928401015182828601015201613d13565b3590811515820361100757565b6020810190811067ffffffffffffffff821117613d7257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117613d7257604052565b60a0810190811067ffffffffffffffff821117613d7257604052565b60e0810190811067ffffffffffffffff821117613d7257604052565b90601f601f19910116810190811067ffffffffffffffff821117613d7257604052565b92919267ffffffffffffffff8211613d725760405191613e42601f8201601f191660200184613df5565b829481845281830111611007578281602093846000960137010152565b9080601f8301121561100757816020613e7a93359101613e18565b90565b9060406003198301126110075760043567ffffffffffffffff8116810361100757916024359067ffffffffffffffff821161100757613ebe91600401613c97565b9091565b67ffffffffffffffff8111613d725760051b60200190565b9080601f8301121561100757813590613ef282613ec2565b92613f006040519485613df5565b82845260208085019360051b82010191821161100757602001915b818310613f285750505090565b82356001600160a01b038116810361100757815260209283019201613f1b565b613e7a916020613f618351604084526040840190613d08565b920151906020818403910152613d08565b9181601f840112156110075782359167ffffffffffffffff8311611007576020808501948460051b01011161100757565b9181601f840112156110075782359167ffffffffffffffff8311611007576020808501948460081b01011161100757565b90613fde82613ec2565b613feb6040519182613df5565b828152601f19613ffb8294613ec2565b0190602036910137565b8181029291811591840414171561401857565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8115614051570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b9190820391821161401857565b601f8260209493601f19938186528686013760008582860101520116010190565b929495939091956001600160a01b03600354169687156143785780966002871015614349576001600160a01b03976141f6957fffffffff00000000000000000000000000000000000000000000000000000000938961431a5767ffffffffffffffff8216600052600b6020526040600020906040519161412d83613dd9565b549163ffffffff8316815263ffffffff8360201c16602082015263ffffffff8360401c16604082015263ffffffff8360601c16606082015260c061ffff8460801c169182608082015260ff60a082019561ffff8160901c16875260a01c16151591829101526142c6575b50505067ffffffffffffffff905b6040519a8b997f06b859ef000000000000000000000000000000000000000000000000000000008b521660048a0152166024880152604487015216606485015260c0608485015260c484019161408d565b938180600096879560a483015203915afa9182156142ba57809261421957505090565b9091503d8082843e61422b8184613df5565b8201916020818403126105b25780519067ffffffffffffffff8211610b3a57019180601f840112156105b25782519161426383613ec2565b936142716040519586613df5565b83855260208086019460051b8201019283116105b257602001925b82841061429a575050505090565b83516001600160a01b0381168103610b3a5781526020938401930161428c565b604051903d90823e3d90fd5b92935067ffffffffffffffff928587161561430257506127106142f161ffff6142f894511683614005565b0490614080565b915b903880614197565b61431492506142f16127109183614005565b916142fa565b67ffffffffffffffff9192506143439061433d61433836898b613e18565b614964565b90614a1f565b916141a5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b505050505050505060405161438e602082613df5565b60008152600036813790565b67ffffffffffffffff909291926143d87fffffffff0000000000000000000000000000000000000000000000000000000060025460401b1685614b0e565b16600052600b6020526040600020604051906143f382613dd9565b549163ffffffff83169384835263ffffffff8460201c169384602085015263ffffffff8160401c169182604086015263ffffffff8260601c169081606087015261ffff8360801c169586608082015260ff61ffff8560901c16948560a084015260a01c16159060c082159101526144a0577fffffffff000000000000000000000000000000000000000000000000000000001661449557505093929190600190565b959493509160019150565b5050505092505050600090600090600090600090600090565b604051906144c682613dbd565b60006080838281528260208201528260408201528260608201520152565b906040516144f181613dbd565b60806001829460ff81546fffffffffffffffffffffffffffffffff8116865263ffffffff81861c16602087015260a01c161515604085015201546fffffffffffffffffffffffffffffffff81166060840152811c910152565b67ffffffffffffffff9161455c6144b9565b506145656144b9565b5061459957166000526008602052604060002090613e7a61458d600261459261458d866144e4565b614bf5565b94016144e4565b16908160005260046020526145b461458d60406000206144e4565b916000526005602052613e7a61458d60406000206144e4565b67ffffffffffffffff166145e08161567d565b9190156145f457506001600160a01b031690565b7f4fe6a5880000000000000000000000000000000000000000000000000000000060005260045260246000fd5b3567ffffffffffffffff811681036110075790565b356001600160a01b03811681036110075790565b9067ffffffffffffffff613e7a92166000526008602052600560406000200190602081519101209060019160005201602052604060002054151590565b6040519061469482613da1565b60606020838281520152565b80518210156146b45760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600182811c9216801561472c575b60208310146146fd57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f16916146f2565b906040519182600082549261474a846146e3565b80845293600181169081156147b85750600114614771575b5061476f92500383613df5565b565b90506000929192526020600020906000915b81831061479c57505090602061476f9282010138614762565b6020919350806001915483858901015201910190918492614783565b6020935061476f9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b82010138614762565b67ffffffffffffffff166000526008602052613e7a6004604060002001614736565b91908110156146b45760081b0190565b3580151581036110075790565b3561ffff811681036110075790565b3563ffffffff811681036110075790565b359063ffffffff8216820361100757565b359061ffff8216820361100757565b91908110156146b45760051b0190565b35906fffffffffffffffffffffffffffffffff8216820361100757565b9190826060910312611007576040516060810181811067ffffffffffffffff821117613d725760405260406148f78183956148de81613d49565b85526148ec60208201614887565b602086015201614887565b910152565b6fffffffffffffffffffffffffffffffff61493a6040809361491d81613d49565b151586528361492e60208301614887565b16602087015201614887565b16910152565b9190820180921161401857565b818110614958575050565b6000815560010161494d565b805180156149d45760200361499657805160208281019183018390031261100757519060ff8211614996575060ff1690565b612080906040519182917f953576f7000000000000000000000000000000000000000000000000000000008352602060048401526024830190613d08565b50507f000000000000000000000000000000000000000000000000000000000000000090565b9060ff8091169116039060ff821161401857565b60ff16604d811161401857600a0a90565b907f00000000000000000000000000000000000000000000000000000000000000009060ff82169060ff811692828414614b0757828411614add5790614a64916149fa565b91604d60ff8416118015614ac2575b614a8c57505090614a86613e7a92614a0e565b90614005565b9091507fa9cb113d0000000000000000000000000000000000000000000000000000000060005260045260245260445260646000fd5b50614acc83614a0e565b801561405157600019048411614a73565b614ae6916149fa565b91604d60ff841611614a8c57505090614b01613e7a92614a0e565b90614047565b5050505090565b7fffffffff000000000000000000000000000000000000000000000000000000008116908115614bf057614b4181615557565b7dffff00000000000000000000000000000000000000000000000000000000601082811c9085901c1616614bf05761ffff8360e01c168015918215614bdf575b5050614b8b575050565b7fffffffff0000000000000000000000000000000000000000000000000000000092507fdf63778f000000000000000000000000000000000000000000000000000000006000526004521660245260446000fd5b60e01c61ffff161090503880614b81565b505050565b614bfd6144b9565b506fffffffffffffffffffffffffffffffff6060820151166fffffffffffffffffffffffffffffffff8083511691614c5a6020850193614c54614c4763ffffffff87511642614080565b8560808901511690614005565b90614940565b80821015614c7357505b16825263ffffffff4216905290565b9050614c64565b90816020910312611007575180151581036110075790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611007570180359067ffffffffffffffff82116110075760200191813603831361100757565b6001600160a01b03600154163303614cf757565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90805115614f075767ffffffffffffffff81516020830120921691826000526008602052614d5681600560406000200161596c565b15614ec35760005260096020526040600020815167ffffffffffffffff8111613d7257614d8382546146e3565b601f8111614e91575b506020601f8211600114614e075791614de1827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea9593614df795600091614dfc575b506000198260011b9260031b1c19161790565b9055604051918291602083526020830190613d08565b0390a2565b905084015138614dce565b601f1982169083600052806000209160005b818110614e79575092614df79492600192827f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea989610614e60575b5050811b019055611d8a565b85015160001960f88460031b161c191690553880614e54565b9192602060018192868a015181550194019201614e19565b614ebd90836000526020600020601f840160051c81019160208510610f3a57601f0160051c019061494d565b38614d8c565b50906120806040519283927f393b8ad20000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190613d08565b7f14c880ca0000000000000000000000000000000000000000000000000000000060005260046000fd5b90614f3b826145cd565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082019081526001600160a01b03929092166024820181905260448201849052937f00000000000000000000000000000000000000000000000000000000000000009291614fb18160648101611b20565b60206000809483519082885af183513d82615208575b5050156151b1575b506001600160a01b03831693853b15610b3a5767ffffffffffffffff604051927fa36a7fee0000000000000000000000000000000000000000000000000000000084528660048501521660248301526044820152818160648183895af180156105665782906151a1575b50506040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152306004820152846024820152602081604481875afa90811561056657829161516f575b50615090575b50505050565b604051926020828186017f095ea7b3000000000000000000000000000000000000000000000000000000008152876024880152816044880152604487526150d8606488613df5565b86519082875af1903d83519083615150575b50505061508a576151479361514291604051917f095ea7b3000000000000000000000000000000000000000000000000000000006020840152602483015260448201526044815261513c606482613df5565b82615ed2565b615ed2565b3880808061508a565b9192509061516557503b15155b3880806150ea565b600191501461515d565b90506020813d602011615199575b8161518a60209383613df5565b81010312611007575138615084565b3d915061517d565b6151aa91613df5565b3881615039565b615202906151fc6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015288602482015285604482015260448152611b2e606482613df5565b84615ed2565b38614fcf565b90915061522557506001600160a01b0384163b15155b3880614fc7565b60011461521e565b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260208152613e7a604082613df5565b61527390600d615828565b90549060031b1c9081600052600f6020526001600160a01b036040600020541690565b815191929115615418576fffffffffffffffffffffffffffffffff6040840151166fffffffffffffffffffffffffffffffff602085015116106153b55761476f91925b805182547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff0000000000000000000000000000000000000000161782556020810151825460409290920151608090811b7fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff9290921691821760018501557fffffffffffffffffffffffff0000000000000000000000000000000000000000909216174290911b73ffffffff0000000000000000000000000000000016179055565b606483615416604051917f8020d12400000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565bfd5b6fffffffffffffffffffffffffffffffff604084015116158015906154a7575b6154465761476f91926152d9565b606483615416604051917fd68af9cc00000000000000000000000000000000000000000000000000000000835260048301906fffffffffffffffffffffffffffffffff60408092805115158552826020820151166020860152015116910152565b506fffffffffffffffffffffffffffffffff6020840151161515615438565b91908110156146b45760061b0190565b906127109167ffffffffffffffff6154f060208301614621565b166000908152600b60205260409020917fffffffff00000000000000000000000000000000000000000000000000000000161561554157606061ffff61553d935460901c16910135614005565b0490565b606061ffff61553d935460801c16910135614005565b7fffffffff00000000000000000000000000000000000000000000000000000000811690811561562e577dffff000000000000000000000000000000000000000000000000000000008116156156255760ff60015b169060f01c806155ef575b506001036155c25750565b7fc512f96c0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b60005b6010811061560057506155b7565b6001811b8216615613575b6001016155f2565b9160018101809111614018579161560b565b60ff60006155ac565b5050565b906040519182815491828252602082019060005260206000209260005b81811061566457505061476f92500383613df5565b845483526001948501948794506020909301920161564f565b80600052600f60205260406000205480156000146156ac5750600052600e602052604060002054151590600090565b600192909150565b67ffffffffffffffff166156d5816000526007602052604060002054151590565b1561571f5750336000526011602052604060002054156156f157565b7fd86ad9cf000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b7fa9902c7e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9167ffffffffffffffff7f50f6fbee3ceedce6b7fd7eaef18244487867e6718aec7208187efb6b7908c14c92169283600052600860205261579581836002604060002001615beb565b604080516001600160a01b03909216825260208201929092529081908101614df7565b91909167ffffffffffffffff83169283600052600560205260ff60406000205460a01c161561581d5750907fc6735cd4fa2bbe7b203b1682936e6ee61bc1702464bbbd12abb6630229d9a5f99183600052600560205261579581836040600020615beb565b9061476f935061574c565b80548210156146b45760005260206000200190600090565b80549068010000000000000000821015613d72578161586791600161587e94018155615828565b81939154906000199060031b92831b921b19161790565b9055565b806000526016602052604060002054156000146158bb576158a4816015615840565b601554906000526016602052604060002055600190565b50600090565b806000526011602052604060002054156000146158bb576158e3816010615840565b601054906000526011602052604060002055600190565b806000526007602052604060002054156000146158bb5761591c816006615840565b600654906000526007602052604060002055600190565b80600052600e602052604060002054156000146158bb5761595581600d615840565b600d5490600052600e602052604060002055600190565b60008281526001820160205260409020546159a3578061598e83600193615840565b80549260005201602052604060002055600190565b5050600090565b9167ffffffffffffffff7fff0133389f9bb82d5b9385826160eaf2328039f6fa950eeb8cf0836da817894492169283600052600860205261579581836040600020615beb565b91909167ffffffffffffffff83169283600052600460205260ff60406000205460a01c1615615a555750907f28d6c52e2b0b7587b0d195539fbe6af984b28791aca4d2cc0844244e38bce29e9183600052600460205261579581836040600020615beb565b9061476f93506159aa565b80548015615a88576000190190615a778282615828565b60001982549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008181526007602052604090205480156159a35760001981018181116140185760065490600019820191821161401857818103615b11575b505050615afd6006615a60565b600052600760205260006040812055600190565b615b33615b22615867936006615828565b90549060031b1c9283926006615828565b90556000526007602052604060002055388080615af0565b906001820191816000528260205260406000205490811515600014615be2576000198201918083116140185781546000198101908111614018578381615b999503615bab575b505050615a60565b60005260205260006040812055600190565b615bcb615bbb6158679386615828565b90549060031b1c92839286615828565b905560005284602052604060002055388080615b91565b50505050600090565b9182549060ff8260a01c16158015615e36575b61508a576fffffffffffffffffffffffffffffffff82169160018501908154615c4363ffffffff6fffffffffffffffffffffffffffffffff83169360801c1642614080565b9081615d98575b5050848110615d595750838310615ca4575050615c796fffffffffffffffffffffffffffffffff928392614080565b16167fffffffffffffffffffffffffffffffff00000000000000000000000000000000825416179055565b9190915460801c928315615d185781615cbc91614080565b9260001981019080821161401857615cdf615ce4926001600160a01b0396614940565b614047565b7fd0c8d23a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b6001600160a01b0383837fd0c8d23a000000000000000000000000000000000000000000000000000000006000526000196004526024521660445260646000fd5b82856001600160a01b03927f1a76572a000000000000000000000000000000000000000000000000000000006000526004526024521660445260646000fd5b828692939611615e0c57615db392614c549160801c90614005565b80841015615e075750825b85547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff164260801b73ffffffff0000000000000000000000000000000016178655923880615c4a565b615dbe565b7f9725942a0000000000000000000000000000000000000000000000000000000060005260046000fd5b508215615bfe565b60008181526011602052604090205480156159a35760001981018181116140185760105490600019820191821161401857808203615e98575b505050615e846010615a60565b600052601160205260006040812055600190565b615eba615ea9615867936010615828565b90549060031b1c9283926010615828565b90556000526011602052604060002055388080615e77565b906000602091828151910182855af115615f43576000513d615f3a57506001600160a01b0381163b155b615f035750565b6001600160a01b03907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b60011415615efc565b6040513d6000823e3d90fdfea164736f6c634300081a000a" - -type SiloedUSDCTokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewSiloedUSDCTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*SiloedUSDCTokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(SiloedUSDCTokenPoolABI)) - if err != nil { - return nil, err - } - return &SiloedUSDCTokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *SiloedUSDCTokenPoolContract) Address() common.Address { - return c.address -} - -func (c *SiloedUSDCTokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *SiloedUSDCTokenPoolContract) ConfigureLockBoxes(opts *bind.TransactOpts, args []LockBoxConfig) (*types.Transaction, error) { - return c.contract.Transact(opts, "configureLockBoxes", args) -} - -func (c *SiloedUSDCTokenPoolContract) ApplyAuthorizedCallerUpdates(opts *bind.TransactOpts, args AuthorizedCallerArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyAuthorizedCallerUpdates", args) -} - -func (c *SiloedUSDCTokenPoolContract) GetAllAuthorizedCallers(opts *bind.CallOpts) ([]common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllAuthorizedCallers") - if err != nil { - var zero []common.Address - return zero, err - } - return *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address), nil -} - -func (c *SiloedUSDCTokenPoolContract) GetAllLockBoxConfigs(opts *bind.CallOpts) ([]LockBoxConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllLockBoxConfigs") - if err != nil { - var zero []LockBoxConfig - return zero, err - } - return *abi.ConvertType(out[0], new([]LockBoxConfig)).(*[]LockBoxConfig), nil -} - -type AuthorizedCallerArgs struct { - AddedCallers []common.Address - RemovedCallers []common.Address -} - -type LockBoxConfig struct { - RemoteChainSelector uint64 - LockBox common.Address -} - type ConstructorArgs struct { - Token common.Address - LocalTokenDecimals uint8 - AdvancedPoolHooks common.Address - RmnProxy common.Address - Router common.Address + Token common.Address `json:"token"` + LocalTokenDecimals uint8 `json:"localTokenDecimals"` + AdvancedPoolHooks common.Address `json:"advancedPoolHooks"` + RmnProxy common.Address `json:"rmnProxy"` + Router common.Address `json:"router"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "siloed-usdc-token-pool:deploy", - Version: Version, - Description: "Deploys the SiloedUSDCTokenPool contract", - ContractMetadata: &bind.MetaData{ - ABI: SiloedUSDCTokenPoolABI, - Bin: SiloedUSDCTokenPoolBin, - }, + Name: "siloed-usdc-token-pool:deploy", + Version: Version, + Description: "Deploys the SiloedUSDCTokenPool contract", + ContractMetadata: gobindings.SiloedUSDCTokenPoolMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(SiloedUSDCTokenPoolBin), + EVM: common.FromHex(gobindings.SiloedUSDCTokenPoolMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var ConfigureLockBoxes = contract.NewWrite(contract.WriteParams[[]LockBoxConfig, *SiloedUSDCTokenPoolContract]{ - Name: "siloed-usdc-token-pool:configure-lock-boxes", - Version: Version, - Description: "Calls configureLockBoxes on the contract", - ContractType: ContractType, - ContractABI: SiloedUSDCTokenPoolABI, - NewContract: NewSiloedUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedUSDCTokenPoolContract, []LockBoxConfig], - Validate: func([]LockBoxConfig) error { return nil }, - CallContract: func( - c *SiloedUSDCTokenPoolContract, - opts *bind.TransactOpts, - args []LockBoxConfig, - ) (*types.Transaction, error) { - return c.ConfigureLockBoxes(opts, args) - }, -}) +func NewWriteConfigureLockBoxes(c gobindings.SiloedUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.SiloedLockReleaseTokenPoolLockBoxConfig], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, gobindings.SiloedUSDCTokenPoolInterface]{ + Name: "siloed-usdc-token-pool:configure-lock-boxes", + Version: Version, + Description: "Calls configureLockBoxes on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedUSDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedUSDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedUSDCTokenPoolInterface, + opts *bind.TransactOpts, + args []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, + ) (*types.Transaction, error) { + return c.ConfigureLockBoxes(opts, args) + }, + }) +} -var ApplyAuthorizedCallerUpdates = contract.NewWrite(contract.WriteParams[AuthorizedCallerArgs, *SiloedUSDCTokenPoolContract]{ - Name: "siloed-usdc-token-pool:apply-authorized-caller-updates", - Version: Version, - Description: "Calls applyAuthorizedCallerUpdates on the contract", - ContractType: ContractType, - ContractABI: SiloedUSDCTokenPoolABI, - NewContract: NewSiloedUSDCTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*SiloedUSDCTokenPoolContract, AuthorizedCallerArgs], - Validate: func(AuthorizedCallerArgs) error { return nil }, - CallContract: func( - c *SiloedUSDCTokenPoolContract, - opts *bind.TransactOpts, - args AuthorizedCallerArgs, - ) (*types.Transaction, error) { - return c.ApplyAuthorizedCallerUpdates(opts, args) - }, -}) +func NewWriteApplyAuthorizedCallerUpdates(c gobindings.SiloedUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.AuthorizedCallersAuthorizedCallerArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.AuthorizedCallersAuthorizedCallerArgs, gobindings.SiloedUSDCTokenPoolInterface]{ + Name: "siloed-usdc-token-pool:apply-authorized-caller-updates", + Version: Version, + Description: "Calls applyAuthorizedCallerUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.SiloedUSDCTokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.SiloedUSDCTokenPoolInterface, opts *bind.CallOpts, caller common.Address, args gobindings.AuthorizedCallersAuthorizedCallerArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.SiloedUSDCTokenPoolInterface, + opts *bind.TransactOpts, + args gobindings.AuthorizedCallersAuthorizedCallerArgs, + ) (*types.Transaction, error) { + return c.ApplyAuthorizedCallerUpdates(opts, args) + }, + }) +} -var GetAllAuthorizedCallers = contract.NewRead(contract.ReadParams[struct{}, []common.Address, *SiloedUSDCTokenPoolContract]{ - Name: "siloed-usdc-token-pool:get-all-authorized-callers", - Version: Version, - Description: "Calls getAllAuthorizedCallers on the contract", - ContractType: ContractType, - NewContract: NewSiloedUSDCTokenPoolContract, - CallContract: func(c *SiloedUSDCTokenPoolContract, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { - return c.GetAllAuthorizedCallers(opts) - }, -}) +func NewReadGetAllAuthorizedCallers(c gobindings.SiloedUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []common.Address, gobindings.SiloedUSDCTokenPoolInterface]{ + Name: "siloed-usdc-token-pool:get-all-authorized-callers", + Version: Version, + Description: "Calls getAllAuthorizedCallers on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedUSDCTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]common.Address, error) { + return c.GetAllAuthorizedCallers(opts) + }, + }) +} -var GetAllLockBoxConfigs = contract.NewRead(contract.ReadParams[struct{}, []LockBoxConfig, *SiloedUSDCTokenPoolContract]{ - Name: "siloed-usdc-token-pool:get-all-lock-box-configs", - Version: Version, - Description: "Calls getAllLockBoxConfigs on the contract", - ContractType: ContractType, - NewContract: NewSiloedUSDCTokenPoolContract, - CallContract: func(c *SiloedUSDCTokenPoolContract, opts *bind.CallOpts, args struct{}) ([]LockBoxConfig, error) { - return c.GetAllLockBoxConfigs(opts) - }, -}) +func NewReadGetAllLockBoxConfigs(c gobindings.SiloedUSDCTokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, gobindings.SiloedUSDCTokenPoolInterface]{ + Name: "siloed-usdc-token-pool:get-all-lock-box-configs", + Version: Version, + Description: "Calls getAllLockBoxConfigs on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.SiloedUSDCTokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]gobindings.SiloedLockReleaseTokenPoolLockBoxConfig, error) { + return c.GetAllLockBoxConfigs(opts) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/operations/token_pool/token_pool.go b/chains/evm/deployment/v2_0_0/operations/token_pool/token_pool.go index 2de9efde62..2a0d4c42d4 100644 --- a/chains/evm/deployment/v2_0_0/operations/token_pool/token_pool.go +++ b/chains/evm/deployment/v2_0_0/operations/token_pool/token_pool.go @@ -3,616 +3,406 @@ package token_pool import ( - "math/big" - - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/token_pool" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "TokenPool" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const TokenPoolABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IBurnMintERC20"},{"name":"localTokenDecimals","type":"uint8","internalType":"uint8"},{"name":"advancedPoolHooks","type":"address","internalType":"address"},{"name":"rmnProxy","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"addRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyChainUpdates","inputs":[{"name":"remoteChainSelectorsToRemove","type":"uint64[]","internalType":"uint64[]"},{"name":"chainsToAdd","type":"tuple[]","internalType":"struct TokenPool.ChainUpdate[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddresses","type":"bytes[]","internalType":"bytes[]"},{"name":"remoteTokenAddress","type":"bytes","internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"applyTokenTransferFeeConfigUpdates","inputs":[{"name":"tokenTransferFeeConfigArgs","type":"tuple[]","internalType":"struct TokenPool.TokenTransferFeeConfigArgs[]","components":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}]},{"name":"disableTokenTransferFeeConfigs","type":"uint64[]","internalType":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getAdvancedPoolHooks","inputs":[],"outputs":[{"name":"advancedPoolHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"stateMutability":"view"},{"type":"function","name":"getAllowedFinalityConfig","inputs":[],"outputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"stateMutability":"view"},{"type":"function","name":"getCurrentRateLimiterState","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"}],"outputs":[{"name":"outboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterState","type":"tuple","internalType":"struct RateLimiter.TokenBucket","components":[{"name":"tokens","type":"uint128","internalType":"uint128"},{"name":"lastUpdated","type":"uint32","internalType":"uint32"},{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"stateMutability":"view"},{"type":"function","name":"getDynamicConfig","inputs":[],"outputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getFee","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getRmnProxy","inputs":[],"outputs":[{"name":"rmnProxy","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getSupportedChains","inputs":[],"outputs":[{"name":"","type":"uint64[]","internalType":"uint64[]"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenDecimals","inputs":[],"outputs":[{"name":"decimals","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"lockOrBurnOutV1","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"removeRemotePool","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setAllowedFinalityConfig","inputs":[{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setDynamicConfig","inputs":[{"name":"router","type":"address","internalType":"address"},{"name":"rateLimitAdmin","type":"address","internalType":"address"},{"name":"feeAdmin","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRateLimitConfig","inputs":[{"name":"rateLimitConfigArgs","type":"tuple[]","internalType":"struct TokenPool.RateLimitConfigArgs[]","components":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"fastFinality","type":"bool","internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"pure"},{"type":"function","name":"updateAdvancedPoolHooks","inputs":[{"name":"newHook","type":"address","internalType":"contract IAdvancedPoolHooks"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"},{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"AdvancedPoolHooksUpdated","inputs":[{"name":"oldHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"},{"name":"newHook","type":"address","indexed":false,"internalType":"contract IAdvancedPoolHooks"}],"anonymous":false},{"type":"event","name":"ChainAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"},{"name":"remoteToken","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ChainRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"DynamicConfigSet","inputs":[{"name":"router","type":"address","indexed":false,"internalType":"address"},{"name":"rateLimitAdmin","type":"address","indexed":false,"internalType":"address"},{"name":"feeAdmin","type":"address","indexed":false,"internalType":"address"}],"anonymous":false},{"type":"event","name":"FastFinalityInboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FastFinalityOutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"FinalityConfigSet","inputs":[{"name":"allowedFinality","type":"bytes4","indexed":false,"internalType":"bytes4"}],"anonymous":false},{"type":"event","name":"InboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockedOrBurned","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OutboundRateLimitConsumed","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"RateLimitConfigured","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"fastFinality","type":"bool","indexed":false,"internalType":"bool"},{"name":"outboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]},{"name":"inboundRateLimiterConfig","type":"tuple","indexed":false,"internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}],"anonymous":false},{"type":"event","name":"ReleasedOrMinted","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"token","type":"address","indexed":false,"internalType":"address"},{"name":"sender","type":"address","indexed":false,"internalType":"address"},{"name":"recipient","type":"address","indexed":false,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"RemotePoolAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"RemotePoolRemoved","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigDeleted","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"}],"anonymous":false},{"type":"event","name":"TokenTransferFeeConfigUpdated","inputs":[{"name":"destChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"tokenTransferFeeConfig","type":"tuple","indexed":false,"internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"anonymous":false},{"type":"error","name":"BucketOverfilled","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CallerIsNotOwnerOrFeeAdmin","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainAlreadyExists","inputs":[{"name":"chainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"ChainNotAllowed","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"CursedByRMN","inputs":[]},{"type":"error","name":"DisabledNonZeroRateLimit","inputs":[{"name":"config","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidDecimalArgs","inputs":[{"name":"expected","type":"uint8","internalType":"uint8"},{"name":"actual","type":"uint8","internalType":"uint8"}]},{"type":"error","name":"InvalidRateLimitRate","inputs":[{"name":"rateLimiterConfig","type":"tuple","internalType":"struct RateLimiter.Config","components":[{"name":"isEnabled","type":"bool","internalType":"bool"},{"name":"capacity","type":"uint128","internalType":"uint128"},{"name":"rate","type":"uint128","internalType":"uint128"}]}]},{"type":"error","name":"InvalidRemoteChainDecimals","inputs":[{"name":"sourcePoolData","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRemotePoolForChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidRequestedFinality","inputs":[{"name":"requestedFinality","type":"bytes4","internalType":"bytes4"},{"name":"allowedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"InvalidSourcePoolAddress","inputs":[{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"InvalidToken","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"InvalidTokenTransferFeeConfig","inputs":[{"name":"destChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidTransferFeeBps","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"NonExistentChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OverflowDetected","inputs":[{"name":"remoteDecimals","type":"uint8","internalType":"uint8"},{"name":"localDecimals","type":"uint8","internalType":"uint8"},{"name":"remoteAmount","type":"uint256","internalType":"uint256"}]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAlreadyAdded","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"remotePoolAddress","type":"bytes","internalType":"bytes"}]},{"type":"error","name":"RequestedFinalityCanOnlyHaveOneMode","inputs":[{"name":"encodedFinality","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenMaxCapacityExceeded","inputs":[{"name":"capacity","type":"uint256","internalType":"uint256"},{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"TokenRateLimitReached","inputs":[{"name":"minWaitInSeconds","type":"uint256","internalType":"uint256"},{"name":"available","type":"uint256","internalType":"uint256"},{"name":"tokenAddress","type":"address","internalType":"address"}]},{"type":"error","name":"Unauthorized","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressInvalid","inputs":[]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` - -type TokenPoolContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewTokenPoolContract( - address common.Address, - backend bind.ContractBackend, -) (*TokenPoolContract, error) { - parsed, err := abi.JSON(strings.NewReader(TokenPoolABI)) - if err != nil { - return nil, err - } - return &TokenPoolContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *TokenPoolContract) Address() common.Address { - return c.address -} - -func (c *TokenPoolContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) SetAllowedFinalityConfig(opts *bind.TransactOpts, args [4]byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "setAllowedFinalityConfig", args) -} - -func (c *TokenPoolContract) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *TokenPoolContract) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return c.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (c *TokenPoolContract) SetDynamicConfig(opts *bind.TransactOpts, router common.Address, rateLimitAdmin common.Address, feeAdmin common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setDynamicConfig", router, rateLimitAdmin, feeAdmin) -} - -func (c *TokenPoolContract) WithdrawFeeTokens(opts *bind.TransactOpts, feeTokens []common.Address, recipient common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "withdrawFeeTokens", feeTokens, recipient) -} - -func (c *TokenPoolContract) UpdateAdvancedPoolHooks(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "updateAdvancedPoolHooks", args) -} - -func (c *TokenPoolContract) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []ChainUpdate) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) -} - -func (c *TokenPoolContract) SetRateLimitConfig(opts *bind.TransactOpts, args []RateLimitConfigArgs) (*types.Transaction, error) { - return c.contract.Transact(opts, "setRateLimitConfig", args) -} - -func (c *TokenPoolContract) ApplyTokenTransferFeeConfigUpdates(opts *bind.TransactOpts, tokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs, disableTokenTransferFeeConfigs []uint64) (*types.Transaction, error) { - return c.contract.Transact(opts, "applyTokenTransferFeeConfigUpdates", tokenTransferFeeConfigArgs, disableTokenTransferFeeConfigs) -} - -func (c *TokenPoolContract) GetDynamicConfig(opts *bind.CallOpts) (GetDynamicConfigResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getDynamicConfig") - outstruct := new(GetDynamicConfigResult) - if err != nil { - return *outstruct, err - } - - outstruct.Router = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.RateLimitAdmin = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.FeeAdmin = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) - - return *outstruct, nil -} - -func (c *TokenPoolContract) GetRmnProxy(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getRmnProxy") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) GetCurrentRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64, fastFinality bool) (GetCurrentRateLimiterStateResult, error) { - var out []any - err := c.contract.Call(opts, &out, "getCurrentRateLimiterState", remoteChainSelector, fastFinality) - outstruct := new(GetCurrentRateLimiterStateResult) - if err != nil { - return *outstruct, err - } - - outstruct.OutboundRateLimiterState = *abi.ConvertType(out[0], new(TokenBucket)).(*TokenBucket) - outstruct.InboundRateLimiterState = *abi.ConvertType(out[1], new(TokenBucket)).(*TokenBucket) - - return *outstruct, nil -} - -func (c *TokenPoolContract) GetAllowedFinalityConfig(opts *bind.CallOpts) ([4]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getAllowedFinalityConfig") - if err != nil { - var zero [4]byte - return zero, err - } - return *abi.ConvertType(out[0], new([4]byte)).(*[4]byte), nil -} - -func (c *TokenPoolContract) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { - var out []any - err := c.contract.Call(opts, &out, "getSupportedChains") - if err != nil { - var zero []uint64 - return zero, err - } - return *abi.ConvertType(out[0], new([]uint64)).(*[]uint64), nil -} - -func (c *TokenPoolContract) GetRemotePools(opts *bind.CallOpts, args uint64) ([][]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemotePools", args) - if err != nil { - var zero [][]byte - return zero, err - } - return *abi.ConvertType(out[0], new([][]byte)).(*[][]byte), nil -} - -func (c *TokenPoolContract) GetRemoteToken(opts *bind.CallOpts, args uint64) ([]byte, error) { - var out []any - err := c.contract.Call(opts, &out, "getRemoteToken", args) - if err != nil { - var zero []byte - return zero, err - } - return *abi.ConvertType(out[0], new([]byte)).(*[]byte), nil -} - -func (c *TokenPoolContract) GetToken(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getToken") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenDecimals") - if err != nil { - var zero uint8 - return zero, err - } - return *abi.ConvertType(out[0], new(uint8)).(*uint8), nil -} - -func (c *TokenPoolContract) IsSupportedToken(opts *bind.CallOpts, args common.Address) (bool, error) { - var out []any - err := c.contract.Call(opts, &out, "isSupportedToken", args) - if err != nil { - var zero bool - return zero, err - } - return *abi.ConvertType(out[0], new(bool)).(*bool), nil -} - -func (c *TokenPoolContract) GetAdvancedPoolHooks(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "getAdvancedPoolHooks") - if err != nil { - var zero common.Address - return zero, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *TokenPoolContract) GetTokenTransferFeeConfig(opts *bind.CallOpts, arg0 common.Address, destChainSelector uint64, arg2 [4]byte, arg3 []byte) (TokenTransferFeeConfig, error) { - var out []any - err := c.contract.Call(opts, &out, "getTokenTransferFeeConfig", arg0, destChainSelector, arg2, arg3) - if err != nil { - var zero TokenTransferFeeConfig - return zero, err - } - return *abi.ConvertType(out[0], new(TokenTransferFeeConfig)).(*TokenTransferFeeConfig), nil -} - -type ChainUpdate struct { - RemoteChainSelector uint64 - RemotePoolAddresses [][]byte - RemoteTokenAddress []byte - OutboundRateLimiterConfig Config - InboundRateLimiterConfig Config -} - -type Config struct { - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - -type GetCurrentRateLimiterStateResult struct { - OutboundRateLimiterState TokenBucket - InboundRateLimiterState TokenBucket -} - -type GetDynamicConfigResult struct { - Router common.Address - RateLimitAdmin common.Address - FeeAdmin common.Address -} - -type RateLimitConfigArgs struct { - RemoteChainSelector uint64 - FastFinality bool - OutboundRateLimiterConfig Config - InboundRateLimiterConfig Config -} - -type TokenBucket struct { - Tokens *big.Int - LastUpdated uint32 - IsEnabled bool - Capacity *big.Int - Rate *big.Int -} - -type TokenTransferFeeConfig struct { - DestGasOverhead uint32 - DestBytesOverhead uint32 - FinalityFeeUSDCents uint32 - FastFinalityFeeUSDCents uint32 - FinalityTransferFeeBps uint16 - FastFinalityTransferFeeBps uint16 - IsEnabled bool -} - -type TokenTransferFeeConfigArgs struct { - DestChainSelector uint64 - TokenTransferFeeConfig TokenTransferFeeConfig -} - type AddRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type RemoveRemotePoolArgs struct { - RemoteChainSelector uint64 - RemotePoolAddress []byte + RemoteChainSelector uint64 `json:"remoteChainSelector"` + RemotePoolAddress []byte `json:"remotePoolAddress"` } type SetDynamicConfigArgs struct { - Router common.Address - RateLimitAdmin common.Address - FeeAdmin common.Address + Router common.Address `json:"router"` + RateLimitAdmin common.Address `json:"rateLimitAdmin"` + FeeAdmin common.Address `json:"feeAdmin"` } type WithdrawFeeTokensArgs struct { - FeeTokens []common.Address - Recipient common.Address + FeeTokens []common.Address `json:"feeTokens"` + Recipient common.Address `json:"recipient"` } type ApplyChainUpdatesArgs struct { - RemoteChainSelectorsToRemove []uint64 - ChainsToAdd []ChainUpdate + RemoteChainSelectorsToRemove []uint64 `json:"remoteChainSelectorsToRemove"` + ChainsToAdd []gobindings.TokenPoolChainUpdate `json:"chainsToAdd"` } type ApplyTokenTransferFeeConfigUpdatesArgs struct { - TokenTransferFeeConfigArgs []TokenTransferFeeConfigArgs - DisableTokenTransferFeeConfigs []uint64 + TokenTransferFeeConfigArgs []gobindings.TokenPoolTokenTransferFeeConfigArgs `json:"tokenTransferFeeConfigArgs"` + DisableTokenTransferFeeConfigs []uint64 `json:"disableTokenTransferFeeConfigs"` } type GetCurrentRateLimiterStateArgs struct { - RemoteChainSelector uint64 - FastFinality bool + RemoteChainSelector uint64 `json:"remoteChainSelector"` + FastFinality bool `json:"fastFinality"` } type GetTokenTransferFeeConfigArgs struct { - Arg0 common.Address - DestChainSelector uint64 - Arg2 [4]byte - Arg3 []byte + Arg0 common.Address `json:"arg0"` + DestChainSelector uint64 `json:"destChainSelector"` + Arg2 [4]byte `json:"arg2"` + Arg3 []byte `json:"arg3"` +} + +func NewWriteSetAllowedFinalityConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[[4]byte], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[4]byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-allowed-finality-config", + Version: Version, + Description: "Calls setAllowedFinalityConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args [4]byte) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args [4]byte, + ) (*types.Transaction, error) { + return c.SetAllowedFinalityConfig(opts, args) + }, + }) +} + +func NewWriteAddRemotePool(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[AddRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:add-remote-pool", + Version: Version, + Description: "Calls addRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args AddRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args AddRemotePoolArgs, + ) (*types.Transaction, error) { + return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewWriteRemoveRemotePool(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[RemoveRemotePoolArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:remove-remote-pool", + Version: Version, + Description: "Calls removeRemotePool on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args RemoveRemotePoolArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args RemoveRemotePoolArgs, + ) (*types.Transaction, error) { + return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) + }, + }) +} + +func NewWriteSetDynamicConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[SetDynamicConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[SetDynamicConfigArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-dynamic-config", + Version: Version, + Description: "Calls setDynamicConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args SetDynamicConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args SetDynamicConfigArgs, + ) (*types.Transaction, error) { + return c.SetDynamicConfig(opts, args.Router, args.RateLimitAdmin, args.FeeAdmin) + }, + }) +} + +func NewWriteWithdrawFeeTokens(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[WithdrawFeeTokensArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[WithdrawFeeTokensArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:withdraw-fee-tokens", + Version: Version, + Description: "Calls withdrawFeeTokens on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args WithdrawFeeTokensArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args WithdrawFeeTokensArgs, + ) (*types.Transaction, error) { + return c.WithdrawFeeTokens(opts, args.FeeTokens, args.Recipient) + }, + }) +} + +func NewWriteUpdateAdvancedPoolHooks(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:update-advanced-pool-hooks", + Version: Version, + Description: "Calls updateAdvancedPoolHooks on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.UpdateAdvancedPoolHooks(opts, args) + }, + }) +} + +func NewWriteApplyChainUpdates(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[ApplyChainUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:apply-chain-updates", + Version: Version, + Description: "Calls applyChainUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args ApplyChainUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args ApplyChainUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) + }, + }) +} + +func NewWriteSetRateLimitConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[[]gobindings.TokenPoolRateLimitConfigArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[[]gobindings.TokenPoolRateLimitConfigArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:set-rate-limit-config", + Version: Version, + Description: "Calls setRateLimitConfig on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args []gobindings.TokenPoolRateLimitConfigArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args []gobindings.TokenPoolRateLimitConfigArgs, + ) (*types.Transaction, error) { + return c.SetRateLimitConfig(opts, args) + }, + }) +} + +func NewWriteApplyTokenTransferFeeConfigUpdates(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[ApplyTokenTransferFeeConfigUpdatesArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, gobindings.TokenPoolInterface]{ + Name: "token-pool:apply-token-transfer-fee-config-updates", + Version: Version, + Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", + ContractType: ContractType, + ContractABI: gobindings.TokenPoolMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, caller common.Address, args ApplyTokenTransferFeeConfigUpdatesArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.TokenPoolInterface, + opts *bind.TransactOpts, + args ApplyTokenTransferFeeConfigUpdatesArgs, + ) (*types.Transaction, error) { + return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.DisableTokenTransferFeeConfigs) + }, + }) +} + +func NewReadGetDynamicConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.GetDynamicConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.GetDynamicConfig, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-dynamic-config", + Version: Version, + Description: "Calls getDynamicConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (gobindings.GetDynamicConfig, error) { + return c.GetDynamicConfig(opts) + }, + }) +} + +func NewReadGetRmnProxy(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-rmn-proxy", + Version: Version, + Description: "Calls getRmnProxy on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetRmnProxy(opts) + }, + }) +} + +func NewReadGetCurrentRateLimiterState(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[GetCurrentRateLimiterStateArgs], gobindings.GetCurrentRateLimiterState, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetCurrentRateLimiterStateArgs, gobindings.GetCurrentRateLimiterState, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-current-rate-limiter-state", + Version: Version, + Description: "Calls getCurrentRateLimiterState on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args GetCurrentRateLimiterStateArgs) (gobindings.GetCurrentRateLimiterState, error) { + return c.GetCurrentRateLimiterState(opts, args.RemoteChainSelector, args.FastFinality) + }, + }) +} + +func NewReadGetAllowedFinalityConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], [4]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, [4]byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-allowed-finality-config", + Version: Version, + Description: "Calls getAllowedFinalityConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) ([4]byte, error) { + return c.GetAllowedFinalityConfig(opts) + }, + }) +} + +func NewReadGetSupportedChains(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], []uint64, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, []uint64, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-supported-chains", + Version: Version, + Description: "Calls getSupportedChains on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) ([]uint64, error) { + return c.GetSupportedChains(opts) + }, + }) +} + +func NewReadGetRemotePools(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], [][]byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, [][]byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-remote-pools", + Version: Version, + Description: "Calls getRemotePools on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) ([][]byte, error) { + return c.GetRemotePools(opts, args) + }, + }) +} + +func NewReadGetRemoteToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[uint64], []byte, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, []byte, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-remote-token", + Version: Version, + Description: "Calls getRemoteToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args uint64) ([]byte, error) { + return c.GetRemoteToken(opts, args) + }, + }) +} + +func NewReadGetToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-token", + Version: Version, + Description: "Calls getToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetToken(opts) + }, + }) +} + +func NewReadGetTokenDecimals(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], uint8, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, uint8, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-token-decimals", + Version: Version, + Description: "Calls getTokenDecimals on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (uint8, error) { + return c.GetTokenDecimals(opts) + }, + }) +} + +func NewReadIsSupportedToken(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], bool, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[common.Address, bool, gobindings.TokenPoolInterface]{ + Name: "token-pool:is-supported-token", + Version: Version, + Description: "Calls isSupportedToken on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args common.Address) (bool, error) { + return c.IsSupportedToken(opts, args) + }, + }) +} + +func NewReadGetAdvancedPoolHooks(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], common.Address, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, common.Address, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-advanced-pool-hooks", + Version: Version, + Description: "Calls getAdvancedPoolHooks on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args struct{}) (common.Address, error) { + return c.GetAdvancedPoolHooks(opts) + }, + }) +} + +func NewReadGetTokenTransferFeeConfig(c gobindings.TokenPoolInterface) *cld_ops.Operation[contract.FunctionInput[GetTokenTransferFeeConfigArgs], gobindings.IPoolV2TokenTransferFeeConfig, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, gobindings.IPoolV2TokenTransferFeeConfig, gobindings.TokenPoolInterface]{ + Name: "token-pool:get-token-transfer-fee-config", + Version: Version, + Description: "Calls getTokenTransferFeeConfig on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.TokenPoolInterface, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (gobindings.IPoolV2TokenTransferFeeConfig, error) { + return c.GetTokenTransferFeeConfig(opts, args.Arg0, args.DestChainSelector, args.Arg2, args.Arg3) + }, + }) } - -var SetAllowedFinalityConfig = contract.NewWrite(contract.WriteParams[[4]byte, *TokenPoolContract]{ - Name: "token-pool:set-allowed-finality-config", - Version: Version, - Description: "Calls setAllowedFinalityConfig on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, [4]byte], - Validate: func([4]byte) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args [4]byte, - ) (*types.Transaction, error) { - return c.SetAllowedFinalityConfig(opts, args) - }, -}) - -var AddRemotePool = contract.NewWrite(contract.WriteParams[AddRemotePoolArgs, *TokenPoolContract]{ - Name: "token-pool:add-remote-pool", - Version: Version, - Description: "Calls addRemotePool on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, AddRemotePoolArgs], - Validate: func(AddRemotePoolArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args AddRemotePoolArgs, - ) (*types.Transaction, error) { - return c.AddRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var RemoveRemotePool = contract.NewWrite(contract.WriteParams[RemoveRemotePoolArgs, *TokenPoolContract]{ - Name: "token-pool:remove-remote-pool", - Version: Version, - Description: "Calls removeRemotePool on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, RemoveRemotePoolArgs], - Validate: func(RemoveRemotePoolArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args RemoveRemotePoolArgs, - ) (*types.Transaction, error) { - return c.RemoveRemotePool(opts, args.RemoteChainSelector, args.RemotePoolAddress) - }, -}) - -var SetDynamicConfig = contract.NewWrite(contract.WriteParams[SetDynamicConfigArgs, *TokenPoolContract]{ - Name: "token-pool:set-dynamic-config", - Version: Version, - Description: "Calls setDynamicConfig on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, SetDynamicConfigArgs], - Validate: func(SetDynamicConfigArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args SetDynamicConfigArgs, - ) (*types.Transaction, error) { - return c.SetDynamicConfig(opts, args.Router, args.RateLimitAdmin, args.FeeAdmin) - }, -}) - -var WithdrawFeeTokens = contract.NewWrite(contract.WriteParams[WithdrawFeeTokensArgs, *TokenPoolContract]{ - Name: "token-pool:withdraw-fee-tokens", - Version: Version, - Description: "Calls withdrawFeeTokens on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, WithdrawFeeTokensArgs], - Validate: func(WithdrawFeeTokensArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args WithdrawFeeTokensArgs, - ) (*types.Transaction, error) { - return c.WithdrawFeeTokens(opts, args.FeeTokens, args.Recipient) - }, -}) - -var UpdateAdvancedPoolHooks = contract.NewWrite(contract.WriteParams[common.Address, *TokenPoolContract]{ - Name: "token-pool:update-advanced-pool-hooks", - Version: Version, - Description: "Calls updateAdvancedPoolHooks on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.UpdateAdvancedPoolHooks(opts, args) - }, -}) - -var ApplyChainUpdates = contract.NewWrite(contract.WriteParams[ApplyChainUpdatesArgs, *TokenPoolContract]{ - Name: "token-pool:apply-chain-updates", - Version: Version, - Description: "Calls applyChainUpdates on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, ApplyChainUpdatesArgs], - Validate: func(ApplyChainUpdatesArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args ApplyChainUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyChainUpdates(opts, args.RemoteChainSelectorsToRemove, args.ChainsToAdd) - }, -}) - -var SetRateLimitConfig = contract.NewWrite(contract.WriteParams[[]RateLimitConfigArgs, *TokenPoolContract]{ - Name: "token-pool:set-rate-limit-config", - Version: Version, - Description: "Calls setRateLimitConfig on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, []RateLimitConfigArgs], - Validate: func([]RateLimitConfigArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args []RateLimitConfigArgs, - ) (*types.Transaction, error) { - return c.SetRateLimitConfig(opts, args) - }, -}) - -var ApplyTokenTransferFeeConfigUpdates = contract.NewWrite(contract.WriteParams[ApplyTokenTransferFeeConfigUpdatesArgs, *TokenPoolContract]{ - Name: "token-pool:apply-token-transfer-fee-config-updates", - Version: Version, - Description: "Calls applyTokenTransferFeeConfigUpdates on the contract", - ContractType: ContractType, - ContractABI: TokenPoolABI, - NewContract: NewTokenPoolContract, - IsAllowedCaller: contract.OnlyOwner[*TokenPoolContract, ApplyTokenTransferFeeConfigUpdatesArgs], - Validate: func(ApplyTokenTransferFeeConfigUpdatesArgs) error { return nil }, - CallContract: func( - c *TokenPoolContract, - opts *bind.TransactOpts, - args ApplyTokenTransferFeeConfigUpdatesArgs, - ) (*types.Transaction, error) { - return c.ApplyTokenTransferFeeConfigUpdates(opts, args.TokenTransferFeeConfigArgs, args.DisableTokenTransferFeeConfigs) - }, -}) - -var GetDynamicConfig = contract.NewRead(contract.ReadParams[struct{}, GetDynamicConfigResult, *TokenPoolContract]{ - Name: "token-pool:get-dynamic-config", - Version: Version, - Description: "Calls getDynamicConfig on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (GetDynamicConfigResult, error) { - return c.GetDynamicConfig(opts) - }, -}) - -var GetRmnProxy = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-rmn-proxy", - Version: Version, - Description: "Calls getRmnProxy on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetRmnProxy(opts) - }, -}) - -var GetCurrentRateLimiterState = contract.NewRead(contract.ReadParams[GetCurrentRateLimiterStateArgs, GetCurrentRateLimiterStateResult, *TokenPoolContract]{ - Name: "token-pool:get-current-rate-limiter-state", - Version: Version, - Description: "Calls getCurrentRateLimiterState on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args GetCurrentRateLimiterStateArgs) (GetCurrentRateLimiterStateResult, error) { - return c.GetCurrentRateLimiterState(opts, args.RemoteChainSelector, args.FastFinality) - }, -}) - -var GetAllowedFinalityConfig = contract.NewRead(contract.ReadParams[struct{}, [4]byte, *TokenPoolContract]{ - Name: "token-pool:get-allowed-finality-config", - Version: Version, - Description: "Calls getAllowedFinalityConfig on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) ([4]byte, error) { - return c.GetAllowedFinalityConfig(opts) - }, -}) - -var GetSupportedChains = contract.NewRead(contract.ReadParams[struct{}, []uint64, *TokenPoolContract]{ - Name: "token-pool:get-supported-chains", - Version: Version, - Description: "Calls getSupportedChains on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) ([]uint64, error) { - return c.GetSupportedChains(opts) - }, -}) - -var GetRemotePools = contract.NewRead(contract.ReadParams[uint64, [][]byte, *TokenPoolContract]{ - Name: "token-pool:get-remote-pools", - Version: Version, - Description: "Calls getRemotePools on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) ([][]byte, error) { - return c.GetRemotePools(opts, args) - }, -}) - -var GetRemoteToken = contract.NewRead(contract.ReadParams[uint64, []byte, *TokenPoolContract]{ - Name: "token-pool:get-remote-token", - Version: Version, - Description: "Calls getRemoteToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args uint64) ([]byte, error) { - return c.GetRemoteToken(opts, args) - }, -}) - -var GetToken = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-token", - Version: Version, - Description: "Calls getToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetToken(opts) - }, -}) - -var GetTokenDecimals = contract.NewRead(contract.ReadParams[struct{}, uint8, *TokenPoolContract]{ - Name: "token-pool:get-token-decimals", - Version: Version, - Description: "Calls getTokenDecimals on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (uint8, error) { - return c.GetTokenDecimals(opts) - }, -}) - -var IsSupportedToken = contract.NewRead(contract.ReadParams[common.Address, bool, *TokenPoolContract]{ - Name: "token-pool:is-supported-token", - Version: Version, - Description: "Calls isSupportedToken on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args common.Address) (bool, error) { - return c.IsSupportedToken(opts, args) - }, -}) - -var GetAdvancedPoolHooks = contract.NewRead(contract.ReadParams[struct{}, common.Address, *TokenPoolContract]{ - Name: "token-pool:get-advanced-pool-hooks", - Version: Version, - Description: "Calls getAdvancedPoolHooks on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args struct{}) (common.Address, error) { - return c.GetAdvancedPoolHooks(opts) - }, -}) - -var GetTokenTransferFeeConfig = contract.NewRead(contract.ReadParams[GetTokenTransferFeeConfigArgs, TokenTransferFeeConfig, *TokenPoolContract]{ - Name: "token-pool:get-token-transfer-fee-config", - Version: Version, - Description: "Calls getTokenTransferFeeConfig on the contract", - ContractType: ContractType, - NewContract: NewTokenPoolContract, - CallContract: func(c *TokenPoolContract, opts *bind.CallOpts, args GetTokenTransferFeeConfigArgs) (TokenTransferFeeConfig, error) { - return c.GetTokenTransferFeeConfig(opts, args.Arg0, args.DestChainSelector, args.Arg2, args.Arg3) - }, -}) diff --git a/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy/usdc_token_pool_proxy.go b/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy/usdc_token_pool_proxy.go index ee818e5499..c6b0db6136 100644 --- a/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy/usdc_token_pool_proxy.go +++ b/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy/usdc_token_pool_proxy.go @@ -3,201 +3,131 @@ package usdc_token_pool_proxy import ( - "strings" - "github.com/Masterminds/semver/v3" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + gobindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/usdc_token_pool_proxy" + cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cld_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) var ContractType cldf_deployment.ContractType = "USDCTokenPoolProxy" var Version = semver.MustParse("2.0.0") var TypeAndVersion = cldf_deployment.NewTypeAndVersion(ContractType, *Version) -const USDCTokenPoolProxyABI = `[{"type":"constructor","inputs":[{"name":"token","type":"address","internalType":"contract IERC20"},{"name":"pools","type":"tuple","internalType":"struct USDCTokenPoolProxy.PoolAddresses","components":[{"name":"cctpV1Pool","type":"address","internalType":"address"},{"name":"cctpV2Pool","type":"address","internalType":"address"},{"name":"cctpV2PoolWithCCV","type":"address","internalType":"address"},{"name":"siloedLockReleasePool","type":"address","internalType":"address"}]},{"name":"router","type":"address","internalType":"address"},{"name":"cctpVerifier","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptOwnership","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"getFee","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"feeToken","type":"address","internalType":"address"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeUSDCents","type":"uint256","internalType":"uint256"},{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"tokenFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"getFeeAggregator","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getLockOrBurnMechanism","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"uint8","internalType":"enum USDCTokenPoolProxy.LockOrBurnMechanism"}],"stateMutability":"view"},{"type":"function","name":"getPools","inputs":[],"outputs":[{"name":"","type":"tuple","internalType":"struct USDCTokenPoolProxy.PoolAddresses","components":[{"name":"cctpV1Pool","type":"address","internalType":"address"},{"name":"cctpV2Pool","type":"address","internalType":"address"},{"name":"cctpV2PoolWithCCV","type":"address","internalType":"address"},{"name":"siloedLockReleasePool","type":"address","internalType":"address"}]}],"stateMutability":"view"},{"type":"function","name":"getRemotePools","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes[]","internalType":"bytes[]"}],"stateMutability":"view"},{"type":"function","name":"getRemoteToken","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"type":"function","name":"getRequiredCCVs","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"","type":"uint256","internalType":"uint256"},{"name":"","type":"bytes4","internalType":"bytes4"},{"name":"extraData","type":"bytes","internalType":"bytes"},{"name":"direction","type":"uint8","internalType":"enum IPoolV2.MessageDirection"}],"outputs":[{"name":"requiredCCVs","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"function","name":"getStaticConfig","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"address"},{"name":"router","type":"address","internalType":"address"},{"name":"cctpVerifier","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"getToken","inputs":[],"outputs":[{"name":"token","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"type":"function","name":"getTokenTransferFeeConfig","inputs":[{"name":"localToken","type":"address","internalType":"address"},{"name":"destChainSelector","type":"uint64","internalType":"uint64"},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"feeConfig","type":"tuple","internalType":"struct IPoolV2.TokenTransferFeeConfig","components":[{"name":"destGasOverhead","type":"uint32","internalType":"uint32"},{"name":"destBytesOverhead","type":"uint32","internalType":"uint32"},{"name":"finalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"fastFinalityFeeUSDCents","type":"uint32","internalType":"uint32"},{"name":"finalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"fastFinalityTransferFeeBps","type":"uint16","internalType":"uint16"},{"name":"isEnabled","type":"bool","internalType":"bool"}]}],"stateMutability":"view"},{"type":"function","name":"isSupportedChain","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"isSupportedToken","inputs":[{"name":"token","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"lockOrBurn","inputs":[{"name":"lockOrBurnIn","type":"tuple","internalType":"struct Pool.LockOrBurnInV1","components":[{"name":"receiver","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"originalSender","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"},{"name":"tokenArgs","type":"bytes","internalType":"bytes"}],"outputs":[{"name":"lockOrBurnOut","type":"tuple","internalType":"struct Pool.LockOrBurnOutV1","components":[{"name":"destTokenAddress","type":"bytes","internalType":"bytes"},{"name":"destPoolData","type":"bytes","internalType":"bytes"}]},{"name":"destTokenAmount","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"owner","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]},{"name":"requestedFinalityConfig","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"releaseOrMint","inputs":[{"name":"releaseOrMintIn","type":"tuple","internalType":"struct Pool.ReleaseOrMintInV1","components":[{"name":"originalSender","type":"bytes","internalType":"bytes"},{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"receiver","type":"address","internalType":"address"},{"name":"sourceDenominatedAmount","type":"uint256","internalType":"uint256"},{"name":"localToken","type":"address","internalType":"address"},{"name":"sourcePoolAddress","type":"bytes","internalType":"bytes"},{"name":"sourcePoolData","type":"bytes","internalType":"bytes"},{"name":"offchainTokenData","type":"bytes","internalType":"bytes"}]}],"outputs":[{"name":"","type":"tuple","internalType":"struct Pool.ReleaseOrMintOutV1","components":[{"name":"destinationAmount","type":"uint256","internalType":"uint256"}]}],"stateMutability":"nonpayable"},{"type":"function","name":"setFeeAggregator","inputs":[{"name":"feeAggregator","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"name":"interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"pure"},{"type":"function","name":"transferOwnership","inputs":[{"name":"to","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"typeAndVersion","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"updateLockOrBurnMechanisms","inputs":[{"name":"remoteChainSelectors","type":"uint64[]","internalType":"uint64[]"},{"name":"mechanisms","type":"uint8[]","internalType":"enum USDCTokenPoolProxy.LockOrBurnMechanism[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"updatePoolAddresses","inputs":[{"name":"pools","type":"tuple","internalType":"struct USDCTokenPoolProxy.PoolAddresses","components":[{"name":"cctpV1Pool","type":"address","internalType":"address"},{"name":"cctpV2Pool","type":"address","internalType":"address"},{"name":"cctpV2PoolWithCCV","type":"address","internalType":"address"},{"name":"siloedLockReleasePool","type":"address","internalType":"address"}]}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"withdrawFeeTokens","inputs":[{"name":"feeTokens","type":"address[]","internalType":"address[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"event","name":"FeeTokenWithdrawn","inputs":[{"name":"receiver","type":"address","indexed":true,"internalType":"address"},{"name":"feeToken","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"LockOrBurnMechanismUpdated","inputs":[{"name":"remoteChainSelector","type":"uint64","indexed":true,"internalType":"uint64"},{"name":"mechanism","type":"uint8","indexed":false,"internalType":"enum USDCTokenPoolProxy.LockOrBurnMechanism"}],"anonymous":false},{"type":"event","name":"OwnershipTransferRequested","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"type":"event","name":"PoolAddressesUpdated","inputs":[{"name":"pools","type":"tuple","indexed":false,"internalType":"struct USDCTokenPoolProxy.PoolAddresses","components":[{"name":"cctpV1Pool","type":"address","internalType":"address"},{"name":"cctpV2Pool","type":"address","internalType":"address"},{"name":"cctpV2PoolWithCCV","type":"address","internalType":"address"},{"name":"siloedLockReleasePool","type":"address","internalType":"address"}]}],"anonymous":false},{"type":"error","name":"AddressCannotBeZero","inputs":[]},{"type":"error","name":"CallerIsNotARampOnRouter","inputs":[{"name":"caller","type":"address","internalType":"address"}]},{"type":"error","name":"CannotTransferToSelf","inputs":[]},{"type":"error","name":"ChainNotSupportedByVerifier","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"InvalidLockOrBurnMechanism","inputs":[{"name":"mechanism","type":"uint8","internalType":"enum USDCTokenPoolProxy.LockOrBurnMechanism"}]},{"type":"error","name":"InvalidMessageVersion","inputs":[{"name":"version","type":"bytes4","internalType":"bytes4"}]},{"type":"error","name":"MismatchedArrayLengths","inputs":[]},{"type":"error","name":"MustBeProposedOwner","inputs":[]},{"type":"error","name":"MustSetPoolForMechanism","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"},{"name":"mechanism","type":"uint8","internalType":"enum USDCTokenPoolProxy.LockOrBurnMechanism"}]},{"type":"error","name":"NoLockOrBurnMechanismSet","inputs":[{"name":"remoteChainSelector","type":"uint64","internalType":"uint64"}]},{"type":"error","name":"OnlyCallableByOwner","inputs":[]},{"type":"error","name":"OwnerCannotBeZero","inputs":[]},{"type":"error","name":"PoolAddressCannotBeSelf","inputs":[]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"type":"error","name":"TokenPoolUnsupported","inputs":[{"name":"pool","type":"address","internalType":"address"}]},{"type":"error","name":"ZeroAddressNotAllowed","inputs":[]}]` -const USDCTokenPoolProxyBin = "0x60e0806040523461043e5780613c88803803809161001d8285610443565b833981010360e0811261043e578151906001600160a01b0382169081830361043e57608090601f19011261043e5760405191608083016001600160401b038111848210176104285760405261007460208501610466565b835261008260408501610466565b916020840192835261009660608601610466565b94604085019586526100aa60808201610466565b92606086019384526100ca60c06100c360a08501610466565b9301610466565b92331561041757600180546001600160a01b03191633179055158015610406575b80156103f5575b6103e4576080526001600160a01b0390811660a05290811660c05283511680151590816103d3575b506103b15781516001600160a01b031680151590816103a0575b5061037e5783516001600160a01b0316801515908161036d575b5061034b5780516001600160a01b0316801515908161033a575b508061031f575b6102fe5782516001600160a01b0316301480156102eb575b80156102d8575b80156102c5575b6102b4579151600380546001600160a01b03199081166001600160a01b039384169081179092558351600480548316918516919091179055855160058054831691851691909117905584516006805490921690841617905560408051918252925182166020820152935181169184019190915290511660608201527f67d92722109d4170cee5a282ae6387dbf3fba5c7783912975743d4e51ab25aa890608090a16040516136c990816105bf82396080518181816103ed015281816106240152818161106901528181611b1101528181611b630152611def015260a05181818161023001528181610f9701528181611e280152818161297b0152612bd0015260c05181818161035001528181611e64015281816123a501526124cb0152f35b636a5db6d560e11b60005260046000fd5b5080516001600160a01b03163014610195565b5083516001600160a01b0316301461018e565b5081516001600160a01b03163014610187565b5163be676d1960e01b60009081526001600160a01b03909116600452602490fd5b508051610334906001600160a01b03166104bb565b1561016f565b610344915061047a565b1538610168565b835163be676d1960e01b60009081526001600160a01b03909116600452602490fd5b61037791506104bb565b153861014e565b505163be676d1960e01b60009081526001600160a01b03909116600452602490fd5b6103aa915061047a565b1538610134565b825163be676d1960e01b60009081526001600160a01b03909116600452602490fd5b6103dd915061047a565b153861011a565b6303988b8160e61b60005260046000fd5b506001600160a01b038316156100f2565b506001600160a01b038216156100eb565b639b15e16f60e01b60005260046000fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761042857604052565b51906001600160a01b038216820361043e57565b610483816104f9565b90816104a9575b81610493575090565b6104a69150630e64dd2960e01b9061058a565b90565b90506104b481610558565b159061048a565b6104c4816104f9565b90816104e7575b816104d4575090565b6104a69150634a050aa160e11b9061058a565b90506104f281610558565b15906104cb565b6000602091604051838101906301ffc9a760e01b82526301ffc9a760e01b60248201526024815261052b604482610443565b5191617530fa6000513d8261054c575b5081610545575090565b9050151590565b6020111591503861053b565b6000602091604051838101906301ffc9a760e01b825263ffffffff60e01b60248201526024815261052b604482610443565b600090602092604051848101916301ffc9a760e01b835263ffffffff60e01b1660248201526024815261052b60448261044356fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714611e8b5750806306285c6914611dc257806306b859ef14611d0657806315b358e014611ca1578063181f5a7714611c425780631826b1e714611b8757806321df0da714611b36578063240028e814611ac55780632cab0fb614611a7c578063309292ac146115d257806339077537146115895780635cb80c5d14611409578063673a2a1f1461130457806379ba5097146112395780638926f54f146111ef5780638da5cb5b146111bb5780639a4575b914610efc5780639cb406c914610ec8578063a42a7b8b14610cc9578063aa86a75414610c84578063b794658014610b99578063db4c2aef146108e9578063ea6396db14610804578063f2fde38b146107325763fbc801a71461013257600080fd5b3461072d57606060031936011261072d5760043567ffffffffffffffff811161072d5760a0600319823603011261072d5761016b611fba565b6044359167ffffffffffffffff831161072d573660238401121561072d578260040135610197816121a1565b936101a56040519586612160565b818552366024838301011161072d578160009260246020930183880137850101526101ce612e2a565b5060248101916101dd836126f7565b67ffffffffffffffff604051917fa8d87a3b00000000000000000000000000000000000000000000000000000000835216600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104ef5760009161070e575b5073ffffffffffffffffffffffffffffffffffffffff339116036106e05767ffffffffffffffff610291846126f7565b16600052600260205260ff6040600020541660058110156106b157801561067e57600090600481036105ac57505073ffffffffffffffffffffffffffffffffffffffff6005541692831561056c576102e8816126f7565b9067ffffffffffffffff604051927f958021a70000000000000000000000000000000000000000000000000000000084521660048301526040602483015260208280610337604482018a6121fe565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9182156104ef5760009261053b575b5073ffffffffffffffffffffffffffffffffffffffff8216156104fb5750600073ffffffffffffffffffffffffffffffffffffffff8461046a8397956104116104529660647fffffffff000000000000000000000000000000000000000000000000000000009a0135907f00000000000000000000000000000000000000000000000000000000000000006133d0565b604051998a98899788957ffbc801a7000000000000000000000000000000000000000000000000000000008752606060048801526064870190600401612f12565b921660248501526003198483030160448501526121fe565b0393165af180156104ef5760009081906104a2575b6104989250604051928392604084526040840190612272565b9060208301520390f35b50903d8083833e6104b38183612160565b8101916040828403126104ec5781519067ffffffffffffffff82116104ec57506104e4610498936020928401612eb1565b91015161047f565b80fd5b6040513d6000823e3d90fd5b61050d67ffffffffffffffff916126f7565b7fe86656fb000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b61055e91925060203d602011610565575b6105568183612160565b810190612e43565b9038610381565b503d61054c565b61057e67ffffffffffffffff916126f7565b7f28c4f25e000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b6003810361064d57505073ffffffffffffffffffffffffffffffffffffffff6006541692831561056c575091610452600073ffffffffffffffffffffffffffffffffffffffff8461046a839761064860647fffffffff00000000000000000000000000000000000000000000000000000000990135887f00000000000000000000000000000000000000000000000000000000000000006133d0565b610411565b9061067c6024927f31603b1200000000000000000000000000000000000000000000000000000000835261229f565bfd5b6106ab907f31603b120000000000000000000000000000000000000000000000000000000060005261229f565b60246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f728fe07b000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b610727915060203d602011610565576105568183612160565b38610261565b600080fd5b3461072d57602060031936011261072d5773ffffffffffffffffffffffffffffffffffffffff610760611fe9565b610768613201565b163381146107da57807fffffffffffffffffffffffff0000000000000000000000000000000000000000600054161760005573ffffffffffffffffffffffffffffffffffffffff600154167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278600080a3005b7fdad89dca0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461072d57608060031936011261072d5761081d611fe9565b610825612050565b90604435917fffffffff000000000000000000000000000000000000000000000000000000008316830361072d576064359167ffffffffffffffff831161072d5760e09361087a610882943690600401612093565b939092612f9f565b60c06040519163ffffffff815116835263ffffffff602082015116602084015263ffffffff604082015116604084015263ffffffff606082015116606084015261ffff608082015116608084015261ffff60a08201511660a08401520151151560c0820152f35b3461072d57604060031936011261072d5760043567ffffffffffffffff811161072d5761091a903690600401612241565b9060243567ffffffffffffffff811161072d5761093b903690600401612241565b610946929192613201565b808403610b6f5760005b84811061095957005b610964818386612f8f565b35600581101561072d5767ffffffffffffffff61098a610985848988612f8f565b6126f7565b16600052600260205260406000206000907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055506003811480610b4f575b610ac25760006001821480610b2f575b610a5957506002811480610b0f575b610ac25760006004821480610aa2575b610a595750906001917f2e89b8ad2616113d66baef8b897282a99a93ee74fc684282392d6a725bc94471602067ffffffffffffffff610a43610985868c8b612f8f565b1692610a5260405180926122bb565ba201610950565b61067c60449267ffffffffffffffff610a76610985878c8b612f8f565b7f87d77d33000000000000000000000000000000000000000000000000000000008552166004526122ad565b5073ffffffffffffffffffffffffffffffffffffffff6005541615610a00565b67ffffffffffffffff610adc610985610b09948988612f8f565b7f87d77d3300000000000000000000000000000000000000000000000000000000600052166004526122ad565b60446000fd5b5073ffffffffffffffffffffffffffffffffffffffff60045416156109f0565b5073ffffffffffffffffffffffffffffffffffffffff60035416156109e1565b5073ffffffffffffffffffffffffffffffffffffffff60065416156109d1565b7f568efce20000000000000000000000000000000000000000000000000000000060005260046000fd5b3461072d57602060031936011261072d57610bb2612067565b600067ffffffffffffffff6024610bc88461324c565b509373ffffffffffffffffffffffffffffffffffffffff60405195869485937fb7946580000000000000000000000000000000000000000000000000000000008552166004840152165afa80156104ef57600090610c3d575b610c39906040519182916020835260208301906121fe565b0390f35b3d8082843e610c4c8184612160565b820191602081840312610c805780519167ffffffffffffffff83116104ec575091610c7b91610c399301612e6f565b610c21565b5080fd5b3461072d57602060031936011261072d5767ffffffffffffffff610ca6612067565b166000526002602052602060ff60406000205416610cc760405180926122bb565bf35b3461072d57602060031936011261072d57610ce2612067565b600067ffffffffffffffff6024610cf88461324c565b509373ffffffffffffffffffffffffffffffffffffffff60405195869485937fa42a7b8b000000000000000000000000000000000000000000000000000000008552166004840152165afa9081156104ef57600091610dd6575b506040518091602082016020835281518091526040830190602060408260051b8601019301916000905b828210610d8b57505050500390f35b91936020610dc6827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0600195979984950301865288516121fe565b9601920192018594939192610d7c565b3d8083833e610de58183612160565b810190602081830312610ec45780519067ffffffffffffffff8211610e93570181601f82011215610ec45780519267ffffffffffffffff8411610e97578360051b906020820194610e396040519687612160565b855260208086019284010192848411610c805760208101925b848410610e655750505050505081610d52565b835167ffffffffffffffff8111610e9357602091610e8888848094870101612e6f565b815201930192610e52565b8380fd5b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b8280fd5b3461072d57600060031936011261072d57602073ffffffffffffffffffffffffffffffffffffffff60075416604051908152f35b3461072d57602060031936011261072d5760043567ffffffffffffffff811161072d5760a0600319823603011261072d57610f35612e2a565b506024810190610f44826126f7565b67ffffffffffffffff604051917fa8d87a3b00000000000000000000000000000000000000000000000000000000835216600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104ef5760009161119c575b5073ffffffffffffffffffffffffffffffffffffffff339116036106e05767ffffffffffffffff610ff8836126f7565b16600052600260205260ff6040600020541660058110156106b1576002810361114c575073ffffffffffffffffffffffffffffffffffffffff60045416905b73ffffffffffffffffffffffffffffffffffffffff821691821561113a576000928261108d6110cd93606487960135907f00000000000000000000000000000000000000000000000000000000000000006133d0565b6040519485809481937f9a4575b9000000000000000000000000000000000000000000000000000000008352602060048401526024830190600401612f12565b03925af180156104ef576000906110f7575b610c3990604051918291602083526020830190612272565b3d8082843e6111068184612160565b820191602081840312610c805780519167ffffffffffffffff83116104ec57509161113591610c399301612eb1565b6110df565b67ffffffffffffffff61057e856126f7565b60018103611174575073ffffffffffffffffffffffffffffffffffffffff6003541690611037565b6003810361067e575073ffffffffffffffffffffffffffffffffffffffff6006541690611037565b6111b5915060203d602011610565576105568183612160565b83610fc8565b3461072d57600060031936011261072d57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461072d57602060031936011261072d5767ffffffffffffffff611211612067565b16600052600260205260ff6040600020541660058110156106b1576020906040519015158152f35b3461072d57600060031936011261072d5760005473ffffffffffffffffffffffffffffffffffffffff811633036112da577fffffffffffffffffffffffff00000000000000000000000000000000000000006001549133828416176001551660005573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b7f02b543c60000000000000000000000000000000000000000000000000000000060005260046000fd5b3461072d57600060031936011261072d5760006060604051611325816120c1565b8281528260208201528260408201520152610c3973ffffffffffffffffffffffffffffffffffffffff6003541673ffffffffffffffffffffffffffffffffffffffff6004541673ffffffffffffffffffffffffffffffffffffffff6005541673ffffffffffffffffffffffffffffffffffffffff6006541691604051936113ab856120c1565b845260208401526040830152606082015260405191829182919091606073ffffffffffffffffffffffffffffffffffffffff816080840195828151168552826020820151166020860152826040820151166040860152015116910152565b3461072d57602060031936011261072d5760043567ffffffffffffffff811161072d5761143a903690600401612241565b9073ffffffffffffffffffffffffffffffffffffffff6007541691821561155f5760005b81811061146757005b611472818385612f8f565b3573ffffffffffffffffffffffffffffffffffffffff811680910361072d576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152602081602481855afa80156104ef57869160009161152a575b50908160019493926114ec575b5050500161145e565b60208161151b7f508d7d183612c18fc339b42618912b9fa3239f631dd7ec0671f950200a0fa66e9385876133d0565b604051908152a38585816114e3565b91506020823d8211611557575b8161154460209383612160565b810103126104ec575051859060016114d6565b3d9150611537565b7f8579befe0000000000000000000000000000000000000000000000000000000060005260046000fd5b3461072d57602060031936011261072d5760043567ffffffffffffffff811161072d57610100600319823603011261072d576115c9602091600401612b96565b60405190518152f35b3461072d57608060031936011261072d576115eb613201565b6040516115f7816120c1565b6115ff611fe9565b908181526024359073ffffffffffffffffffffffffffffffffffffffff8216820361072d576020810191825260443573ffffffffffffffffffffffffffffffffffffffff8116810361072d576040820190815273ffffffffffffffffffffffffffffffffffffffff61166f61200c565b9460608401958652168015159081611a6b575b50611a265773ffffffffffffffffffffffffffffffffffffffff8351168015159081611a15575b506119d05773ffffffffffffffffffffffffffffffffffffffff81511680151590816119bf575b5061197a5773ffffffffffffffffffffffffffffffffffffffff8451168015159081611969575b5080611942575b6118fd5773ffffffffffffffffffffffffffffffffffffffff825116301480156118dd575b80156118bd575b801561189d575b611873577f67d92722109d4170cee5a282ae6387dbf3fba5c7783912975743d4e51ab25aa89373ffffffffffffffffffffffffffffffffffffffff80928161186e96818751167fffffffffffffffffffffffff0000000000000000000000000000000000000000600354161760035551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600454161760045551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600554161760055551167fffffffffffffffffffffffff0000000000000000000000000000000000000000600654161760065560405191829182919091606073ffffffffffffffffffffffffffffffffffffffff816080840195828151168552826020820151166020860152826040820151166040860152015116910152565b0390a1005b7fd4bb6daa0000000000000000000000000000000000000000000000000000000060005260046000fd5b503073ffffffffffffffffffffffffffffffffffffffff85511614611731565b503073ffffffffffffffffffffffffffffffffffffffff8251161461172a565b503073ffffffffffffffffffffffffffffffffffffffff84511614611723565b73ffffffffffffffffffffffffffffffffffffffff8451167fbe676d190000000000000000000000000000000000000000000000000000000060005260045260246000fd5b5061196373ffffffffffffffffffffffffffffffffffffffff85511661350a565b156116fe565b61197391506134b3565b15856116f7565b73ffffffffffffffffffffffffffffffffffffffff9051167fbe676d190000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6119c9915061350a565b15856116d0565b73ffffffffffffffffffffffffffffffffffffffff8351167fbe676d190000000000000000000000000000000000000000000000000000000060005260045260246000fd5b611a1f91506134b3565b15856116a9565b73ffffffffffffffffffffffffffffffffffffffff8251167fbe676d190000000000000000000000000000000000000000000000000000000060005260045260246000fd5b611a7591506134b3565b1585611682565b3461072d57604060031936011261072d5760043567ffffffffffffffff811161072d57610100600319823603011261072d576115c9602091611abc611fba565b906004016128f7565b3461072d57602060031936011261072d576020611ae0611fe9565b73ffffffffffffffffffffffffffffffffffffffff604051911673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148152f35b3461072d57600060031936011261072d57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461072d5760c060031936011261072d57611ba0611fe9565b611ba8612050565b611bb061200c565b608435907fffffffff000000000000000000000000000000000000000000000000000000008216820361072d5760a43567ffffffffffffffff811161072d5760a09463ffffffff94859461ffff94611c0f611c1b953690600401612093565b94909360443591612560565b95926040979194975197885216602087015216604085015216606083015215156080820152f35b3461072d57600060031936011261072d57610c396040805190611c658183612160565b601882527f55534443546f6b656e506f6f6c50726f787920322e302e3000000000000000006020830152519182916020835260208301906121fe565b3461072d57602060031936011261072d5773ffffffffffffffffffffffffffffffffffffffff611ccf611fe9565b611cd7613201565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006007541617600755600080f35b3461072d5760c060031936011261072d57611d1f611fe9565b50611d28612050565b611d30611f8b565b5060843567ffffffffffffffff811161072d57611d51903690600401612093565b60a43591600283101561072d57611d6793612304565b60405180916020820160208352815180915260206040840192019060005b818110611d93575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611d85565b3461072d57600060031936011261072d57606060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602082015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166040820152f35b3461072d57602060031936011261072d57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361072d57817f940a15420000000000000000000000000000000000000000000000000000000060209314908115611f61575b8115611f37575b8115611f0d575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483611f06565b7faff2afbf0000000000000000000000000000000000000000000000000000000081149150611eff565b7f0e64dd290000000000000000000000000000000000000000000000000000000081149150611ef8565b606435907fffffffff000000000000000000000000000000000000000000000000000000008216820361072d57565b602435907fffffffff000000000000000000000000000000000000000000000000000000008216820361072d57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361072d57565b6064359073ffffffffffffffffffffffffffffffffffffffff8216820361072d57565b359073ffffffffffffffffffffffffffffffffffffffff8216820361072d57565b6024359067ffffffffffffffff8216820361072d57565b6004359067ffffffffffffffff8216820361072d57565b359067ffffffffffffffff8216820361072d57565b9181601f8401121561072d5782359167ffffffffffffffff831161072d576020838186019501011161072d57565b6080810190811067ffffffffffffffff8211176120dd57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176120dd57604052565b6040810190811067ffffffffffffffff8211176120dd57604052565b60e0810190811067ffffffffffffffff8211176120dd57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176120dd57604052565b67ffffffffffffffff81116120dd57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b8381106121ee5750506000910152565b81810151838201526020016121de565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361223a815180928187528780880191016121db565b0116010190565b9181601f8401121561072d5782359167ffffffffffffffff831161072d576020808501948460051b01011161072d57565b61229c91602061228b83516040845260408401906121fe565b9201519060208184039101526121fe565b90565b60058110156106b157600452565b60058110156106b157602452565b9060058210156106b15752565b8051156122d55760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff90929192169081600052600260205260ff60406000205416926040947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08651966123578189612160565b600188520136602088013760028110156106b1576001146123ff57505060058210156106b15781156123d2575060041461238e5790565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166123ce826122c8565b5290565b7f28c4f25e0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b7fffffffff00000000000000000000000000000000000000000000000000000000935061242f9250949394613156565b16917f3047587c0000000000000000000000000000000000000000000000000000000083146124b1577ffa7c07de0000000000000000000000000000000000000000000000000000000083146124ad57827fcacdaf2b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b9150565b90915073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166123ce826122c8565b519063ffffffff8216820361072d57565b519061ffff8216820361072d57565b5190811515820361072d57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b93909591949261256f8761324c565b9690966125be5767ffffffffffffffff881660005260026020526106ab60ff604060002054167f31603b120000000000000000000000000000000000000000000000000000000060005261229f565b6040517f1826b1e700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff968716600482015267ffffffffffffffff9890981660248901526044880152841660648701527fffffffff0000000000000000000000000000000000000000000000000000000016608486015260c060a486015260a09385939092849283916126669160c4840191612521565b0392165afa9081156104ef5760009182938380938193612689575b509493929190565b9450925093505060a0823d60a0116126ef575b816126a960a09383612160565b810103126104ec575080516126c0602083016124f4565b6126cc604084016124f4565b936126e560806126de60608701612505565b9501612514565b9194939238612681565b3d915061269c565b3567ffffffffffffffff8116810361072d5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561072d570180359067ffffffffffffffff821161072d5760200191813603831361072d57565b9081602091031261072d57604051906127758261210c565b51815290565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561072d57016020813591019167ffffffffffffffff821161072d57813603831361072d57565b61229c916128a961289e6128836127f56127e5868061277b565b6101008752610100870191612521565b67ffffffffffffffff61280a6020880161207e565b16602086015273ffffffffffffffffffffffffffffffffffffffff6128316040880161202f565b1660408601526060860135606086015273ffffffffffffffffffffffffffffffffffffffff6128626080880161202f565b16608086015261287560a087018761277b565b9086830360a0880152612521565b61289060c086018661277b565b9085830360c0870152612521565b9260e081019061277b565b9160e0818503910152612521565b907fffffffff000000000000000000000000000000000000000000000000000000006128f06020929594956040855260408501906127cb565b9416910152565b91906040516129058161210c565b6000905261296260206129198582016126f7565b6040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015233602482015291829081906044820190565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104ef57600091612b5c575b50156106e0577fffffffff000000000000000000000000000000000000000000000000000000006129e96129e360c086018661270c565b90613156565b16927ffa7c07de000000000000000000000000000000000000000000000000000000008414612b01577f3047587c000000000000000000000000000000000000000000000000000000008414612a6757837fcacdaf2b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b612ac29293509060209173ffffffffffffffffffffffffffffffffffffffff600554169060006040518096819582947f2cab0fb6000000000000000000000000000000000000000000000000000000008452600484016128b7565b03925af19081156104ef57600091612ad8575090565b61229c915060203d602011612afa575b612af28183612160565b81019061275d565b503d612ae8565b612ac29293509060209173ffffffffffffffffffffffffffffffffffffffff600654169060006040518096819582947f2cab0fb6000000000000000000000000000000000000000000000000000000008452600484016128b7565b90506020813d602011612b8e575b81612b7760209383612160565b8101031261072d57612b8890612514565b386129ac565b3d9150612b6a565b90604051612ba38161210c565b60009052612bb760206129198482016126f7565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104ef57600091612df0575b50156106e05760c08201917fffffffff00000000000000000000000000000000000000000000000000000000612c3a6129e3858461270c565b16927ffa7c07de000000000000000000000000000000000000000000000000000000008414612d8e577fb148ea5f000000000000000000000000000000000000000000000000000000008414612d2c57612c966040918361270c565b905014612ccb57827fcacdaf2b0000000000000000000000000000000000000000000000000000000060005260045260246000fd5b6000919250612ac260209173ffffffffffffffffffffffffffffffffffffffff60035416906040519485809481937f3907753700000000000000000000000000000000000000000000000000000000835287600484015260248301906127cb565b506000919250612ac260209173ffffffffffffffffffffffffffffffffffffffff60045416906040519485809481937f3907753700000000000000000000000000000000000000000000000000000000835287600484015260248301906127cb565b506000919250612ac260209173ffffffffffffffffffffffffffffffffffffffff60065416906040519485809481937f3907753700000000000000000000000000000000000000000000000000000000835287600484015260248301906127cb565b90506020813d602011612e22575b81612e0b60209383612160565b8101031261072d57612e1c90612514565b38612c01565b3d9150612dfe565b60405190612e3782612128565b60606020838281520152565b9081602091031261072d575173ffffffffffffffffffffffffffffffffffffffff8116810361072d5790565b81601f8201121561072d578051612e85816121a1565b92612e936040519485612160565b8184526020828401011161072d5761229c91602080850191016121db565b919060408382031261072d5760405190612eca82612128565b8193805167ffffffffffffffff811161072d5782612ee9918301612e6f565b835260208101519167ffffffffffffffff831161072d57602092612f0d9201612e6f565b910152565b90608073ffffffffffffffffffffffffffffffffffffffff612f8882612f49612f3b878061277b565b60a0885260a0880191612521565b9567ffffffffffffffff612f5f6020830161207e565b16602087015283612f726040830161202f565b166040870152606081013560608701520161202f565b1691015290565b91908110156122d55760051b0190565b9392919091604051612fb081612144565b6000815260006020820152600060408201526000606082015260006080820152600060a0820152600060c082015293612fe88461324c565b939093612ff9575050505050905090565b60e095509561309473ffffffffffffffffffffffffffffffffffffffff9384937fffffffff0000000000000000000000000000000000000000000000000000000067ffffffffffffffff9a6040519b8c9a8b998a987fea6396db000000000000000000000000000000000000000000000000000000008a52166004890152166024870152166044850152608060648501526084840191612521565b0392165afa9081156104ef576000916130ab575090565b905060e0813d60e01161314e575b816130c660e09383612160565b8101031261072d5761314660c0604051926130e084612144565b6130e9816124f4565b84526130f7602082016124f4565b6020850152613108604082016124f4565b6040850152613119606082016124f4565b606085015261312a60808201612505565b608085015261313b60a08201612505565b60a085015201612514565b60c082015290565b3d91506130b9565b90600481108061318e575060041161072d57357fffffffff000000000000000000000000000000000000000000000000000000001690565b907fffffffff00000000000000000000000000000000000000000000000000000000923590838216926131ec575b50507fcacdaf2b000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b839250829060040360031b1b161682806131bc565b73ffffffffffffffffffffffffffffffffffffffff60015416330361322257565b7f2b5c74de0000000000000000000000000000000000000000000000000000000060005260046000fd5b90600067ffffffffffffffff600093169283600052600260205260ff604060002054169160058310156106b15782156133a3576000600484036132fd5750505073ffffffffffffffffffffffffffffffffffffffff60055416906001935b73ffffffffffffffffffffffffffffffffffffffff8316156132cc5750509190565b610b0992507f87d77d33000000000000000000000000000000000000000000000000000000006000526004526122ad565b50909391906002820361332b575073ffffffffffffffffffffffffffffffffffffffff60045416915b6132aa565b60006001830361335657505073ffffffffffffffffffffffffffffffffffffffff60035416916132aa565b50917ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd8201613326576006546001955073ffffffffffffffffffffffffffffffffffffffff1692506132aa565b6106ab837f31603b120000000000000000000000000000000000000000000000000000000060005261229f565b916020916000916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb000000000000000000000000000000000000000000000000000000008552166024830152604482015260448152613431606482612160565b519082855af1156104ef576000513d6134aa575073ffffffffffffffffffffffffffffffffffffffff81163b155b6134665750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000006000521660045260246000fd5b6001141561345f565b6134bc81613561565b90816134f8575b816134cc575090565b61229c91507f0e64dd290000000000000000000000000000000000000000000000000000000090613656565b9050613503816135f2565b15906134c3565b61351381613561565b908161354f575b81613523575090565b61229c91507f940a15420000000000000000000000000000000000000000000000000000000090613656565b905061355a816135f2565b159061351a565b6000602091604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527f01ffc9a7000000000000000000000000000000000000000000000000000000006024820152602481526135c5604482612160565b5191617530fa6000513d826135e6575b50816135df575090565b9050151590565b602011159150386135d5565b6000602091604051838101907f01ffc9a70000000000000000000000000000000000000000000000000000000082527fffffffff000000000000000000000000000000000000000000000000000000006024820152602481526135c5604482612160565b6000906020926040517fffffffff00000000000000000000000000000000000000000000000000000000858201927f01ffc9a7000000000000000000000000000000000000000000000000000000008452166024820152602481526135c560448261216056fea164736f6c634300081a000a" - -type USDCTokenPoolProxyContract struct { - address common.Address - abi abi.ABI - backend bind.ContractBackend - contract *bind.BoundContract -} - -func NewUSDCTokenPoolProxyContract( - address common.Address, - backend bind.ContractBackend, -) (*USDCTokenPoolProxyContract, error) { - parsed, err := abi.JSON(strings.NewReader(USDCTokenPoolProxyABI)) - if err != nil { - return nil, err - } - return &USDCTokenPoolProxyContract{ - address: address, - abi: parsed, - backend: backend, - contract: bind.NewBoundContract(address, parsed, backend, backend, backend), - }, nil -} - -func (c *USDCTokenPoolProxyContract) Address() common.Address { - return c.address -} - -func (c *USDCTokenPoolProxyContract) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []any - err := c.contract.Call(opts, &out, "owner") - if err != nil { - return common.Address{}, err - } - return *abi.ConvertType(out[0], new(common.Address)).(*common.Address), nil -} - -func (c *USDCTokenPoolProxyContract) GetPools(opts *bind.CallOpts) (PoolAddresses, error) { - var out []any - err := c.contract.Call(opts, &out, "getPools") - if err != nil { - var zero PoolAddresses - return zero, err - } - return *abi.ConvertType(out[0], new(PoolAddresses)).(*PoolAddresses), nil -} - -func (c *USDCTokenPoolProxyContract) GetLockOrBurnMechanism(opts *bind.CallOpts, args uint64) (uint8, error) { - var out []any - err := c.contract.Call(opts, &out, "getLockOrBurnMechanism", args) - if err != nil { - var zero uint8 - return zero, err - } - return *abi.ConvertType(out[0], new(uint8)).(*uint8), nil -} - -func (c *USDCTokenPoolProxyContract) UpdateLockOrBurnMechanisms(opts *bind.TransactOpts, remoteChainSelectors []uint64, mechanisms []uint8) (*types.Transaction, error) { - return c.contract.Transact(opts, "updateLockOrBurnMechanisms", remoteChainSelectors, mechanisms) -} - -func (c *USDCTokenPoolProxyContract) UpdatePoolAddresses(opts *bind.TransactOpts, args PoolAddresses) (*types.Transaction, error) { - return c.contract.Transact(opts, "updatePoolAddresses", args) -} - -func (c *USDCTokenPoolProxyContract) SetFeeAggregator(opts *bind.TransactOpts, args common.Address) (*types.Transaction, error) { - return c.contract.Transact(opts, "setFeeAggregator", args) -} - -type PoolAddresses struct { - CctpV1Pool common.Address - CctpV2Pool common.Address - CctpV2PoolWithCCV common.Address - SiloedLockReleasePool common.Address -} - type UpdateLockOrBurnMechanismsArgs struct { - RemoteChainSelectors []uint64 - Mechanisms []uint8 + RemoteChainSelectors []uint64 `json:"remoteChainSelectors"` + Mechanisms []uint8 `json:"mechanisms"` } type ConstructorArgs struct { - Token common.Address - Pools PoolAddresses - Router common.Address - CctpVerifier common.Address + Token common.Address `json:"token"` + Pools gobindings.USDCTokenPoolProxyPoolAddresses `json:"pools"` + Router common.Address `json:"router"` + CctpVerifier common.Address `json:"cctpVerifier"` } var Deploy = contract.NewDeploy(contract.DeployParams[ConstructorArgs]{ - Name: "usdc-token-pool-proxy:deploy", - Version: Version, - Description: "Deploys the USDCTokenPoolProxy contract", - ContractMetadata: &bind.MetaData{ - ABI: USDCTokenPoolProxyABI, - Bin: USDCTokenPoolProxyBin, - }, + Name: "usdc-token-pool-proxy:deploy", + Version: Version, + Description: "Deploys the USDCTokenPoolProxy contract", + ContractMetadata: gobindings.USDCTokenPoolProxyMetaData, BytecodeByTypeAndVersion: map[string]contract.Bytecode{ cldf_deployment.NewTypeAndVersion(ContractType, *Version).String(): { - EVM: common.FromHex(USDCTokenPoolProxyBin), + EVM: common.FromHex(gobindings.USDCTokenPoolProxyMetaData.Bin), }, }, - Validate: func(ConstructorArgs) error { return nil }, }) -var GetPools = contract.NewRead(contract.ReadParams[struct{}, PoolAddresses, *USDCTokenPoolProxyContract]{ - Name: "usdc-token-pool-proxy:get-pools", - Version: Version, - Description: "Calls getPools on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolProxyContract, - CallContract: func(c *USDCTokenPoolProxyContract, opts *bind.CallOpts, args struct{}) (PoolAddresses, error) { - return c.GetPools(opts) - }, -}) +func NewReadGetPools(c gobindings.USDCTokenPoolProxyInterface) *cld_ops.Operation[contract.FunctionInput[struct{}], gobindings.USDCTokenPoolProxyPoolAddresses, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[struct{}, gobindings.USDCTokenPoolProxyPoolAddresses, gobindings.USDCTokenPoolProxyInterface]{ + Name: "usdc-token-pool-proxy:get-pools", + Version: Version, + Description: "Calls getPools on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolProxyInterface, opts *bind.CallOpts, args struct{}) (gobindings.USDCTokenPoolProxyPoolAddresses, error) { + return c.GetPools(opts) + }, + }) +} -var GetLockOrBurnMechanism = contract.NewRead(contract.ReadParams[uint64, uint8, *USDCTokenPoolProxyContract]{ - Name: "usdc-token-pool-proxy:get-lock-or-burn-mechanism", - Version: Version, - Description: "Calls getLockOrBurnMechanism on the contract", - ContractType: ContractType, - NewContract: NewUSDCTokenPoolProxyContract, - CallContract: func(c *USDCTokenPoolProxyContract, opts *bind.CallOpts, args uint64) (uint8, error) { - return c.GetLockOrBurnMechanism(opts, args) - }, -}) +func NewReadGetLockOrBurnMechanism(c gobindings.USDCTokenPoolProxyInterface) *cld_ops.Operation[contract.FunctionInput[uint64], uint8, cldf_evm.Chain] { + return contract.NewRead(contract.ReadParams[uint64, uint8, gobindings.USDCTokenPoolProxyInterface]{ + Name: "usdc-token-pool-proxy:get-lock-or-burn-mechanism", + Version: Version, + Description: "Calls getLockOrBurnMechanism on the contract", + ContractType: ContractType, + Contract: c, + CallContract: func(c gobindings.USDCTokenPoolProxyInterface, opts *bind.CallOpts, args uint64) (uint8, error) { + return c.GetLockOrBurnMechanism(opts, args) + }, + }) +} -var UpdateLockOrBurnMechanisms = contract.NewWrite(contract.WriteParams[UpdateLockOrBurnMechanismsArgs, *USDCTokenPoolProxyContract]{ - Name: "usdc-token-pool-proxy:update-lock-or-burn-mechanisms", - Version: Version, - Description: "Calls updateLockOrBurnMechanisms on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolProxyABI, - NewContract: NewUSDCTokenPoolProxyContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolProxyContract, UpdateLockOrBurnMechanismsArgs], - Validate: func(UpdateLockOrBurnMechanismsArgs) error { return nil }, - CallContract: func( - c *USDCTokenPoolProxyContract, - opts *bind.TransactOpts, - args UpdateLockOrBurnMechanismsArgs, - ) (*types.Transaction, error) { - return c.UpdateLockOrBurnMechanisms(opts, args.RemoteChainSelectors, args.Mechanisms) - }, -}) +func NewWriteUpdateLockOrBurnMechanisms(c gobindings.USDCTokenPoolProxyInterface) *cld_ops.Operation[contract.FunctionInput[UpdateLockOrBurnMechanismsArgs], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[UpdateLockOrBurnMechanismsArgs, gobindings.USDCTokenPoolProxyInterface]{ + Name: "usdc-token-pool-proxy:update-lock-or-burn-mechanisms", + Version: Version, + Description: "Calls updateLockOrBurnMechanisms on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolProxyInterface, opts *bind.CallOpts, caller common.Address, args UpdateLockOrBurnMechanismsArgs) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolProxyInterface, + opts *bind.TransactOpts, + args UpdateLockOrBurnMechanismsArgs, + ) (*types.Transaction, error) { + return c.UpdateLockOrBurnMechanisms(opts, args.RemoteChainSelectors, args.Mechanisms) + }, + }) +} -var UpdatePoolAddresses = contract.NewWrite(contract.WriteParams[PoolAddresses, *USDCTokenPoolProxyContract]{ - Name: "usdc-token-pool-proxy:update-pool-addresses", - Version: Version, - Description: "Calls updatePoolAddresses on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolProxyABI, - NewContract: NewUSDCTokenPoolProxyContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolProxyContract, PoolAddresses], - Validate: func(PoolAddresses) error { return nil }, - CallContract: func( - c *USDCTokenPoolProxyContract, - opts *bind.TransactOpts, - args PoolAddresses, - ) (*types.Transaction, error) { - return c.UpdatePoolAddresses(opts, args) - }, -}) +func NewWriteUpdatePoolAddresses(c gobindings.USDCTokenPoolProxyInterface) *cld_ops.Operation[contract.FunctionInput[gobindings.USDCTokenPoolProxyPoolAddresses], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[gobindings.USDCTokenPoolProxyPoolAddresses, gobindings.USDCTokenPoolProxyInterface]{ + Name: "usdc-token-pool-proxy:update-pool-addresses", + Version: Version, + Description: "Calls updatePoolAddresses on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolProxyInterface, opts *bind.CallOpts, caller common.Address, args gobindings.USDCTokenPoolProxyPoolAddresses) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolProxyInterface, + opts *bind.TransactOpts, + args gobindings.USDCTokenPoolProxyPoolAddresses, + ) (*types.Transaction, error) { + return c.UpdatePoolAddresses(opts, args) + }, + }) +} -var SetFeeAggregator = contract.NewWrite(contract.WriteParams[common.Address, *USDCTokenPoolProxyContract]{ - Name: "usdc-token-pool-proxy:set-fee-aggregator", - Version: Version, - Description: "Calls setFeeAggregator on the contract", - ContractType: ContractType, - ContractABI: USDCTokenPoolProxyABI, - NewContract: NewUSDCTokenPoolProxyContract, - IsAllowedCaller: contract.OnlyOwner[*USDCTokenPoolProxyContract, common.Address], - Validate: func(common.Address) error { return nil }, - CallContract: func( - c *USDCTokenPoolProxyContract, - opts *bind.TransactOpts, - args common.Address, - ) (*types.Transaction, error) { - return c.SetFeeAggregator(opts, args) - }, -}) +func NewWriteSetFeeAggregator(c gobindings.USDCTokenPoolProxyInterface) *cld_ops.Operation[contract.FunctionInput[common.Address], contract.WriteOutput, cldf_evm.Chain] { + return contract.NewWrite(contract.WriteParams[common.Address, gobindings.USDCTokenPoolProxyInterface]{ + Name: "usdc-token-pool-proxy:set-fee-aggregator", + Version: Version, + Description: "Calls setFeeAggregator on the contract", + ContractType: ContractType, + ContractABI: gobindings.USDCTokenPoolProxyMetaData.ABI, + Contract: c, + IsAllowedCaller: func(c gobindings.USDCTokenPoolProxyInterface, opts *bind.CallOpts, caller common.Address, args common.Address) (bool, error) { + return contract.OnlyOwner(c, opts, caller, args) + }, + CallContract: func( + c gobindings.USDCTokenPoolProxyInterface, + opts *bind.TransactOpts, + args common.Address, + ) (*types.Transaction, error) { + return c.SetFeeAggregator(opts, args) + }, + }) +} diff --git a/chains/evm/deployment/v2_0_0/sequences/cctp/configure_cctp_chain_for_lanes.go b/chains/evm/deployment/v2_0_0/sequences/cctp/configure_cctp_chain_for_lanes.go index c9560a8724..1432af4bcb 100644 --- a/chains/evm/deployment/v2_0_0/sequences/cctp/configure_cctp_chain_for_lanes.go +++ b/chains/evm/deployment/v2_0_0/sequences/cctp/configure_cctp_chain_for_lanes.go @@ -33,6 +33,11 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy" tokens_sequences "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences/tokens" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_verifier" + utppbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/usdc_token_pool_proxy" + utpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool" + utpv2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool_cctp_v2" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) const ( @@ -408,11 +413,11 @@ func addUSDCTokenPoolProxyAsRemotePoolOnLegacyPool( } localV162 := common.HexToAddress(refs[0].Address) - supportedChainsReport, err := cldf_ops.ExecuteOperation[contract_utils.FunctionInput[struct{}], []uint64, evm.Chain]( - b, evm_token_pool.GetSupportedChains, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: localV162, - }) + localPool, err := tokens_sequences.BindTokenPool(localV162, chain) + if err != nil { + return nil, err + } + supportedChainsReport, err := cldf_ops.ExecuteOperation(b, evm_token_pool.NewReadGetSupportedChains(localPool), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("getSupportedChains on USDCTokenPool v1.6.2 %s: %w", localV162.Hex(), err) } @@ -450,31 +455,29 @@ func maybeAddRemotePoolUSDCTokenPoolV162( remoteChainSelector uint64, remotePoolPadded []byte, ) (contract_utils.WriteOutput, error) { - poolsRep, err := cldf_ops.ExecuteOperation[contract_utils.FunctionInput[uint64], [][]byte, evm.Chain]( - b, evm_token_pool.GetRemotePools, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: localPool, - Args: remoteChainSelector, - }) + tp, err := tokens_sequences.BindTokenPool(localPool, chain) + if err != nil { + return contract_utils.WriteOutput{}, err + } + poolsRep, err := cldf_ops.ExecuteOperation(b, evm_token_pool.NewReadGetRemotePools(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, + }) if err != nil { return contract_utils.WriteOutput{}, fmt.Errorf("getRemotePools on USDCTokenPool v1.6.2 %s for remote %d: %w", localPool.Hex(), remoteChainSelector, err) } if slices.ContainsFunc(poolsRep.Output, func(p []byte) bool { return bytes.Equal(p, remotePoolPadded) }) { return contract_utils.WriteOutput{}, nil } - addRep, err := cldf_ops.ExecuteOperation[contract_utils.FunctionInput[usdc_token_pool.AddRemotePoolArgs], contract_utils.WriteOutput, evm.Chain]( - b, usdc_token_pool.AddRemotePool, chain, contract_utils.FunctionInput[usdc_token_pool.AddRemotePoolArgs]{ - ChainSelector: chainSelector, - Address: localPool, - Args: usdc_token_pool.AddRemotePoolArgs{ - RemoteChainSelector: remoteChainSelector, - RemotePoolAddress: remotePoolPadded, - }, - }) + addRep, err := cldf_ops.ExecuteOperation(b, evm_token_pool.NewWriteAddRemotePool(tp), chain, ops2contract.FunctionInput[evm_token_pool.AddRemotePoolArgs]{ + Args: evm_token_pool.AddRemotePoolArgs{ + RemoteChainSelector: remoteChainSelector, + RemotePoolAddress: remotePoolPadded, + }, + }) if err != nil { return contract_utils.WriteOutput{}, fmt.Errorf("addRemotePool on USDCTokenPool v1.6.2 %s for remote %d: %w", localPool.Hex(), remoteChainSelector, err) } - return addRep.Output, nil + return tokens_sequences.WriteOutputOps2ToLegacy(addRep.Output), nil } // buildRemoteChainConfigs builds the remote chain config map used by token pools and configure-token-for-transfers. @@ -549,9 +552,9 @@ func buildUSDCTokenPoolProxyMechanismArgs(input adapters.ConfigureCCTPChainForLa // buildCCTPVerifierArgs builds set-domain args and remote-chain-config args for the CCTPVerifier. // allowedCallerOnSource is the current chain's verifier (source chain when sending to remote). -func buildCCTPVerifierArgs(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput, routerAddress common.Address) ([]cctp_verifier.SetDomainArgs, []cctp_verifier.RemoteChainConfigArgs, error) { - setDomainArgs := make([]cctp_verifier.SetDomainArgs, 0) - remoteChainConfigArgs := make([]cctp_verifier.RemoteChainConfigArgs, 0) +func buildCCTPVerifierArgs(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput, routerAddress common.Address) ([]cvbind.CCTPVerifierSetDomainArgs, []cvbind.BaseVerifierRemoteChainConfigArgs, error) { + setDomainArgs := make([]cvbind.CCTPVerifierSetDomainArgs, 0) + remoteChainConfigArgs := make([]cvbind.BaseVerifierRemoteChainConfigArgs, 0) for remoteChainSelector, remoteChain := range input.RemoteChains { if dep.RemoteChains[remoteChainSelector].USDCType() == adapters.NonCanonical { // Non-canonical USDC chains do not support CCTP, so we don't need to perform any CCTP-specific operations. @@ -579,7 +582,7 @@ func buildCCTPVerifierArgs(dep adapters.ConfigureCCTPChainForLanesDeps, input ad copy(allowedCallerOnDestBytes32[32-len(allowedCallerOnDest):], allowedCallerOnDest) copy(allowedCallerOnSourceBytes32[32-len(allowedCallerOnSource):], allowedCallerOnSource) copy(mintRecipientOnDestBytes32[32-len(mintRecipientOnDest):], mintRecipientOnDest) - setDomainArgs = append(setDomainArgs, cctp_verifier.SetDomainArgs{ + setDomainArgs = append(setDomainArgs, cvbind.CCTPVerifierSetDomainArgs{ AllowedCallerOnDest: allowedCallerOnDestBytes32, AllowedCallerOnSource: allowedCallerOnSourceBytes32, MintRecipientOnDest: mintRecipientOnDestBytes32, @@ -587,7 +590,7 @@ func buildCCTPVerifierArgs(dep adapters.ConfigureCCTPChainForLanesDeps, input ad Enabled: true, ChainSelector: remoteChainSelector, }) - remoteChainConfigArgs = append(remoteChainConfigArgs, cctp_verifier.RemoteChainConfigArgs{ + remoteChainConfigArgs = append(remoteChainConfigArgs, cvbind.BaseVerifierRemoteChainConfigArgs{ Router: routerAddress, RemoteChainSelector: remoteChainSelector, FeeUSDCents: remoteChain.FeeUSDCents, @@ -599,8 +602,8 @@ func buildCCTPVerifierArgs(dep adapters.ConfigureCCTPChainForLanesDeps, input ad } // buildCCTPV2PoolDomainUpdates builds domain updates for the CCTP V2 token pool. -func buildCCTPV2PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput) ([]usdc_token_pool_cctp_v2.DomainUpdate, error) { - out := make([]usdc_token_pool_cctp_v2.DomainUpdate, 0) +func buildCCTPV2PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput) ([]utpv2bind.USDCTokenPoolDomainUpdate, error) { + out := make([]utpv2bind.USDCTokenPoolDomainUpdate, 0) for remoteChainSelector, remoteChain := range input.RemoteChains { if dep.RemoteChains[remoteChainSelector].USDCType() == adapters.NonCanonical { // Non-canonical USDC chains do not support CCTP, so we don't need to perform any CCTP-specific operations. @@ -622,7 +625,7 @@ func buildCCTPV2PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, i var allowedCallerBytes32, mintRecipientBytes32 [32]byte copy(allowedCallerBytes32[32-len(allowedCallerOnDest):], allowedCallerOnDest) copy(mintRecipientBytes32[32-len(mintRecipientOnDest):], mintRecipientOnDest) - out = append(out, usdc_token_pool_cctp_v2.DomainUpdate{ + out = append(out, utpv2bind.USDCTokenPoolDomainUpdate{ AllowedCaller: allowedCallerBytes32, MintRecipient: mintRecipientBytes32, DomainIdentifier: remoteChain.DomainIdentifier, @@ -635,8 +638,8 @@ func buildCCTPV2PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, i // buildCCTPV1PoolDomainUpdates builds domain updates for the CCTP V1 token pool. // Only chains configured with CCTP_V1 mechanism are included. -func buildCCTPV1PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput) ([]usdc_token_pool.DomainUpdate, error) { - out := make([]usdc_token_pool.DomainUpdate, 0) +func buildCCTPV1PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, input adapters.ConfigureCCTPChainForLanesInput) ([]utpbind.USDCTokenPoolDomainUpdate, error) { + out := make([]utpbind.USDCTokenPoolDomainUpdate, 0) for remoteChainSelector, remoteChain := range input.RemoteChains { if dep.RemoteChains[remoteChainSelector].USDCType() == adapters.NonCanonical { // Non-canonical USDC chains do not support CCTP, so we don't need to perform any CCTP-specific operations. @@ -658,7 +661,7 @@ func buildCCTPV1PoolDomainUpdates(dep adapters.ConfigureCCTPChainForLanesDeps, i var allowedCallerBytes32, mintRecipientBytes32 [32]byte copy(allowedCallerBytes32[32-len(allowedCallerOnDest):], allowedCallerOnDest) copy(mintRecipientBytes32[32-len(mintRecipientOnDest):], mintRecipientOnDest) - out = append(out, usdc_token_pool.DomainUpdate{ + out = append(out, utpbind.USDCTokenPoolDomainUpdate{ AllowedCaller: allowedCallerBytes32, MintRecipient: mintRecipientBytes32, DomainIdentifier: remoteChain.DomainIdentifier, @@ -710,10 +713,12 @@ func applyUSDCTokenPoolProxyMechanismWrites(b cldf_ops.Bundle, chain evm.Chain, toUpdateSelectors := make([]uint64, 0, len(remoteChainSelectors)) toUpdateMechanisms := make([]uint8, 0, len(mechanisms)) for i, sel := range remoteChainSelectors { - currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.GetLockOrBurnMechanism, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: proxyAddress, - Args: sel, + usdcProxy, err := utppbind.NewUSDCTokenPoolProxy(proxyAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPoolProxy at %s: %w", proxyAddress.Hex(), err) + } + currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.NewReadGetLockOrBurnMechanism(usdcProxy), chain, ops2contract.FunctionInput[uint64]{ + Args: sel, }) if err != nil { return nil, fmt.Errorf("failed to get lock or burn mechanism for remote chain %d: %w", sel, err) @@ -727,9 +732,11 @@ func applyUSDCTokenPoolProxyMechanismWrites(b cldf_ops.Bundle, chain evm.Chain, if len(toUpdateSelectors) == 0 { return nil, nil } - report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.UpdateLockOrBurnMechanisms, chain, contract_utils.FunctionInput[usdc_token_pool_proxy.UpdateLockOrBurnMechanismsArgs]{ - ChainSelector: chain.Selector, - Address: proxyAddress, + usdcProxy, err := utppbind.NewUSDCTokenPoolProxy(proxyAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPoolProxy at %s: %w", proxyAddress.Hex(), err) + } + report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.NewWriteUpdateLockOrBurnMechanisms(usdcProxy), chain, ops2contract.FunctionInput[usdc_token_pool_proxy.UpdateLockOrBurnMechanismsArgs]{ Args: usdc_token_pool_proxy.UpdateLockOrBurnMechanismsArgs{ RemoteChainSelectors: toUpdateSelectors, Mechanisms: toUpdateMechanisms, @@ -738,67 +745,68 @@ func applyUSDCTokenPoolProxyMechanismWrites(b cldf_ops.Bundle, chain evm.Chain, if err != nil { return nil, fmt.Errorf("failed to update lock or burn mechanisms on USDCTokenPoolProxy: %w", err) } - return []contract_utils.WriteOutput{report.Output}, nil + return []contract_utils.WriteOutput{tokens_sequences.WriteOutputOps2ToLegacy(report.Output)}, nil } // applyCCTPVerifierWrites applies remote chain config and set-domains on the CCTPVerifier. -func applyCCTPVerifierWrites(b cldf_ops.Bundle, chain evm.Chain, verifierAddress common.Address, setDomainArgs []cctp_verifier.SetDomainArgs, remoteChainConfigArgs []cctp_verifier.RemoteChainConfigArgs) ([]contract_utils.WriteOutput, error) { +func applyCCTPVerifierWrites(b cldf_ops.Bundle, chain evm.Chain, verifierAddress common.Address, setDomainArgs []cvbind.CCTPVerifierSetDomainArgs, remoteChainConfigArgs []cvbind.BaseVerifierRemoteChainConfigArgs) ([]contract_utils.WriteOutput, error) { + cv, err := cvbind.NewCCTPVerifier(verifierAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPVerifier at %s: %w", verifierAddress.Hex(), err) + } writes := make([]contract_utils.WriteOutput, 0) - remoteConfigReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.ApplyRemoteChainConfigUpdates, chain, contract_utils.FunctionInput[[]cctp_verifier.RemoteChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: verifierAddress, - Args: remoteChainConfigArgs, + remoteConfigReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.NewWriteApplyRemoteChainConfigUpdates(cv), chain, ops2contract.FunctionInput[[]cvbind.BaseVerifierRemoteChainConfigArgs]{ + Args: remoteChainConfigArgs, }) if err != nil { return nil, fmt.Errorf("failed to apply remote chain config updates on CCTPVerifier: %w", err) } - writes = append(writes, remoteConfigReport.Output) - domainsReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.SetDomains, chain, contract_utils.FunctionInput[[]cctp_verifier.SetDomainArgs]{ - ChainSelector: chain.Selector, - Address: verifierAddress, - Args: setDomainArgs, + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(remoteConfigReport.Output)) + domainsReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.NewWriteSetDomains(cv), chain, ops2contract.FunctionInput[[]cvbind.CCTPVerifierSetDomainArgs]{ + Args: setDomainArgs, }) if err != nil { return nil, fmt.Errorf("failed to set domains on CCTPVerifier: %w", err) } - writes = append(writes, domainsReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(domainsReport.Output)) return writes, nil } // applyCCTPVerifierFinality applies the CCTPVerifier's allowed-finality bitmask with // the requested config. func applyCCTPVerifierFinality(b cldf_ops.Bundle, chain evm.Chain, verifierAddress common.Address, allowedFinality finality.Config) ([]contract_utils.WriteOutput, error) { + cv, err := cvbind.NewCCTPVerifier(verifierAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPVerifier at %s: %w", verifierAddress.Hex(), err) + } desiredFinality := allowedFinality.Raw() - currentFinalityReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.GetAllowedFinalityConfig, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: verifierAddress, - }) + currentFinalityReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.NewReadGetAllowedFinalityConfig(cv), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get allowed finality config from CCTPVerifier: %w", err) } if currentFinalityReport.Output == desiredFinality { return nil, nil } - setFinalityReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.SetAllowedFinalityConfig, chain, contract_utils.FunctionInput[[4]byte]{ - ChainSelector: chain.Selector, - Address: verifierAddress, - Args: desiredFinality, + setFinalityReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.NewWriteSetAllowedFinalityConfig(cv), chain, ops2contract.FunctionInput[[4]byte]{ + Args: desiredFinality, }) if err != nil { return nil, fmt.Errorf("failed to set allowed finality config on CCTPVerifier: %w", err) } - return []contract_utils.WriteOutput{setFinalityReport.Output}, nil + return []contract_utils.WriteOutput{tokens_sequences.WriteOutputOps2ToLegacy(setFinalityReport.Output)}, nil } // applyCCTPV2PoolSetDomainsWrites sets domains on the CCTP V2 token pool, // skipping entries whose on-chain state already matches the desired config. -func applyCCTPV2PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAddress common.Address, domainUpdates []usdc_token_pool_cctp_v2.DomainUpdate) ([]contract_utils.WriteOutput, error) { - toUpdate := make([]usdc_token_pool_cctp_v2.DomainUpdate, 0, len(domainUpdates)) +func applyCCTPV2PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAddress common.Address, domainUpdates []utpv2bind.USDCTokenPoolDomainUpdate) ([]contract_utils.WriteOutput, error) { + pool, err := utpv2bind.NewUSDCTokenPoolCCTPV2(poolAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPoolCCTPV2 at %s: %w", poolAddress.Hex(), err) + } + toUpdate := make([]utpv2bind.USDCTokenPoolDomainUpdate, 0, len(domainUpdates)) for _, update := range domainUpdates { - currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.GetDomain, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: poolAddress, - Args: update.DestChainSelector, + currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.NewReadGetDomain(pool), chain, ops2contract.FunctionInput[uint64]{ + Args: update.DestChainSelector, }) if err != nil { // Domain not yet set (UnknownDomain) or unreadable — include it. @@ -817,26 +825,26 @@ func applyCCTPV2PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAdd if len(toUpdate) == 0 { return nil, nil } - report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.SetDomains, chain, contract_utils.FunctionInput[[]usdc_token_pool_cctp_v2.DomainUpdate]{ - ChainSelector: chain.Selector, - Address: poolAddress, - Args: toUpdate, + report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.NewWriteSetDomains(pool), chain, ops2contract.FunctionInput[[]utpv2bind.USDCTokenPoolDomainUpdate]{ + Args: toUpdate, }) if err != nil { return nil, fmt.Errorf("failed to set domains on CCTP V2 token pool: %w", err) } - return []contract_utils.WriteOutput{report.Output}, nil + return []contract_utils.WriteOutput{tokens_sequences.WriteOutputOps2ToLegacy(report.Output)}, nil } // applyCCTPV1PoolSetDomainsWrites sets domains on the CCTP V1 token pool, // skipping entries whose on-chain state already matches the desired config. -func applyCCTPV1PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAddress common.Address, domainUpdates []usdc_token_pool.DomainUpdate) ([]contract_utils.WriteOutput, error) { - toUpdate := make([]usdc_token_pool.DomainUpdate, 0, len(domainUpdates)) +func applyCCTPV1PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAddress common.Address, domainUpdates []utpbind.USDCTokenPoolDomainUpdate) ([]contract_utils.WriteOutput, error) { + pool, err := utpbind.NewUSDCTokenPool(poolAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPool at %s: %w", poolAddress.Hex(), err) + } + toUpdate := make([]utpbind.USDCTokenPoolDomainUpdate, 0, len(domainUpdates)) for _, update := range domainUpdates { - currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.GetDomain, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: poolAddress, - Args: update.DestChainSelector, + currentReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.NewReadGetDomain(pool), chain, ops2contract.FunctionInput[uint64]{ + Args: update.DestChainSelector, }) if err != nil { // Domain not yet set (UnknownDomain) or unreadable — include it. @@ -855,15 +863,13 @@ func applyCCTPV1PoolSetDomainsWrites(b cldf_ops.Bundle, chain evm.Chain, poolAdd if len(toUpdate) == 0 { return nil, nil } - report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.SetDomains, chain, contract_utils.FunctionInput[[]usdc_token_pool.DomainUpdate]{ - ChainSelector: chain.Selector, - Address: poolAddress, - Args: toUpdate, + report, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.NewWriteSetDomains(pool), chain, ops2contract.FunctionInput[[]utpbind.USDCTokenPoolDomainUpdate]{ + Args: toUpdate, }) if err != nil { return nil, fmt.Errorf("failed to set domains on CCTP V1 token pool: %w", err) } - return []contract_utils.WriteOutput{report.Output}, nil + return []contract_utils.WriteOutput{tokens_sequences.WriteOutputOps2ToLegacy(report.Output)}, nil } func convertMechanismToUint8(mechanism string) (uint8, error) { diff --git a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_cctp_chain.go b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_cctp_chain.go index af1193d31a..492c64bb76 100644 --- a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_cctp_chain.go +++ b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_cctp_chain.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -16,9 +17,17 @@ import ( contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" - cctp_message_transmitter_proxy_v1_6_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy" + cmtp162ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_2/operations/cctp_message_transmitter_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_5/operations/usdc_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_5/operations/usdc_token_pool_cctp_v2" + cmtp162bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_2/cctp_message_transmitter_proxy" + cmtpv2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_message_transmitter_proxy" + ccvtpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_through_ccv_token_pool" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cctp_verifier" + sutpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_usdc_token_pool" + utppbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/usdc_token_pool_proxy" + utpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool" + utpv2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_5/usdc_token_pool_cctp_v2" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" @@ -29,6 +38,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/usdc_token_pool_proxy" v2_0_0_sequences "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + tokens_sequences "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences/tokens" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/verifier_tags" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" ) @@ -88,9 +98,8 @@ var DeployCCTPChain = cldf_ops.NewSequence( } // Deploy/resolve CCTPMessageTransmitterProxy (v2.0.0 op) for CCTPVerifier + CCTP V2 pool wiring. - cctpV2MessageTransmitterProxyRef, err := contract_utils.MaybeDeployContract(b, cctp_message_transmitter_proxy.Deploy, chain, contract_utils.DeployInput[cctp_message_transmitter_proxy.ConstructorArgs]{ + cctpV2MessageTransmitterProxyRef, err := ops2contract.MaybeDeployContract(b, cctp_message_transmitter_proxy.Deploy, chain, ops2contract.DeployInput[cctp_message_transmitter_proxy.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(cctp_message_transmitter_proxy.ContractType, *cctp_message_transmitter_proxy.Version), - ChainSelector: chain.Selector, Args: cctp_message_transmitter_proxy.ConstructorArgs{ TokenMessenger: tokenMessengerV2Address, }, @@ -102,18 +111,17 @@ var DeployCCTPChain = cldf_ops.NewSequence( cctpV2MessageTransmitterProxyAddress := common.HexToAddress(cctpV2MessageTransmitterProxyRef.Address) // Deploy CCTPVerifier if needed - cctpVerifierRef, err := contract_utils.MaybeDeployContract(b, cctp_verifier.Deploy, chain, contract_utils.DeployInput[cctp_verifier.ConstructorArgs]{ + cctpVerifierRef, err := ops2contract.MaybeDeployContract(b, cctp_verifier.Deploy, chain, ops2contract.DeployInput[cctp_verifier.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(cctp_verifier.ContractType, *cctp_verifier.Version), - ChainSelector: chain.Selector, Args: cctp_verifier.ConstructorArgs{ TokenMessenger: tokenMessengerV2Address, MessageTransmitterProxy: cctpV2MessageTransmitterProxyAddress, UsdcToken: usdcTokenAddress, - DynamicConfig: cctp_verifier.DynamicConfig{ + DynamicConfig: cvbind.CCTPVerifierDynamicConfig{ FeeAggregator: feeAggregatorAddress, FastFinalityBps: input.FastFinalityBps, }, - BaseVerifierArgs: cctp_verifier.BaseVerifierArgs{ + BaseVerifierArgs: cvbind.CCTPVerifierBaseVerifierArgs{ StorageLocations: input.StorageLocations, Rmn: rmnAddress, VersionTag: verifier_tags.CCTPVerifierV2(), @@ -134,8 +142,7 @@ var DeployCCTPChain = cldf_ops.NewSequence( // Deploy token pools // Deploy CCTPThroughCCVTokenPool if needed - cctpV2WithCCVsTokenPoolRef, err := contract_utils.MaybeDeployContract(b, cctp_through_ccv_token_pool.Deploy, chain, contract_utils.DeployInput[cctp_through_ccv_token_pool.ConstructorArgs]{ - ChainSelector: chain.Selector, + cctpV2WithCCVsTokenPoolRef, err := ops2contract.MaybeDeployContract(b, cctp_through_ccv_token_pool.Deploy, chain, ops2contract.DeployInput[cctp_through_ccv_token_pool.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(cctp_through_ccv_token_pool.ContractType, *cctp_through_ccv_token_pool.Version), Args: cctp_through_ccv_token_pool.ConstructorArgs{ Token: usdcTokenAddress, @@ -192,8 +199,7 @@ var DeployCCTPChain = cldf_ops.NewSequence( var cctpV1PoolAddress common.Address if enableCCTPV1 { tokenMessengerV1Address := common.HexToAddress(input.TokenMessengerV1) - cctpV1PoolAddressRef, err := contract_utils.MaybeDeployContract(b, usdc_token_pool.Deploy, chain, contract_utils.DeployInput[usdc_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSelector, + cctpV1PoolAddressRef, err := ops2contract.MaybeDeployContract(b, usdc_token_pool.Deploy, chain, ops2contract.DeployInput[usdc_token_pool.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion( usdc_token_pool.ContractType, *usdc_token_pool.Version, @@ -216,8 +222,7 @@ var DeployCCTPChain = cldf_ops.NewSequence( } // Deploy USDCTokenPoolCCTPV2 (CCTP V2 pool) - cctpV2TokenPoolAddressRef, err := contract_utils.MaybeDeployContract(b, usdc_token_pool_cctp_v2.Deploy, chain, contract_utils.DeployInput[usdc_token_pool_cctp_v2.ConstructorArgs]{ - ChainSelector: input.ChainSelector, + cctpV2TokenPoolAddressRef, err := ops2contract.MaybeDeployContract(b, usdc_token_pool_cctp_v2.Deploy, chain, ops2contract.DeployInput[usdc_token_pool_cctp_v2.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion( usdc_token_pool_cctp_v2.ContractType, *usdc_token_pool_cctp_v2.Version, @@ -238,12 +243,11 @@ var DeployCCTPChain = cldf_ops.NewSequence( cctpV2TokenPoolAddress := common.HexToAddress(cctpV2TokenPoolAddressRef.Address) // Deploy USDCTokenPoolProxy - usdcTokenPoolProxyRef, err := contract_utils.MaybeDeployContract(b, usdc_token_pool_proxy.Deploy, chain, contract_utils.DeployInput[usdc_token_pool_proxy.ConstructorArgs]{ + usdcTokenPoolProxyRef, err := ops2contract.MaybeDeployContract(b, usdc_token_pool_proxy.Deploy, chain, ops2contract.DeployInput[usdc_token_pool_proxy.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(usdc_token_pool_proxy.ContractType, *usdc_token_pool_proxy.Version), - ChainSelector: chain.Selector, Args: usdc_token_pool_proxy.ConstructorArgs{ Token: usdcTokenAddress, - Pools: usdc_token_pool_proxy.PoolAddresses{ + Pools: utppbind.USDCTokenPoolProxyPoolAddresses{ CctpV1Pool: cctpV1PoolAddress, CctpV2Pool: cctpV2TokenPoolAddress, CctpV2PoolWithCCV: cctpV2WithCCVsTokenPoolAddress, @@ -269,15 +273,17 @@ var DeployCCTPChain = cldf_ops.NewSequence( } // Set the fee aggregator on the USDCTokenPoolProxy - setFeeAggregatorReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.SetFeeAggregator, chain, contract_utils.FunctionInput[common.Address]{ - ChainSelector: chain.Selector, - Address: usdcTokenPoolProxyAddress, - Args: feeAggregatorAddress, + usdcProxy, err := utppbind.NewUSDCTokenPoolProxy(usdcTokenPoolProxyAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind USDCTokenPoolProxy at %s: %w", usdcTokenPoolProxyAddress.Hex(), err) + } + setFeeAggregatorReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.NewWriteSetFeeAggregator(usdcProxy), chain, ops2contract.FunctionInput[common.Address]{ + Args: feeAggregatorAddress, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set fee aggregator on USDCTokenPoolProxy: %w", err) } - writes = append(writes, setFeeAggregatorReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(setFeeAggregatorReport.Output)) authorizedCallerWrites, err := applyCCTPAuthorizedCallerWrites( b, @@ -325,43 +331,37 @@ func configureSiloedPoolProxyWiring( siloedPoolAddr common.Address, ) ([]contract_utils.WriteOutput, error) { writes := make([]contract_utils.WriteOutput, 0) - // Get authorized callers on siloed pool. - callersReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.GetAllAuthorizedCallers, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: siloedPoolAddr, - }) + siloedPool, err := sutpbind.NewSiloedUSDCTokenPool(siloedPoolAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind SiloedUSDCTokenPool at %s: %w", siloedPoolAddr.Hex(), err) + } + callersReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.NewReadGetAllAuthorizedCallers(siloedPool), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get authorized callers from siloed pool: %w", err) } - // Authorize proxy if not already authorized. if !slices.Contains(callersReport.Output, proxyAddr) { - poolAuthReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[siloed_usdc_token_pool.AuthorizedCallerArgs]{ - ChainSelector: chainSelector, - Address: siloedPoolAddr, - Args: siloed_usdc_token_pool.AuthorizedCallerArgs{ + poolAuthReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.NewWriteApplyAuthorizedCallerUpdates(siloedPool), chain, ops2contract.FunctionInput[sutpbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: sutpbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{proxyAddr}, }, }) if err != nil { return nil, fmt.Errorf("failed to authorize proxy on siloed pool: %w", err) } - writes = append(writes, poolAuthReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(poolAuthReport.Output)) } - // Get current pools from proxy. - poolsReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.GetPools, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: proxyAddr, - }) + usdcProxy, err := utppbind.NewUSDCTokenPoolProxy(proxyAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPoolProxy at %s: %w", proxyAddr.Hex(), err) + } + poolsReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.NewReadGetPools(usdcProxy), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get existing proxy pools: %w", err) } currentPools := poolsReport.Output - // If siloed pool address is not set correctly, update it. if currentPools.SiloedLockReleasePool != siloedPoolAddr { - updatePoolsReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.UpdatePoolAddresses, chain, contract_utils.FunctionInput[usdc_token_pool_proxy.PoolAddresses]{ - ChainSelector: chainSelector, - Address: proxyAddr, - Args: usdc_token_pool_proxy.PoolAddresses{ + updatePoolsReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_proxy.NewWriteUpdatePoolAddresses(usdcProxy), chain, ops2contract.FunctionInput[utppbind.USDCTokenPoolProxyPoolAddresses]{ + Args: utppbind.USDCTokenPoolProxyPoolAddresses{ CctpV1Pool: currentPools.CctpV1Pool, CctpV2Pool: currentPools.CctpV2Pool, CctpV2PoolWithCCV: currentPools.CctpV2PoolWithCCV, @@ -371,7 +371,7 @@ func configureSiloedPoolProxyWiring( if err != nil { return nil, fmt.Errorf("failed to update proxy pool addresses: %w", err) } - writes = append(writes, updatePoolsReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(updatePoolsReport.Output)) } return writes, nil @@ -447,9 +447,9 @@ func resolveExistingCCTPV1MessageTransmitterProxy( for i := range existingAddresses { ref := existingAddresses[i] if ref.ChainSelector == chain.Selector && - ref.Type == datastore.ContractType(cctp_message_transmitter_proxy_v1_6_2.ContractType) && + ref.Type == datastore.ContractType(cmtp162ops.ContractType) && ref.Version != nil && - ref.Version.Equal(cctp_message_transmitter_proxy_v1_6_2.Version) { + ref.Version.Equal(cmtp162ops.Version) { if legacyRef != nil { return common.Address{}, datastore.AddressRef{}, fmt.Errorf("expected exactly 1 CCTPMessageTransmitterProxy v1.6.2 ref on chain %d, found multiple", chain.Selector) } @@ -472,37 +472,37 @@ func applyCCTPAuthorizedCallerWrites( ) ([]contract_utils.WriteOutput, error) { writes := make([]contract_utils.WriteOutput, 0) if enableCCTPV1 { - v1CurrentReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy_v1_6_2.GetAllowedCallers, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: cctpV1MessageTransmitterProxyAddr, - }) + cmtpV1, err := cmtp162bind.NewCCTPMessageTransmitterProxy(cctpV1MessageTransmitterProxyAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPMessageTransmitterProxy v1.6.2 at %s: %w", cctpV1MessageTransmitterProxyAddr.Hex(), err) + } + v1CurrentReport, err := cldf_ops.ExecuteOperation(b, cmtp162ops.NewReadGetAllowedCallers(cmtpV1), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get allowed callers from CCTPMessageTransmitterProxy v1.6.2: %w", err) } v1Current := v1CurrentReport.Output - toAddV1 := make([]cctp_message_transmitter_proxy_v1_6_2.AllowedCallerConfigArgs, 0) + toAddV1 := make([]cmtp162bind.CCTPMessageTransmitterProxyAllowedCallerConfigArgs, 0) for _, caller := range []common.Address{cctpVerifierAddr, cctpV1PoolAddr} { if !slices.Contains(v1Current, caller) { - toAddV1 = append(toAddV1, cctp_message_transmitter_proxy_v1_6_2.AllowedCallerConfigArgs{Caller: caller, Allowed: true}) + toAddV1 = append(toAddV1, cmtp162bind.CCTPMessageTransmitterProxyAllowedCallerConfigArgs{Caller: caller, Allowed: true}) } } if len(toAddV1) > 0 { - v1MsgTxReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy_v1_6_2.ConfigureAllowedCallers, chain, contract_utils.FunctionInput[[]cctp_message_transmitter_proxy_v1_6_2.AllowedCallerConfigArgs]{ - ChainSelector: chain.Selector, - Address: cctpV1MessageTransmitterProxyAddr, - Args: toAddV1, + v1MsgTxReport, err := cldf_ops.ExecuteOperation(b, cmtp162ops.NewWriteConfigureAllowedCallers(cmtpV1), chain, ops2contract.FunctionInput[[]cmtp162bind.CCTPMessageTransmitterProxyAllowedCallerConfigArgs]{ + Args: toAddV1, }) if err != nil { return nil, fmt.Errorf("failed to configure allowed callers on CCTPMessageTransmitterProxy v1.6.2: %w", err) } - writes = append(writes, v1MsgTxReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(v1MsgTxReport.Output)) } } - v2CurrentReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy.GetAllAuthorizedCallers, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: cctpV2MessageTransmitterProxyAddr, - }) + cmtp, err := cmtpv2bind.NewCCTPMessageTransmitterProxy(cctpV2MessageTransmitterProxyAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPMessageTransmitterProxy v2.0.0 at %s: %w", cctpV2MessageTransmitterProxyAddr.Hex(), err) + } + v2CurrentReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy.NewReadGetAllAuthorizedCallers(cmtp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get authorized callers from CCTPMessageTransmitterProxy v2.0.0: %w", err) } @@ -514,56 +514,60 @@ func applyCCTPAuthorizedCallerWrites( } } if len(toAddV2) > 0 { - v2MsgTxReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[cctp_message_transmitter_proxy.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: cctpV2MessageTransmitterProxyAddr, - Args: cctp_message_transmitter_proxy.AuthorizedCallerArgs{ + v2MsgTxReport, err := cldf_ops.ExecuteOperation(b, cctp_message_transmitter_proxy.NewWriteApplyAuthorizedCallerUpdates(cmtp), chain, ops2contract.FunctionInput[cmtpv2bind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: cmtpv2bind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: toAddV2, }, }) if err != nil { return nil, fmt.Errorf("failed to apply authorized caller updates to CCTPMessageTransmitterProxy v2.0.0: %w", err) } - writes = append(writes, v2MsgTxReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(v2MsgTxReport.Output)) } if enableCCTPV1 { - cctpV1TokenPoolReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[usdc_token_pool.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: cctpV1PoolAddr, - Args: usdc_token_pool.AuthorizedCallerArgs{ + cctpV1Pool, err := utpbind.NewUSDCTokenPool(cctpV1PoolAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPool at %s: %w", cctpV1PoolAddr.Hex(), err) + } + cctpV1TokenPoolReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool.NewWriteApplyAuthorizedCallerUpdates(cctpV1Pool), chain, ops2contract.FunctionInput[utpbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: utpbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{proxyAddr}, }, }) if err != nil { return nil, fmt.Errorf("failed to apply authorized caller updates to USDCTokenPool: %w", err) } - writes = append(writes, cctpV1TokenPoolReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(cctpV1TokenPoolReport.Output)) } - cctpV2ThroughCCVTokenPoolReport, err := cldf_ops.ExecuteOperation(b, cctp_through_ccv_token_pool.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[cctp_through_ccv_token_pool.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: cctpV2WithCCVsPoolAddr, - Args: cctp_through_ccv_token_pool.AuthorizedCallerArgs{ + ccvPool, err := ccvtpbind.NewCCTPThroughCCVTokenPool(cctpV2WithCCVsPoolAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPThroughCCVTokenPool at %s: %w", cctpV2WithCCVsPoolAddr.Hex(), err) + } + cctpV2ThroughCCVTokenPoolReport, err := cldf_ops.ExecuteOperation(b, cctp_through_ccv_token_pool.NewWriteApplyAuthorizedCallerUpdates(ccvPool), chain, ops2contract.FunctionInput[ccvtpbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: ccvtpbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{proxyAddr}, }, }) if err != nil { return nil, fmt.Errorf("failed to apply authorized caller updates to CCTPThroughCCVTokenPool: %w", err) } - writes = append(writes, cctpV2ThroughCCVTokenPoolReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(cctpV2ThroughCCVTokenPoolReport.Output)) - cctpV2TokenPoolReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[usdc_token_pool_cctp_v2.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: cctpV2PoolAddr, - Args: usdc_token_pool_cctp_v2.AuthorizedCallerArgs{ + cctpV2Pool, err := utpv2bind.NewUSDCTokenPoolCCTPV2(cctpV2PoolAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind USDCTokenPoolCCTPV2 at %s: %w", cctpV2PoolAddr.Hex(), err) + } + cctpV2TokenPoolReport, err := cldf_ops.ExecuteOperation(b, usdc_token_pool_cctp_v2.NewWriteApplyAuthorizedCallerUpdates(cctpV2Pool), chain, ops2contract.FunctionInput[utpv2bind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: utpv2bind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{proxyAddr}, }, }) if err != nil { return nil, fmt.Errorf("failed to apply authorized caller updates to USDCTokenPoolCCTPV2: %w", err) } - writes = append(writes, cctpV2TokenPoolReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(cctpV2TokenPoolReport.Output)) return writes, nil } @@ -573,10 +577,11 @@ func setCCTPVerifierResolverInbound( chain evm.Chain, cctpVerifierAddr, resolverAddr common.Address, ) ([]contract_utils.WriteOutput, error) { - versionTagReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.VersionTag, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: cctpVerifierAddr, - }) + cv, err := cvbind.NewCCTPVerifier(cctpVerifierAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CCTPVerifier at %s: %w", cctpVerifierAddr.Hex(), err) + } + versionTagReport, err := cldf_ops.ExecuteOperation(b, cctp_verifier.NewReadVersionTag(cv), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get version tag from CCTPVerifier: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release.go b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release.go index 8f13bb4130..15c6f0e30d 100644 --- a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release.go +++ b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release.go @@ -5,13 +5,17 @@ import ( "slices" "github.com/Masterminds/semver/v3" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" mcms_types "github.com/smartcontractkit/mcms/types" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + sutpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_usdc_token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -58,11 +62,9 @@ var DeploySiloedUSDCLockRelease = cldf_ops.NewSequence( writes := make([]contract_utils.WriteOutput, 0) siloedPoolAddr := input.SiloedUSDCTokenPool - // Deploy siloed USDC token pool if not provided if siloedPoolAddr == "" { - poolReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.Deploy, chain, contract_utils.DeployInput[siloed_usdc_token_pool.ConstructorArgs]{ + poolReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.Deploy, chain, ops2contract.DeployInput[siloed_usdc_token_pool.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(siloed_usdc_token_pool.ContractType, *siloed_usdc_token_pool.Version), - ChainSelector: chain.Selector, Args: siloed_usdc_token_pool.ConstructorArgs{ Token: common.HexToAddress(input.USDCToken), LocalTokenDecimals: input.TokenDecimals, @@ -80,9 +82,8 @@ var DeploySiloedUSDCLockRelease = cldf_ops.NewSequence( siloedPoolAddress := common.HexToAddress(siloedPoolAddr) lockBoxes := make(map[uint64]string, len(input.LockReleaseChainSelectors)) - // Deploy lockboxes and configure them on the pool if len(input.LockReleaseChainSelectors) > 0 { - configs := make([]siloed_usdc_token_pool.LockBoxConfig, 0, len(input.LockReleaseChainSelectors)) + configs := make([]sutpbind.SiloedLockReleaseTokenPoolLockBoxConfig, 0, len(input.LockReleaseChainSelectors)) for _, sel := range input.LockReleaseChainSelectors { qualifier := fmt.Sprintf("remoteChainSelector(%d)", sel) @@ -98,9 +99,8 @@ var DeploySiloedUSDCLockRelease = cldf_ops.NewSequence( if !datastore_utils.IsAddressRefEmpty(existingRef) { lbAddr = existingRef.Address } else { - lbReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.Deploy, chain, contract_utils.DeployInput[erc20_lock_box.ConstructorArgs]{ + lbReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.Deploy, chain, ops2contract.DeployInput[erc20_lock_box.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(erc20_lock_box.ContractType, *erc20_lock_box.Version), - ChainSelector: chain.Selector, Qualifier: &qualifier, Args: erc20_lock_box.ConstructorArgs{ Token: common.HexToAddress(input.USDCToken), @@ -114,48 +114,48 @@ var DeploySiloedUSDCLockRelease = cldf_ops.NewSequence( } lockBoxes[sel] = lbAddr - configs = append(configs, siloed_usdc_token_pool.LockBoxConfig{ + configs = append(configs, sutpbind.SiloedLockReleaseTokenPoolLockBoxConfig{ RemoteChainSelector: sel, LockBox: common.HexToAddress(lbAddr), }) } - cfgReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.ConfigureLockBoxes, chain, contract_utils.FunctionInput[[]siloed_usdc_token_pool.LockBoxConfig]{ - ChainSelector: input.ChainSelector, - Address: siloedPoolAddress, - Args: configs, + siloedPool, err := sutpbind.NewSiloedUSDCTokenPool(siloedPoolAddress, chain.Client) + if err != nil { + return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to bind SiloedUSDCTokenPool at %s: %w", siloedPoolAddress.Hex(), err) + } + cfgReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.NewWriteConfigureLockBoxes(siloedPool), chain, ops2contract.FunctionInput[[]sutpbind.SiloedLockReleaseTokenPoolLockBoxConfig]{ + Args: configs, }) if err != nil { return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to configure lockboxes on pool: %w", err) } - writes = append(writes, cfgReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(cfgReport.Output)) } - // Authorize siloed pool on each lockbox + callOpts := &bind.CallOpts{Context: b.GetContext()} for sel := range lockBoxes { lbAddr := lockBoxes[sel] lockBoxAddress := common.HexToAddress(lbAddr) - // Check if already authorized - callersReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.GetAllAuthorizedCallers, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: lockBoxAddress, - }) + lockBox, err := lockboxbind.NewERC20LockBox(lockBoxAddress, chain.Client) + if err != nil { + return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to bind ERC20LockBox at %s: %w", lockBoxAddress.Hex(), err) + } + currentCallers, err := lockBox.GetAllAuthorizedCallers(callOpts) if err != nil { return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to get authorized callers on lockbox %s (chain %d): %w", lbAddr, sel, err) } - // If not authorized, authorize it - if !slices.Contains(callersReport.Output, siloedPoolAddress) { - authReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[erc20_lock_box.AuthorizedCallerArgs]{ - ChainSelector: input.ChainSelector, - Address: lockBoxAddress, - Args: erc20_lock_box.AuthorizedCallerArgs{ + if !slices.Contains(currentCallers, siloedPoolAddress) { + authBundle := cldf_ops.NewBundle(b.GetContext, b.Logger, cldf_ops.NewMemoryReporter()) + authReport, err := cldf_ops.ExecuteOperation(authBundle, erc20_lock_box.NewWriteApplyAuthorizedCallerUpdates(lockBox), chain, ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{siloedPoolAddress}, }, }) if err != nil { return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to authorize siloed pool on lockbox %s (chain %d): %w", lbAddr, sel, err) } - writes = append(writes, authReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(authReport.Output)) } } @@ -168,12 +168,12 @@ var DeploySiloedUSDCLockRelease = cldf_ops.NewSequence( batchOps = append(batchOps, batchOp) } - // Configure remote chains on the siloed pool (2.0.0 sequence) if len(input.RemoteChainConfigs) > 0 { - supportedChainsReport, err := cldf_ops.ExecuteOperation(b, evm_token_pool.GetSupportedChains, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: siloedPoolAddress, - }) + siloedTP, err := tokens_sequences.BindTokenPool(siloedPoolAddress, chain) + if err != nil { + return DeploySiloedUSDCLockReleaseOutput{}, err + } + supportedChainsReport, err := cldf_ops.ExecuteOperation(b, evm_token_pool.NewReadGetSupportedChains(siloedTP), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return DeploySiloedUSDCLockReleaseOutput{}, fmt.Errorf("failed to get supported chains on siloed pool: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release_test.go b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release_test.go index 97f54b67a9..2bb12be2ef 100644 --- a/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/cctp/deploy_siloed_usdc_lock_release_test.go @@ -6,13 +6,13 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/create2_factory" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/testsetup" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/create2_factory" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/testsetup" erc20_lock_box_bindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/mock_usdc_token_messenger" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/mock_usdc_token_transmitter" diff --git a/chains/evm/deployment/v2_0_0/sequences/cctp/migrate_hybrid_lock_release_liquidity.go b/chains/evm/deployment/v2_0_0/sequences/cctp/migrate_hybrid_lock_release_liquidity.go index 31bfc0512c..3ac7bdd24e 100644 --- a/chains/evm/deployment/v2_0_0/sequences/cctp/migrate_hybrid_lock_release_liquidity.go +++ b/chains/evm/deployment/v2_0_0/sequences/cctp/migrate_hybrid_lock_release_liquidity.go @@ -14,13 +14,18 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" + contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20_lock_box" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/siloed_usdc_token_pool" - contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_2/operations/hybrid_lock_release_usdc_token_pool" + tokens_sequences "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences/tokens" + hybridbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_2/hybrid_lock_release_usdc_token_pool" + erc20_lock_box_bindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + sutpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_usdc_token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) var MigrateHybridLockReleaseLiquidity = cldf_ops.NewSequence( @@ -71,13 +76,16 @@ func migrateHybridLockReleaseLiquidity( return sequences.OnChainOutput{}, err } + hybridPool, err := hybridbind.NewHybridLockReleaseUSDCTokenPool(hybridPoolAddr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind HybridLockReleaseUSDCTokenPool at %s: %w", hybridPoolAddr.Hex(), err) + } + // Validate all selectors: configured for lock-release, have lockboxes, amounts don't exceed locked. lockBoxes := make(map[uint64]common.Address, len(selectors)) for _, sel := range selectors { - shouldUseReport, err := cldf_ops.ExecuteOperation(b, hybrid_lock_release_usdc_token_pool.ShouldUseLockRelease, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: hybridPoolAddr, - Args: sel, + shouldUseReport, err := cldf_ops.ExecuteOperation(b, hybrid_lock_release_usdc_token_pool.NewReadShouldUseLockRelease(hybridPool), chain, ops2contract.FunctionInput[uint64]{ + Args: sel, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to check lock-release mechanism for chain %d: %w", sel, err) @@ -92,10 +100,8 @@ func migrateHybridLockReleaseLiquidity( } lockBoxes[sel] = lockBoxAddr - lockedReport, err := cldf_ops.ExecuteOperation(b, hybrid_lock_release_usdc_token_pool.GetLockedTokensForChain, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: hybridPoolAddr, - Args: sel, + lockedReport, err := cldf_ops.ExecuteOperation(b, hybrid_lock_release_usdc_token_pool.NewReadGetLockedTokensForChain(hybridPool), chain, ops2contract.FunctionInput[uint64]{ + Args: sel, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get locked tokens for chain %d: %w", sel, err) @@ -122,6 +128,7 @@ func migrateHybridLockReleaseLiquidity( b: b, chain: chain, input: input, + hybridPool: hybridPool, hybridPoolAddr: hybridPoolAddr, siloedPoolAddr: siloedPoolAddr, tokenAddr: tokenAddr, @@ -164,6 +171,7 @@ type migratePhaseCtx struct { b cldf_ops.Bundle chain evm.Chain input adapters.MigrateHybridLockReleaseLiquidityInput + hybridPool hybridbind.HybridLockReleaseUSDCTokenPoolInterface hybridPoolAddr common.Address siloedPoolAddr common.Address tokenAddr common.Address @@ -172,6 +180,18 @@ type migratePhaseCtx struct { lockBoxes map[uint64]common.Address } +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) contract_utils.WriteOutput { + var ei *contract_utils.ExecInfo + if w.ExecInfo != nil { + ei = &contract_utils.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract_utils.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + // authorizeLockboxCallers adds siloed pool, timelock, and LP as authorized callers on each lockbox. // This must run before the MCMS batch so the timelock can deposit and the LP has access post-migration. func authorizeLockboxCallers(ctx *migratePhaseCtx) ([]contract_utils.WriteOutput, error) { @@ -182,20 +202,21 @@ func authorizeLockboxCallers(ctx *migratePhaseCtx) ([]contract_utils.WriteOutput for _, sel := range ctx.selectors { lockBoxAddr := ctx.lockBoxes[sel] - lpReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.GetLiquidityProvider, ctx.chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: ctx.input.ChainSelector, - Address: ctx.hybridPoolAddr, - Args: sel, + lpReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.NewReadGetLiquidityProvider(ctx.hybridPool), ctx.chain, ops2contract.FunctionInput[uint64]{ + Args: sel, }) if err != nil { return nil, fmt.Errorf("authorizeLockboxCallers: chain %d lockbox %s: get liquidity provider: %w", sel, lockBoxAddr.Hex(), err) } lp := lpReport.Output - callersReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.GetAllAuthorizedCallers, ctx.chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: ctx.input.ChainSelector, - Address: lockBoxAddr, - Args: struct{}{}, + lockBoxBinding, err := erc20_lock_box_bindings.NewERC20LockBox(lockBoxAddr, ctx.chain.Client) + if err != nil { + return nil, fmt.Errorf("authorizeLockboxCallers: chain %d lockbox %s: bind lock box: %w", sel, lockBoxAddr.Hex(), err) + } + + callersReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.NewReadGetAllAuthorizedCallers(lockBoxBinding), ctx.chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return nil, fmt.Errorf("authorizeLockboxCallers: chain %d lockbox %s: get authorized callers: %w", sel, lockBoxAddr.Hex(), err) @@ -217,17 +238,15 @@ func authorizeLockboxCallers(ctx *migratePhaseCtx) ([]contract_utils.WriteOutput } if len(callersToAdd) > 0 { - authReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.ApplyAuthorizedCallerUpdates, ctx.chain, contract_utils.FunctionInput[erc20_lock_box.AuthorizedCallerArgs]{ - ChainSelector: ctx.input.ChainSelector, - Address: lockBoxAddr, - Args: erc20_lock_box.AuthorizedCallerArgs{ + authReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.NewWriteApplyAuthorizedCallerUpdates(lockBoxBinding), ctx.chain, ops2contract.FunctionInput[erc20_lock_box_bindings.AuthorizedCallersAuthorizedCallerArgs]{ + Args: erc20_lock_box_bindings.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: callersToAdd, }, }) if err != nil { return nil, fmt.Errorf("authorizeLockboxCallers: chain %d lockbox %s: apply authorized caller updates: %w", sel, lockBoxAddr.Hex(), err) } - writes = append(writes, authReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(authReport.Output)) } } @@ -245,9 +264,7 @@ func migrateLiquidityToLockboxes(ctx *migratePhaseCtx) ([]contract_utils.WriteOu lockBoxAddr := ctx.lockBoxes[sel] withdrawAmount := new(big.Int).SetUint64(ctx.input.WithdrawAmounts[sel]) - withdrawReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.WithdrawLiquidity, ctx.chain, contract_utils.FunctionInput[hybrid_lock_release_usdc_token_pool.WithdrawLiquidityArgs]{ - ChainSelector: ctx.input.ChainSelector, - Address: ctx.hybridPoolAddr, + withdrawReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.NewWriteWithdrawLiquidity(ctx.hybridPool), ctx.chain, ops2contract.FunctionInput[hybrid_lock_release_usdc_token_pool.WithdrawLiquidityArgs]{ Args: hybrid_lock_release_usdc_token_pool.WithdrawLiquidityArgs{ RemoteChainSelector: sel, Amount: withdrawAmount, @@ -256,7 +273,7 @@ func migrateLiquidityToLockboxes(ctx *migratePhaseCtx) ([]contract_utils.WriteOu if err != nil { return nil, fmt.Errorf("migrateLiquidityToLockboxes: chain %d lockbox %s amount %s: withdraw: %w", sel, lockBoxAddr.Hex(), withdrawAmount.String(), err) } - writes = append(writes, withdrawReport.Output) + writes = append(writes, tokens_sequences.WriteOutputOps2ToLegacy(withdrawReport.Output)) approveReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20.ApproveProposalOnly, ctx.chain, contract_utils.FunctionInput[erc20.ApproveArgs]{ ChainSelector: ctx.input.ChainSelector, @@ -271,9 +288,12 @@ func migrateLiquidityToLockboxes(ctx *migratePhaseCtx) ([]contract_utils.WriteOu } writes = append(writes, approveReport.Output) - depositReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.Deposit, ctx.chain, contract_utils.FunctionInput[erc20_lock_box.DepositArgs]{ - ChainSelector: ctx.input.ChainSelector, - Address: lockBoxAddr, + lockBoxBinding, err := erc20_lock_box_bindings.NewERC20LockBox(lockBoxAddr, ctx.chain.Client) + if err != nil { + return nil, fmt.Errorf("migrateLiquidityToLockboxes: chain %d lockbox %s: bind lock box: %w", sel, lockBoxAddr.Hex(), err) + } + + depositReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.NewWriteDeposit(lockBoxBinding), ctx.chain, ops2contract.FunctionInput[erc20_lock_box.DepositArgs]{ Args: erc20_lock_box.DepositArgs{ Token: ctx.tokenAddr, RemoteChainSelector: sel, @@ -283,7 +303,7 @@ func migrateLiquidityToLockboxes(ctx *migratePhaseCtx) ([]contract_utils.WriteOu if err != nil { return nil, fmt.Errorf("migrateLiquidityToLockboxes: chain %d lockbox %s amount %s: deposit: %w", sel, lockBoxAddr.Hex(), withdrawAmount.String(), err) } - writes = append(writes, depositReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(depositReport.Output)) } return writes, nil } @@ -298,10 +318,8 @@ func transferLockboxOwnershipToLPs(ctx *migratePhaseCtx) ([]contract_utils.Write for _, sel := range ctx.selectors { lockBoxAddr := ctx.lockBoxes[sel] - lpReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.GetLiquidityProvider, ctx.chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: ctx.input.ChainSelector, - Address: ctx.hybridPoolAddr, - Args: sel, + lpReport, err := cldf_ops.ExecuteOperation(ctx.b, hybrid_lock_release_usdc_token_pool.NewReadGetLiquidityProvider(ctx.hybridPool), ctx.chain, ops2contract.FunctionInput[uint64]{ + Args: sel, }) if err != nil { return nil, fmt.Errorf("transferLockboxOwnershipToLPs: chain %d lockbox %s: get liquidity provider: %w", sel, lockBoxAddr.Hex(), err) @@ -312,10 +330,13 @@ func transferLockboxOwnershipToLPs(ctx *migratePhaseCtx) ([]contract_utils.Write continue } - ownerReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.Owner, ctx.chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: ctx.input.ChainSelector, - Address: lockBoxAddr, - Args: struct{}{}, + lockBoxBinding, err := erc20_lock_box_bindings.NewERC20LockBox(lockBoxAddr, ctx.chain.Client) + if err != nil { + return nil, fmt.Errorf("transferLockboxOwnershipToLPs: chain %d lockbox %s: bind lock box: %w", sel, lockBoxAddr.Hex(), err) + } + + ownerReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.NewReadOwner(lockBoxBinding), ctx.chain, ops2contract.FunctionInput[struct{}]{ + Args: struct{}{}, }) if err != nil { return nil, fmt.Errorf("transferLockboxOwnershipToLPs: chain %d lockbox %s: get owner: %w", sel, lockBoxAddr.Hex(), err) @@ -324,15 +345,13 @@ func transferLockboxOwnershipToLPs(ctx *migratePhaseCtx) ([]contract_utils.Write continue } - transferReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.TransferOwnership, ctx.chain, contract_utils.FunctionInput[common.Address]{ - ChainSelector: ctx.input.ChainSelector, - Address: lockBoxAddr, - Args: lp, + transferReport, err := cldf_ops.ExecuteOperation(ctx.b, erc20_lock_box.NewWriteTransferOwnership(lockBoxBinding), ctx.chain, ops2contract.FunctionInput[common.Address]{ + Args: lp, }) if err != nil { return nil, fmt.Errorf("transferLockboxOwnershipToLPs: chain %d lockbox %s lp %s: transfer ownership: %w", sel, lockBoxAddr.Hex(), lp.Hex(), err) } - writes = append(writes, transferReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(transferReport.Output)) } return writes, nil } @@ -361,21 +380,21 @@ func parseHexAddress(name, address string) (common.Address, error) { } func fetchLockBoxesFromSiloedPool(b cldf_ops.Bundle, chain evm.Chain, chainSelector uint64, poolAddress common.Address) (map[uint64]common.Address, error) { - lockBoxReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.GetAllLockBoxConfigs, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: poolAddress, - Args: struct{}{}, - }) + siloedPool, err := sutpbind.NewSiloedUSDCTokenPool(poolAddress, chain.Client) + if err != nil { + return nil, fmt.Errorf("fetchLockBoxesFromSiloedPool: bind siloedPool=%s chainSelector=%d: %w", poolAddress.Hex(), chainSelector, err) + } + lockBoxReport, err := cldf_ops.ExecuteOperation(b, siloed_usdc_token_pool.NewReadGetAllLockBoxConfigs(siloedPool), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("fetchLockBoxesFromSiloedPool: siloedPool=%s chainSelector=%d: %w", poolAddress.Hex(), chainSelector, err) } configs := lockBoxReport.Output if configs == nil { - configs = []siloed_usdc_token_pool.LockBoxConfig{} + configs = []sutpbind.SiloedLockReleaseTokenPoolLockBoxConfig{} } lockBoxes := make(map[uint64]common.Address, len(configs)) - for _, cfg := range lockBoxReport.Output { + for _, cfg := range configs { lockBoxes[cfg.RemoteChainSelector] = cfg.LockBox } return lockBoxes, nil diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go b/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go index 1faa1be46a..1242d2e7c2 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes.go @@ -12,6 +12,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -24,11 +25,26 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" fqc "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" + proxybind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/proxy" ) +func writeOutputOps2ToSeq(w ops2contract.WriteOutput) contract.WriteOutput { + var ei *contract.ExecInfo + if w.ExecInfo != nil { + ei = &contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + // ConfigureChainForLanes is the canonical sequence for configuring an EVM chain to participate // in CCIP 2.0 lanes with multiple remote chains. It is self-contained: all contract writes // (OffRamp, OnRamp, Executor, FeeQuoter, CommitteeVerifier, Router) are handled here. @@ -101,10 +117,10 @@ var ConfigureChainForLanes = cldf_ops.NewSequence( // For each remote chain we build the desired args for every contract. // The "maybe" helpers read on-chain state and only append when a diff exists // (idempotency). This avoids emitting no-op transactions in MCMS proposals. - offRampArgs := make([]offramp.SourceChainConfigArgs, 0, len(input.RemoteChains)) - onRampArgs := make([]onramp.DestChainConfigArgs, 0, len(input.RemoteChains)) - feeQuoterArgs := make([]fee_quoter.DestChainConfigArgs, 0, len(input.RemoteChains)) - gasPriceUpdates := make([]fee_quoter.GasPriceUpdate, 0, len(input.RemoteChains)) + offRampArgs := make([]offbind.OffRampSourceChainConfigArgs, 0, len(input.RemoteChains)) + onRampArgs := make([]orbind.OnRampDestChainConfigArgs, 0, len(input.RemoteChains)) + feeQuoterArgs := make([]fqc.FeeQuoterDestChainConfigArgs, 0, len(input.RemoteChains)) + gasPriceUpdates := make([]fqc.InternalGasPriceUpdate, 0, len(input.RemoteChains)) onRampAdds := make([]router.OnRamp, 0, len(input.RemoteChains)) offRampAdds := make([]router.OffRamp, 0, len(input.RemoteChains)) destChainSelectorsPerExecutor := make(map[common.Address][]ExecutorRemoteChainConfigArgs) @@ -113,30 +129,36 @@ var ConfigureChainForLanes = cldf_ops.NewSequence( if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to bind fee quoter contract at address %s on chain %s: %w", feeQuoterAddr, chain.String(), err) } + offRampContract, err := offbind.NewOffRamp(offRampAddr, chain.Client) + if err != nil { + return seqtypes.OnChainOutput{}, fmt.Errorf("failed to bind off ramp contract at address %s on chain %s: %w", offRampAddr, chain.String(), err) + } + onRampContract, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return seqtypes.OnChainOutput{}, fmt.Errorf("failed to bind on ramp contract at address %s on chain %s: %w", onRampAddr, chain.String(), err) + } for remoteSelector, remoteConfig := range input.RemoteChains { // OffRamp: tells the local OffRamp which source chains to accept messages from. - offRampArgs, err = maybeAddSourceChainConfigArgOnLocalChain(b, chain, input, remoteSelector, remoteConfig, offRampArgs) + offRampArgs, err = maybeAddSourceChainConfigArgOnLocalChain(b, chain, input, offRampContract, remoteSelector, remoteConfig, offRampArgs) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("remote chain %d: %w", remoteSelector, err) } // OnRamp: tells the local OnRamp how to send messages to this remote chain. - onRampArgs, err = maybeAddOnRampDestChainConfigArgOnLocalChain(b, chain, input, remoteSelector, remoteConfig, onRampArgs) + onRampArgs, err = maybeAddOnRampDestChainConfigArgOnLocalChain(b, chain, input, onRampContract, remoteSelector, remoteConfig, onRampArgs) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("remote chain %d: %w", remoteSelector, err) } if remoteConfig.FeeQuoterDestChainConfig.USDPerUnitGas != nil { - gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.GetDestinationChainGasPrice, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: feeQuoterAddr, - Args: remoteSelector, + gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewReadGetDestinationChainGasPrice(feeQContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to get gas prices on FeeQuoter(%s) on chain %s: %w", feeQuoterAddr, chain, err) } if remoteConfig.FeeQuoterDestChainConfig.USDPerUnitGas.Cmp(gasPriceReport.Output.Value) != 0 { - gasPriceUpdates = append(gasPriceUpdates, fee_quoter.GasPriceUpdate{ + gasPriceUpdates = append(gasPriceUpdates, fqc.InternalGasPriceUpdate{ DestChainSelector: remoteSelector, UsdPerUnitGas: remoteConfig.FeeQuoterDestChainConfig.USDPerUnitGas, }) @@ -171,14 +193,15 @@ var ConfigureChainForLanes = cldf_ops.NewSequence( // proxy to group dest chains by their actual implementation, since multiple // proxies may point to the same implementation. defaultExecutor := common.HexToAddress(remoteConfig.DefaultExecutor) - getTargetReport, err := cldf_ops.ExecuteOperation(b, proxy.GetTarget, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: defaultExecutor, - }) + execProxyContract, err := proxybind.NewProxy(defaultExecutor, chain.Client) + if err != nil { + return seqtypes.OnChainOutput{}, fmt.Errorf("failed to bind executor proxy at address %s on chain %s: %w", defaultExecutor.Hex(), chain.String(), err) + } + executorImpl, err := execProxyContract.GetTarget(&bind.CallOpts{Context: b.GetContext()}) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to get target address of Executor(%s) on chain %s: %w", defaultExecutor, chain, err) } - destChainSelectorsPerExecutor[getTargetReport.Output] = append(destChainSelectorsPerExecutor[getTargetReport.Output], ExecutorRemoteChainConfigArgs{ + destChainSelectorsPerExecutor[executorImpl] = append(destChainSelectorsPerExecutor[executorImpl], ExecutorRemoteChainConfigArgs{ DestChainSelector: remoteSelector, Config: remoteConfig.ExecutorDestChainConfig, }) @@ -221,27 +244,23 @@ var ConfigureChainForLanes = cldf_ops.NewSequence( // ── Phase 3: Apply writes ──────────────────────────────────────────────── // Each block only emits a write when there are actual changes to apply. if len(offRampArgs) > 0 { - offRampReport, err := cldf_ops.ExecuteOperation(b, offramp.ApplySourceChainConfigUpdates, chain, contract.FunctionInput[[]offramp.SourceChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: offRampAddr, - Args: offRampArgs, + offRampReport, err := cldf_ops.ExecuteOperation(b, offramp.NewWriteApplySourceChainConfigUpdates(offRampContract), chain, ops2contract.FunctionInput[[]offbind.OffRampSourceChainConfigArgs]{ + Args: offRampArgs, }) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to apply source chain config updates to OffRamp(%s) on chain %s: %w", offRampAddr, chain, err) } - writes = append(writes, offRampReport.Output) + writes = append(writes, writeOutputOps2ToSeq(offRampReport.Output)) } if len(onRampArgs) > 0 { - onRampReport, err := cldf_ops.ExecuteOperation(b, onramp.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]onramp.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: onRampAddr, - Args: onRampArgs, + onRampReport, err := cldf_ops.ExecuteOperation(b, onramp.NewWriteApplyDestChainConfigUpdates(onRampContract), chain, ops2contract.FunctionInput[[]orbind.OnRampDestChainConfigArgs]{ + Args: onRampArgs, }) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to apply dest chain config updates to OnRamp(%s) on chain %s: %w", onRampAddr, chain, err) } - writes = append(writes, onRampReport.Output) + writes = append(writes, writeOutputOps2ToSeq(onRampReport.Output)) } for executorAddr, toAdd := range destChainSelectorsPerExecutor { @@ -262,31 +281,27 @@ var ConfigureChainForLanes = cldf_ops.NewSequence( } if len(feeQuoterArgs) > 0 { - feeQuoterReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]fee_quoter.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: feeQuoterAddr, - Args: feeQuoterArgs, + feeQuoterReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewWriteApplyDestChainConfigUpdates(feeQContract), chain, ops2contract.FunctionInput[[]fqc.FeeQuoterDestChainConfigArgs]{ + Args: feeQuoterArgs, }) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to apply dest chain config updates to FeeQuoter(%s) on chain %s: %w", feeQuoterAddr, chain, err) } - writes = append(writes, feeQuoterReport.Output) + writes = append(writes, writeOutputOps2ToSeq(feeQuoterReport.Output)) } // Gas price updates live in a separate on-chain mapping (not dest chain config), // so they must be applied via FeeQuoter.UpdatePrices. if len(gasPriceUpdates) > 0 { - gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.UpdatePrices, chain, contract.FunctionInput[fee_quoter.PriceUpdates]{ - ChainSelector: chain.Selector, - Address: feeQuoterAddr, - Args: fee_quoter.PriceUpdates{ + gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewWriteUpdatePrices(feeQContract), chain, ops2contract.FunctionInput[fqc.InternalPriceUpdates]{ + Args: fqc.InternalPriceUpdates{ GasPriceUpdates: gasPriceUpdates, }, }) if err != nil { return seqtypes.OnChainOutput{}, fmt.Errorf("failed to update gas prices on FeeQuoter(%s) on chain %s: %w", feeQuoterAddr, chain, err) } - writes = append(writes, gasPriceReport.Output) + writes = append(writes, writeOutputOps2ToSeq(gasPriceReport.Output)) } // CommitteeVerifier: for each verifier contract, configure outbound settings @@ -348,10 +363,11 @@ func maybeAddSourceChainConfigArgOnLocalChain( b cldf_ops.Bundle, chain evm.Chain, input changesetadapters.ConfigureChainForLanesInput, + offRampContract *offbind.OffRamp, remoteSelector uint64, remoteConfig changesetadapters.RemoteChainConfig[[]byte, string], - offRampArgs []offramp.SourceChainConfigArgs, -) ([]offramp.SourceChainConfigArgs, error) { + offRampArgs []offbind.OffRampSourceChainConfigArgs, +) ([]offbind.OffRampSourceChainConfigArgs, error) { defaultInboundCCVs := make([]common.Address, 0, len(remoteConfig.DefaultInboundCCVs)) for _, ccv := range remoteConfig.DefaultInboundCCVs { defaultInboundCCVs = append(defaultInboundCCVs, common.HexToAddress(ccv)) @@ -366,10 +382,8 @@ func maybeAddSourceChainConfigArgOnLocalChain( } offRampAddr := common.BytesToAddress(input.OffRamp) - currentReport, err := cldf_ops.ExecuteOperation(b, offramp.GetSourceChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: offRampAddr, - Args: remoteSelector, + currentReport, err := cldf_ops.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return nil, fmt.Errorf("failed to get source chain config for selector %d from OffRamp(%s) on chain %v: %w", remoteSelector, offRampAddr, chain, err) @@ -381,7 +395,7 @@ func maybeAddSourceChainConfigArgOnLocalChain( isEnabled = *remoteConfig.AllowTrafficFrom } - desired := offramp.SourceChainConfigArgs{ + desired := offbind.OffRampSourceChainConfigArgs{ Router: common.BytesToAddress(input.Router), SourceChainSelector: remoteSelector, IsEnabled: isEnabled, @@ -416,10 +430,11 @@ func maybeAddOnRampDestChainConfigArgOnLocalChain( b cldf_ops.Bundle, chain evm.Chain, input changesetadapters.ConfigureChainForLanesInput, + onRampContract *orbind.OnRamp, remoteSelector uint64, remoteConfig changesetadapters.RemoteChainConfig[[]byte, string], - onRampArgs []onramp.DestChainConfigArgs, -) ([]onramp.DestChainConfigArgs, error) { + onRampArgs []orbind.OnRampDestChainConfigArgs, +) ([]orbind.OnRampDestChainConfigArgs, error) { defaultOutboundCCVs := make([]common.Address, 0, len(remoteConfig.DefaultOutboundCCVs)) for _, ccv := range remoteConfig.DefaultOutboundCCVs { defaultOutboundCCVs = append(defaultOutboundCCVs, common.HexToAddress(ccv)) @@ -430,7 +445,7 @@ func maybeAddOnRampDestChainConfigArgOnLocalChain( } onRampAddr := common.BytesToAddress(input.OnRamp) - desired := onramp.DestChainConfigArgs{ + desired := orbind.OnRampDestChainConfigArgs{ Router: common.BytesToAddress(input.Router), DestChainSelector: remoteSelector, AddressBytesLength: remoteConfig.AddressBytesLength, @@ -442,10 +457,8 @@ func maybeAddOnRampDestChainConfigArgOnLocalChain( DefaultExecutor: common.HexToAddress(remoteConfig.DefaultExecutor), OffRamp: remoteConfig.OffRamp, } - currentReport, err := cldf_ops.ExecuteOperation(b, onramp.GetDestChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: onRampAddr, - Args: remoteSelector, + currentReport, err := cldf_ops.ExecuteOperation(b, onramp.NewReadGetDestChainConfig(onRampContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return nil, fmt.Errorf("failed to get dest chain config for selector %d from OnRamp(%s) on chain %v: %w", remoteSelector, onRampAddr, chain, err) @@ -517,9 +530,9 @@ func maybeAddFeeQuoterDestChainConfigArgOnLocalChain( chain evm.Chain, remoteSelector uint64, remoteConfig changesetadapters.RemoteChainConfig[[]byte, string], - feeQuoterArgs []fee_quoter.DestChainConfigArgs, + feeQuoterArgs []fqc.FeeQuoterDestChainConfigArgs, prefetchedCur *fqc.FeeQuoterDestChainConfig, -) ([]fee_quoter.DestChainConfigArgs, error) { +) ([]fqc.FeeQuoterDestChainConfigArgs, error) { var cur fqc.FeeQuoterDestChainConfig if prefetchedCur != nil { cur = *prefetchedCur @@ -569,7 +582,7 @@ func maybeAddFeeQuoterDestChainConfigArgOnLocalChain( return feeQuoterArgs, nil } - return append(feeQuoterArgs, fee_quoter.DestChainConfigArgs{ + return append(feeQuoterArgs, fqc.FeeQuoterDestChainConfigArgs{ DestChainSelector: remoteSelector, DestChainConfig: adapterDestChainConfigToFeeQuoterV2(desired), }), nil @@ -595,11 +608,16 @@ func configureCommitteeVerifierAsSource( return nil, err } - remoteChainConfigArgs := make([]committee_verifier.RemoteChainConfigArgs, 0, len(cv.RemoteChains)) - allowlistArgs := make([]committee_verifier.AllowlistConfigArgs, 0, len(cv.RemoteChains)) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(cvAddr), chain.Client) + if err != nil { + return nil, fmt.Errorf("bind committee verifier at %s: %w", cvAddr, err) + } + + remoteChainConfigArgs := make([]cvbind.BaseVerifierRemoteChainConfigArgs, 0, len(cv.RemoteChains)) + allowlistArgs := make([]cvbind.BaseVerifierAllowlistConfigArgs, 0, len(cv.RemoteChains)) for remoteSelector, remoteConfig := range cv.RemoteChains { - desired := committee_verifier.RemoteChainConfigArgs{ + desired := cvbind.BaseVerifierRemoteChainConfigArgs{ Router: routerAddr, RemoteChainSelector: remoteSelector, AllowlistEnabled: remoteConfig.AllowlistEnabled, @@ -607,10 +625,8 @@ func configureCommitteeVerifierAsSource( GasForVerification: remoteConfig.GasForVerification, PayloadSizeBytes: remoteConfig.PayloadSizeBytes, } - currentRemoteReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetRemoteChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - Args: remoteSelector, + currentRemoteReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetRemoteChainConfig(cvContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return nil, fmt.Errorf("failed to get remote chain config for selector %d from CommitteeVerifier on chain %s: %w", remoteSelector, chain, err) @@ -620,11 +636,12 @@ func configureCommitteeVerifierAsSource( if cur.RemoteChainConfig.Router != desired.Router || cur.RemoteChainConfig.AllowlistEnabled != desired.AllowlistEnabled { remoteChainConfigArgs = append(remoteChainConfigArgs, desired) } else { - getFeeReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetFee, chain, contract.FunctionInput[committee_verifier.GetFeeArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), + getFeeReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetFee(cvContract), chain, ops2contract.FunctionInput[committee_verifier.GetFeeArgs]{ Args: committee_verifier.GetFeeArgs{ DestChainSelector: remoteSelector, + Arg1: cvbind.ClientEVM2AnyMessage{}, + Arg2: []byte{}, + RequestedFinality: [4]byte{}, }, }) if err != nil { @@ -643,11 +660,11 @@ func configureCommitteeVerifierAsSource( return nil, fmt.Errorf("invalid allowlist addresses for remote chain %d: %w", remoteSelector, err) } if len(toAdd) > 0 || len(toRemove) > 0 { - allowlistArgs = append(allowlistArgs, committee_verifier.AllowlistConfigArgs{ + allowlistArgs = append(allowlistArgs, cvbind.BaseVerifierAllowlistConfigArgs{ + DestChainSelector: remoteSelector, AllowlistEnabled: remoteConfig.AllowlistEnabled, AddedAllowlistedSenders: toAdd, RemovedAllowlistedSenders: toRemove, - DestChainSelector: remoteSelector, }) } } @@ -677,27 +694,23 @@ func configureCommitteeVerifierAsSource( var writes []contract.WriteOutput if len(remoteChainConfigArgs) > 0 { - report, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplyRemoteChainConfigUpdates, chain, contract.FunctionInput[[]committee_verifier.RemoteChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - Args: remoteChainConfigArgs, + report, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplyRemoteChainConfigUpdates(cvContract), chain, ops2contract.FunctionInput[[]cvbind.BaseVerifierRemoteChainConfigArgs]{ + Args: remoteChainConfigArgs, }) if err != nil { return nil, fmt.Errorf("failed to apply remote chain config updates to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToSeq(report.Output)) } if len(allowlistArgs) > 0 { - report, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplyAllowlistUpdates, chain, contract.FunctionInput[[]committee_verifier.AllowlistConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - Args: allowlistArgs, + report, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplyAllowlistUpdates(cvContract), chain, ops2contract.FunctionInput[[]cvbind.BaseVerifierAllowlistConfigArgs]{ + Args: allowlistArgs, }) if err != nil { return nil, fmt.Errorf("failed to apply allowlist updates to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToSeq(report.Output)) } if len(outboundArgs) > 0 { @@ -714,23 +727,18 @@ func configureCommitteeVerifierAsSource( if !cv.AllowedFinalityConfig.IsZero() { desiredFinality := cv.AllowedFinalityConfig.Raw() - currentFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetAllowedFinalityConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - }) + currentFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetAllowedFinalityConfig(cvContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get allowed finality config from CommitteeVerifier on chain %s: %w", chain, err) } if currentFinalityReport.Output != desiredFinality { - setFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.SetAllowedFinalityConfig, chain, contract.FunctionInput[[4]byte]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - Args: desiredFinality, + setFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteSetAllowedFinalityConfig(cvContract), chain, ops2contract.FunctionInput[[4]byte]{ + Args: desiredFinality, }) if err != nil { return nil, fmt.Errorf("failed to set allowed finality config on CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, setFinalityReport.Output) + writes = append(writes, writeOutputOps2ToSeq(setFinalityReport.Output)) } } @@ -754,21 +762,24 @@ func configureCommitteeVerifierAsDest( return nil, err } - signatureConfigs := make([]committee_verifier.SignatureConfig, 0, len(cv.RemoteChains)) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(cvAddr), chain.Client) + if err != nil { + return nil, fmt.Errorf("bind committee verifier at %s: %w", cvAddr, err) + } + + signatureConfigs := make([]cvbind.SignatureQuorumValidatorSignatureConfig, 0, len(cv.RemoteChains)) for remoteSelector, remoteConfig := range cv.RemoteChains { signers := make([]common.Address, 0, len(remoteConfig.SignatureConfig.Signers)) for _, signer := range remoteConfig.SignatureConfig.Signers { signers = append(signers, common.HexToAddress(signer)) } - desired := committee_verifier.SignatureConfig{ + desired := cvbind.SignatureQuorumValidatorSignatureConfig{ SourceChainSelector: remoteSelector, Threshold: remoteConfig.SignatureConfig.Threshold, Signers: signers, } - currentSigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetSignatureConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - Args: remoteSelector, + currentSigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetSignatureConfig(cvContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return nil, fmt.Errorf("failed to get signature config for selector %d from CommitteeVerifier on chain %s: %w", remoteSelector, chain, err) @@ -782,23 +793,19 @@ func configureCommitteeVerifierAsDest( var writes []contract.WriteOutput if len(signatureConfigs) > 0 { - report, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplySignatureConfigs, chain, contract.FunctionInput[committee_verifier.ApplySignatureConfigsArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), + report, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplySignatureConfigs(cvContract), chain, ops2contract.FunctionInput[committee_verifier.ApplySignatureConfigsArgs]{ Args: committee_verifier.ApplySignatureConfigsArgs{ - SignatureConfigs: signatureConfigs, + SourceChainSelectorsToRemove: []uint64{}, + SignatureConfigs: signatureConfigs, }, }) if err != nil { return nil, fmt.Errorf("failed to apply signature configs to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToSeq(report.Output)) } - versionTagReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.VersionTag, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(cvAddr), - }) + versionTagReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadVersionTag(cvContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get version tag from CommitteeVerifier on chain %s: %w", chain, err) } @@ -835,8 +842,8 @@ func configureCommitteeVerifierAsDest( return writes, nil } -func adapterDestChainConfigToFeeQuoterV2(cfg changesetadapters.FeeQuoterDestChainConfig) fee_quoter.DestChainConfig { - return fee_quoter.DestChainConfig{ +func adapterDestChainConfigToFeeQuoterV2(cfg changesetadapters.FeeQuoterDestChainConfig) fqc.FeeQuoterDestChainConfig { + return fqc.FeeQuoterDestChainConfig{ IsEnabled: cfg.IsEnabled, MaxDataBytes: cfg.MaxDataBytes, MaxPerMsgGasLimit: cfg.MaxPerMsgGasLimit, diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes_test.go b/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes_test.go index bd94868efd..e92d322354 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_chain_for_lanes_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" cldfevm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" @@ -26,6 +27,11 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/testsetup" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" + fqc "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" changesetadapters "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" ) @@ -33,6 +39,31 @@ var evmFamilySelector = [4]byte{0x28, 0x12, 0xd5, 0x2c} func boolPtr(v bool) *bool { return &v } +func bindLaneContracts( + t *testing.T, + evmChain cldfevm.Chain, + local deployedContracts, +) ( + offbind.OffRampInterface, + orbind.OnRampInterface, + execbind.ExecutorInterface, + fqc.FeeQuoterInterface, + cvbind.CommitteeVerifierInterface, +) { + t.Helper() + offRampContract, err := offbind.NewOffRamp(common.HexToAddress(local.offRamp), evmChain.Client) + require.NoError(t, err) + onRampContract, err := orbind.NewOnRamp(common.HexToAddress(local.onRamp), evmChain.Client) + require.NoError(t, err) + execContract, err := execbind.NewExecutor(common.HexToAddress(local.executor), evmChain.Client) + require.NoError(t, err) + fqContract, err := fqc.NewFeeQuoter(common.HexToAddress(local.feeQuoter), evmChain.Client) + require.NoError(t, err) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(local.committeeVerifier), evmChain.Client) + require.NoError(t, err) + return offRampContract, onRampContract, execContract, fqContract, cvContract +} + type deployedContracts struct { router string onRamp string @@ -165,6 +196,8 @@ func assertOnChainState( ) { t.Helper() + offRampContract, onRampContract, execContract, fqContract, cvContract := bindLaneContracts(t, evmChain, local) + onRampOnRouter, err := operations.ExecuteOperation(b, router.GetOnRamp, evmChain, contract.FunctionInput[uint64]{ ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.router), Args: remoteChainSelector, }) @@ -178,9 +211,7 @@ func assertOnChainState( require.Len(t, offRampsOnRouter.Output, 1) assert.Equal(t, local.offRamp, offRampsOnRouter.Output[0].OffRamp.Hex()) - srcCfg, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteChainSelector, - }) + srcCfg, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.True(t, srcCfg.Output.IsEnabled) assert.Equal(t, local.router, srcCfg.Output.Router.Hex()) @@ -189,9 +220,7 @@ func assertOnChainState( assert.Len(t, srcCfg.Output.DefaultCCVs, 1) assert.Equal(t, local.committeeVerifier, srcCfg.Output.DefaultCCVs[0].Hex()) - destCfg, err := operations.ExecuteOperation(b, onramp.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.onRamp), Args: remoteChainSelector, - }) + destCfg, err := operations.ExecuteOperation(b, onramp.NewReadGetDestChainConfig(onRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.Equal(t, local.router, destCfg.Output.Router.Hex()) assert.Equal(t, common.HexToAddress(remote.offRamp).Bytes(), destCfg.Output.OffRamp) @@ -199,18 +228,14 @@ func assertOnChainState( assert.Len(t, destCfg.Output.DefaultCCVs, 1) assert.Equal(t, local.committeeVerifier, destCfg.Output.DefaultCCVs[0].Hex()) - executorDestChains, err := operations.ExecuteOperation(b, executor.GetDestChains, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.executor), - }) + executorDestChains, err := operations.ExecuteOperation(b, executor.NewReadGetDestChains(execContract), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) require.Len(t, executorDestChains.Output, 1) assert.Equal(t, remoteChainSelector, executorDestChains.Output[0].DestChainSelector) assert.Equal(t, uint16(50), executorDestChains.Output[0].Config.UsdCentsFee) assert.True(t, executorDestChains.Output[0].Config.Enabled) - fqDestCfg, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteChainSelector, - }) + fqDestCfg, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.True(t, fqDestCfg.Output.IsEnabled) assert.Equal(t, uint32(30_000), fqDestCfg.Output.MaxDataBytes) @@ -218,9 +243,7 @@ func assertOnChainState( assert.Equal(t, uint32(300_000), fqDestCfg.Output.DestGasOverhead) assert.Equal(t, evmFamilySelector, fqDestCfg.Output.ChainFamilySelector) - verifierRemoteCfg, err := operations.ExecuteOperation(b, committee_verifier.GetRemoteChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.committeeVerifier), Args: remoteChainSelector, - }) + verifierRemoteCfg, err := operations.ExecuteOperation(b, committee_verifier.NewReadGetRemoteChainConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.Equal(t, local.router, verifierRemoteCfg.Output.RemoteChainConfig.Router.Hex()) assert.False(t, verifierRemoteCfg.Output.RemoteChainConfig.AllowlistEnabled) @@ -387,19 +410,16 @@ func captureLaneState( ) laneSnapshot { t.Helper() var s laneSnapshot + offRampContract, onRampContract, execContract, fqContract, cvContract := bindLaneContracts(t, evmChain, local) - srcCfg, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteSelector, - }) + srcCfg, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) s.offRampSourceEnabled = srcCfg.Output.IsEnabled s.offRampRouter = srcCfg.Output.Router.Hex() s.offRampOnRamps = srcCfg.Output.OnRamps s.offRampDefaultCCVs = srcCfg.Output.DefaultCCVs - destCfg, err := operations.ExecuteOperation(b, onramp.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.onRamp), Args: remoteSelector, - }) + destCfg, err := operations.ExecuteOperation(b, onramp.NewReadGetDestChainConfig(onRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) s.onRampDestRouter = destCfg.Output.Router.Hex() s.onRampOffRamp = destCfg.Output.OffRamp @@ -411,9 +431,7 @@ func captureLaneState( s.onRampTokenFeeUSD = destCfg.Output.TokenNetworkFeeUSDCents s.onRampTokenReceiver = destCfg.Output.TokenReceiverAllowed - fqCfg, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteSelector, - }) + fqCfg, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) s.feeQuoterEnabled = fqCfg.Output.IsEnabled s.feeQuoterMaxData = fqCfg.Output.MaxDataBytes @@ -427,9 +445,7 @@ func captureLaneState( s.feeQuoterDefTxGas = fqCfg.Output.DefaultTxGasLimit s.feeQuoterGasPerByte = fqCfg.Output.DestGasPerPayloadByteBase - executorDestChains, err := operations.ExecuteOperation(b, executor.GetDestChains, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.executor), - }) + executorDestChains, err := operations.ExecuteOperation(b, executor.NewReadGetDestChains(execContract), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) for _, dc := range executorDestChains.Output { if dc.DestChainSelector == remoteSelector { @@ -439,16 +455,13 @@ func captureLaneState( } } - verifierCfg, err := operations.ExecuteOperation(b, committee_verifier.GetRemoteChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.committeeVerifier), Args: remoteSelector, - }) + verifierCfg, err := operations.ExecuteOperation(b, committee_verifier.NewReadGetRemoteChainConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) s.verifierRouter = verifierCfg.Output.RemoteChainConfig.Router.Hex() s.verifierAllowlistEnabled = verifierCfg.Output.RemoteChainConfig.AllowlistEnabled s.verifierAllowedSenders = verifierCfg.Output.AllowedSendersList - verifierFee, err := operations.ExecuteOperation(b, committee_verifier.GetFee, evmChain, contract.FunctionInput[committee_verifier.GetFeeArgs]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.committeeVerifier), + verifierFee, err := operations.ExecuteOperation(b, committee_verifier.NewReadGetFee(cvContract), evmChain, ops2contract.FunctionInput[committee_verifier.GetFeeArgs]{ Args: committee_verifier.GetFeeArgs{DestChainSelector: remoteSelector}, }) require.NoError(t, err) @@ -456,9 +469,7 @@ func captureLaneState( s.verifierGasForVerify = verifierFee.Output.GasForVerification s.verifierPayloadSize = verifierFee.Output.PayloadSizeBytes - sigCfg, err := operations.ExecuteOperation(b, committee_verifier.GetSignatureConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.committeeVerifier), Args: remoteSelector, - }) + sigCfg, err := operations.ExecuteOperation(b, committee_verifier.NewReadGetSignatureConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) s.verifierSigners = sigCfg.Output.Signers s.verifierThreshold = sigCfg.Output.Threshold @@ -589,29 +600,23 @@ func TestConfigureChainForLanes_ConfiguresMultipleRemoteChainsInSingleCall(t *te require.NoError(t, err) assert.Len(t, offRampsOnRouter.Output, 2) + offRampContract, _, _, fqContract, _ := bindLaneContracts(t, evmChain, local) for _, remoteSelector := range []uint64{remoteA, remoteB} { - srcCfg, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteSelector, - }) + srcCfg, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.True(t, srcCfg.Output.IsEnabled, "source chain config for %d should be enabled", remoteSelector) } - fqDestA, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteA, - }) + fqDestA, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteA}) require.NoError(t, err) assert.Equal(t, uint32(30_000), fqDestA.Output.MaxDataBytes) - fqDestB, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteB, - }) + fqDestB, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteB}) require.NoError(t, err) assert.Equal(t, uint32(50_000), fqDestB.Output.MaxDataBytes) - executorDestChains, err := operations.ExecuteOperation(b, executor.GetDestChains, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.executor), - }) + _, _, execContract, _, _ := bindLaneContracts(t, evmChain, local) + executorDestChains, err := operations.ExecuteOperation(b, executor.NewReadGetDestChains(execContract), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err) assert.Len(t, executorDestChains.Output, 2) } @@ -826,10 +831,9 @@ func TestConfigureChainForLanes_OverrideExistingFeeQuoterConfig(t *testing.T) { evmChain := e.BlockChains.EVMChains()[chainSelector] b := testsetup.BundleWithFreshReporter(e.OperationsBundle) + _, _, _, fqContract, _ := bindLaneContracts(t, evmChain, local) - fqBefore, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteSelector, - }) + fqBefore, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, uint32(30_000), fqBefore.Output.MaxDataBytes) @@ -846,9 +850,7 @@ func TestConfigureChainForLanes_OverrideExistingFeeQuoterConfig(t *testing.T) { require.NoError(t, err) b = testsetup.BundleWithFreshReporter(e.OperationsBundle) - fqAfterNoOverride, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteSelector, - }) + fqAfterNoOverride, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, uint32(30_000), fqAfterNoOverride.Output.MaxDataBytes, "with OverrideExistingConfig=false, an already-enabled FeeQuoter config should not be updated") @@ -866,9 +868,7 @@ func TestConfigureChainForLanes_OverrideExistingFeeQuoterConfig(t *testing.T) { require.NoError(t, err) b = testsetup.BundleWithFreshReporter(e.OperationsBundle) - fqAfterOverride, err := operations.ExecuteOperation(b, fee_quoter.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteSelector, - }) + fqAfterOverride, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestChainConfig(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, uint32(99_000), fqAfterOverride.Output.MaxDataBytes, "with OverrideExistingConfig=true, FeeQuoter config should be updated") @@ -931,23 +931,18 @@ func TestConfigureChainForLanes_TestRouterSetup(t *testing.T) { assert.Empty(t, offRampsOnProdRouter.Output, "production Router should NOT have OffRamps wired") - srcCfg, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(localWithTest.offRamp), Args: remoteSelector, - }) + offRampContract, onRampContract, _, _, cvContract := bindLaneContracts(t, evmChain, localWithTest.deployedContracts) + srcCfg, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, localWithTest.testRouter, srcCfg.Output.Router.Hex(), "OffRamp source config should reference the TestRouter") - destCfg, err := operations.ExecuteOperation(b, onramp.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(localWithTest.onRamp), Args: remoteSelector, - }) + destCfg, err := operations.ExecuteOperation(b, onramp.NewReadGetDestChainConfig(onRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, localWithTest.testRouter, destCfg.Output.Router.Hex(), "OnRamp dest config should reference the TestRouter") - verifierCfg, err := operations.ExecuteOperation(b, committee_verifier.GetRemoteChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(localWithTest.committeeVerifier), Args: remoteSelector, - }) + verifierCfg, err := operations.ExecuteOperation(b, committee_verifier.NewReadGetRemoteChainConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteSelector}) require.NoError(t, err) assert.Equal(t, localWithTest.testRouter, verifierCfg.Output.RemoteChainConfig.Router.Hex(), "CommitteeVerifier remote config should reference the TestRouter") @@ -978,10 +973,9 @@ func TestConfigureChainForLanes_AllowTrafficFromFalseDisablesTraffic(t *testing. evmChain := e.BlockChains.EVMChains()[chainSelector] b := testsetup.BundleWithFreshReporter(e.OperationsBundle) + offRampContract, _, _, _, _ := bindLaneContracts(t, evmChain, local) - srcCfgEnabled, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteChainSelector, - }) + srcCfgEnabled, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) require.True(t, srcCfgEnabled.Output.IsEnabled, "traffic should be enabled after first run") @@ -997,9 +991,7 @@ func TestConfigureChainForLanes_AllowTrafficFromFalseDisablesTraffic(t *testing. require.NoError(t, err) b = testsetup.BundleWithFreshReporter(e.OperationsBundle) - srcCfgDisabled, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteChainSelector, - }) + srcCfgDisabled, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.False(t, srcCfgDisabled.Output.IsEnabled, "AllowTrafficFrom=false should disable traffic on the OffRamp source config") @@ -1030,10 +1022,9 @@ func TestConfigureChainForLanes_AllowTrafficFromFalseToTrueEnablesTraffic(t *tes evmChain := e.BlockChains.EVMChains()[chainSelector] b := testsetup.BundleWithFreshReporter(e.OperationsBundle) + offRampContract, _, _, _, _ := bindLaneContracts(t, evmChain, local) - srcCfgDisabled, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteChainSelector, - }) + srcCfgDisabled, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) require.False(t, srcCfgDisabled.Output.IsEnabled, "traffic should be disabled after first run") @@ -1046,9 +1037,7 @@ func TestConfigureChainForLanes_AllowTrafficFromFalseToTrueEnablesTraffic(t *tes require.NoError(t, err) b = testsetup.BundleWithFreshReporter(e.OperationsBundle) - srcCfgEnabled, err := operations.ExecuteOperation(b, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.offRamp), Args: remoteChainSelector, - }) + srcCfgEnabled, err := operations.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.True(t, srcCfgEnabled.Output.IsEnabled, "AllowTrafficFrom=true should re-enable traffic on the OffRamp source config") @@ -1199,10 +1188,9 @@ func TestConfigureChainForLanes_GasPriceUpdateSkippedWhenAlreadySet(t *testing.T evmChain := e.BlockChains.EVMChains()[chainSelector] b := testsetup.BundleWithFreshReporter(e.OperationsBundle) + _, _, _, fqContract, _ := bindLaneContracts(t, evmChain, local) - gasPrice, err := operations.ExecuteOperation(b, fee_quoter.GetDestinationChainGasPrice, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, Address: common.HexToAddress(local.feeQuoter), Args: remoteChainSelector, - }) + gasPrice, err := operations.ExecuteOperation(b, fee_quoter.NewReadGetDestinationChainGasPrice(fqContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err) assert.Equal(t, big.NewInt(42_000), gasPrice.Output.Value, "gas price should be 42000 after first run") diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes.go b/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes.go index 93710fd1b8..b2f637f23c 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes.go @@ -11,11 +11,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/committee_verifier" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" ) type ConfigureCommitteeVerifierAsSourceInput struct { @@ -72,11 +74,16 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( return sequences.OnChainOutput{}, err } - remoteChainConfigArgs := make([]committee_verifier.RemoteChainConfigArgs, 0, len(input.RemoteChains)) - allowlistArgs := make([]committee_verifier.AllowlistConfigArgs, 0, len(input.RemoteChains)) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(committeeVerifier), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind committee verifier: %w", err) + } + + remoteChainConfigArgs := make([]cvbind.BaseVerifierRemoteChainConfigArgs, 0, len(input.RemoteChains)) + allowlistArgs := make([]cvbind.BaseVerifierAllowlistConfigArgs, 0, len(input.RemoteChains)) for remoteSelector, remoteConfig := range input.RemoteChains { - desiredRemoteChainArg := committee_verifier.RemoteChainConfigArgs{ + desiredRemoteChainArg := cvbind.BaseVerifierRemoteChainConfigArgs{ Router: common.HexToAddress(input.Router), RemoteChainSelector: remoteSelector, AllowlistEnabled: remoteConfig.AllowlistEnabled, @@ -85,10 +92,8 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( // TODO : standardise payload size PayloadSizeBytes: remoteConfig.PayloadSizeBytes, } - currentRemoteReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetRemoteChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - Args: remoteSelector, + currentRemoteReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetRemoteChainConfig(cvContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote chain config for selector %d from CommitteeVerifier on chain %s: %w", remoteSelector, chain, err) @@ -99,11 +104,12 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( currRemote.RemoteChainConfig.AllowlistEnabled != desiredRemoteChainArg.AllowlistEnabled { remoteChainConfigArgs = append(remoteChainConfigArgs, desiredRemoteChainArg) } else { - getFeeReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetFee, chain, contract.FunctionInput[committee_verifier.GetFeeArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), + getFeeReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetFee(cvContract), chain, ops2contract.FunctionInput[committee_verifier.GetFeeArgs]{ Args: committee_verifier.GetFeeArgs{ DestChainSelector: remoteSelector, + Arg1: cvbind.ClientEVM2AnyMessage{}, + Arg2: []byte{}, + RequestedFinality: [4]byte{}, }, }) if err != nil { @@ -123,11 +129,11 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("invalid allowlist addresses for remote chain %d: %w", remoteSelector, err) } if len(toAdd) > 0 || len(toRemove) > 0 { - allowlistArgs = append(allowlistArgs, committee_verifier.AllowlistConfigArgs{ + allowlistArgs = append(allowlistArgs, cvbind.BaseVerifierAllowlistConfigArgs{ + DestChainSelector: remoteSelector, AllowlistEnabled: remoteConfig.AllowlistEnabled, AddedAllowlistedSenders: toAdd, RemovedAllowlistedSenders: toRemove, - DestChainSelector: remoteSelector, }) } } @@ -156,27 +162,23 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( } if len(remoteChainConfigArgs) > 0 { - committeeVerifierReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplyRemoteChainConfigUpdates, chain, contract.FunctionInput[[]committee_verifier.RemoteChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - Args: remoteChainConfigArgs, + committeeVerifierReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplyRemoteChainConfigUpdates(cvContract), chain, ops2contract.FunctionInput[[]cvbind.BaseVerifierRemoteChainConfigArgs]{ + Args: remoteChainConfigArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply remote chain config updates to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, committeeVerifierReport.Output) + writes = append(writes, writeOutputOps2ToSeq(committeeVerifierReport.Output)) } if len(allowlistArgs) > 0 { - committeeVerifierAllowlistReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplyAllowlistUpdates, chain, contract.FunctionInput[[]committee_verifier.AllowlistConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - Args: allowlistArgs, + committeeVerifierAllowlistReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplyAllowlistUpdates(cvContract), chain, ops2contract.FunctionInput[[]cvbind.BaseVerifierAllowlistConfigArgs]{ + Args: allowlistArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply allowlist updates to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, committeeVerifierAllowlistReport.Output) + writes = append(writes, writeOutputOps2ToSeq(committeeVerifierAllowlistReport.Output)) } if len(outboundImplementationArgs) > 0 { @@ -193,23 +195,18 @@ var ConfigureCommitteeVerifierAsSource = cldf_ops.NewSequence( if !input.AllowedFinalityConfig.IsZero() { desiredFinality := input.AllowedFinalityConfig.Raw() - currentFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetAllowedFinalityConfig, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - }) + currentFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetAllowedFinalityConfig(cvContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get allowed finality config from CommitteeVerifier on chain %s: %w", chain, err) } if currentFinalityReport.Output != desiredFinality { - setFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.SetAllowedFinalityConfig, chain, contract.FunctionInput[[4]byte]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - Args: desiredFinality, + setFinalityReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteSetAllowedFinalityConfig(cvContract), chain, ops2contract.FunctionInput[[4]byte]{ + Args: desiredFinality, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set allowed finality config on CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, setFinalityReport.Output) + writes = append(writes, writeOutputOps2ToSeq(setFinalityReport.Output)) } } @@ -242,22 +239,25 @@ var ConfigureCommitteeVerifierAsDest = cldf_ops.NewSequence( return sequences.OnChainOutput{}, err } - signatureConfigs := make([]committee_verifier.SignatureConfig, 0, len(input.RemoteChains)) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(committeeVerifier), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind committee verifier: %w", err) + } + + signatureConfigs := make([]cvbind.SignatureQuorumValidatorSignatureConfig, 0, len(input.RemoteChains)) for remoteSelector, remoteConfig := range input.RemoteChains { signers := make([]common.Address, 0, len(remoteConfig.SignatureConfig.Signers)) for _, signer := range remoteConfig.SignatureConfig.Signers { signers = append(signers, common.HexToAddress(signer)) } - desiredSig := committee_verifier.SignatureConfig{ + desiredSig := cvbind.SignatureQuorumValidatorSignatureConfig{ SourceChainSelector: remoteSelector, Threshold: remoteConfig.SignatureConfig.Threshold, Signers: signers, } - currentSigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetSignatureConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - Args: remoteSelector, + currentSigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetSignatureConfig(cvContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get signature config for selector %d from CommitteeVerifier on chain %s: %w", remoteSelector, chain, err) @@ -269,24 +269,20 @@ var ConfigureCommitteeVerifierAsDest = cldf_ops.NewSequence( } if len(signatureConfigs) > 0 { - signatureConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.ApplySignatureConfigs, chain, contract.FunctionInput[committee_verifier.ApplySignatureConfigsArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), + signatureConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteApplySignatureConfigs(cvContract), chain, ops2contract.FunctionInput[committee_verifier.ApplySignatureConfigsArgs]{ Args: committee_verifier.ApplySignatureConfigsArgs{ - SignatureConfigs: signatureConfigs, + SourceChainSelectorsToRemove: []uint64{}, + SignatureConfigs: signatureConfigs, }, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply signature configs to CommitteeVerifier on chain %s: %w", chain, err) } - writes = append(writes, signatureConfigReport.Output) + writes = append(writes, writeOutputOps2ToSeq(signatureConfigReport.Output)) } // Apply inbound implementation updates on CommitteeVerifierResolver only when not already set (idempotent). - committeeVerifierVersionTagReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.VersionTag, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifier), - }) + committeeVerifierVersionTagReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadVersionTag(cvContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get version tag from CommitteeVerifier on chain %s: %w", chain, err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes_test.go b/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes_test.go index eedcbc972f..f0629f2cfd 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_committee_verifier_for_lanes_test.go @@ -13,9 +13,10 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" changesetadapters "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" @@ -200,17 +201,15 @@ func TestConfigureCommitteeVerifierAsSource(t *testing.T) { require.NoError(t, err, "ExecuteSequence should not error") require.Len(t, configureReport.Output.BatchOps, 1, "Expected 1 batch operation in output") + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(input.CommitteeVerifier[0].Address), evmChain.Client) + require.NoError(t, err) for remoteSelector, remoteConfig := range input.RemoteChains { // Check remote chain config on CommitteeVerifier remoteChainConfigReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - committee_verifier.GetRemoteChainConfig, + committee_verifier.NewReadGetRemoteChainConfig(cvContract), evmChain, - contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(input.CommitteeVerifier[0].Address), - Args: remoteSelector, - }, + ops2contract.FunctionInput[uint64]{Args: remoteSelector}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, common.HexToAddress(input.Router), remoteChainConfigReport.Output.RemoteChainConfig.Router, "Router in remote chain config should match") @@ -357,17 +356,15 @@ func TestConfigureCommitteeVerifierAsDest(t *testing.T) { require.NoError(t, err, "ExecuteSequence should not error") require.Len(t, configureReport.Output.BatchOps, 1, "Expected 1 batch operation in output") + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(input.CommitteeVerifier[0].Address), evmChain.Client) + require.NoError(t, err) for remoteSelector, remoteConfig := range input.RemoteChains { // Check signature config on CommitteeVerifier signatureConfigReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - committee_verifier.GetSignatureConfig, + committee_verifier.NewReadGetSignatureConfig(cvContract), evmChain, - contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(input.CommitteeVerifier[0].Address), - Args: remoteSelector, - }, + ops2contract.FunctionInput[uint64]{Args: remoteSelector}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, remoteConfig.SignatureConfig.Threshold, signatureConfigReport.Output.Threshold, "Threshold should match") @@ -385,12 +382,9 @@ func TestConfigureCommitteeVerifierAsDest(t *testing.T) { require.NoError(t, err, "Failed to instantiate VersionedVerifierResolver") versionTagReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - committee_verifier.VersionTag, + committee_verifier.NewReadVersionTag(cvContract), evmChain, - contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(input.CommitteeVerifier[0].Address), - }, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") inboundImpl, err := boundResolver.GetInboundImplementation( diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg.go b/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg.go index f5f4557eb0..6128cf0f65 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg.go @@ -13,6 +13,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -25,11 +26,25 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/proxy" + onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" fqc "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" + proxybind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/proxy" ) +func writeOutputOps2ToSeqContract(w ops2contract.WriteOutput) contract.WriteOutput { + var ei *contract.ExecInfo + if w.ExecInfo != nil { + ei = &contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + // Deprecated: Use ConfigureChainForLanes from the ChainFamilyAdapter instead this is the canonical way to configure lanes for 2.0 var ConfigureLaneLegAsSource = cldf_ops.NewSequence( "ConfigureLaneLegAsSource", @@ -49,41 +64,45 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence( sourceFeeQuoter := common.BytesToAddress(input.Source.FeeQuoter).Hex() remoteSelector := input.Dest.Selector + onRampContract, err := orbind.NewOnRamp(common.HexToAddress(sourceOnRamp), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind on ramp at %s on chain %s: %w", sourceOnRamp, chain.String(), err) + } + sourceChain := input.Source destChain := input.Dest // Apply OnRamp dest chain configs (only entries that differ from on-chain). - onRampArgs := make([]onramp.DestChainConfigArgs, 0, 1) - onRampArgs, err := maybeAddOnRampDestChainConfigArg(b, chain, input, onRampArgs) + onRampArgs := make([]orbind.OnRampDestChainConfigArgs, 0, 1) + onRampArgs, err = maybeAddOnRampDestChainConfigArg(b, chain, input, onRampContract, onRampArgs) if err != nil { return sequences.OnChainOutput{}, err } if len(onRampArgs) > 0 { - onRampReport, err := cldf_ops.ExecuteOperation(b, onramp.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]onramp.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(sourceOnRamp), - Args: onRampArgs, + onRampReport, err := cldf_ops.ExecuteOperation(b, onrampops.NewWriteApplyDestChainConfigUpdates(onRampContract), chain, ops2contract.FunctionInput[[]orbind.OnRampDestChainConfigArgs]{ + Args: onRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply dest chain config updates to OnRamp(%s) on chain %s: %w", sourceOnRamp, chain, err) } - writes = append(writes, onRampReport.Output) + writes = append(writes, writeOutputOps2ToSeqContract(onRampReport.Output)) } // Apply Executor dest chain updates (only chains that need to be added/updated). destChainSelectorsPerExecutor := make(map[common.Address][]ExecutorRemoteChainConfigArgs) defaultExecutor := common.HexToAddress(sourceChain.DefaultExecutor.Address) - getTargetReport, err := cldf_ops.ExecuteOperation(b, proxy.GetTarget, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: defaultExecutor, - }) + execProxyContract, err := proxybind.NewProxy(defaultExecutor, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind executor proxy at %s on chain %s: %w", defaultExecutor.Hex(), chain.String(), err) + } + executorImpl, err := execProxyContract.GetTarget(&bind.CallOpts{Context: b.GetContext()}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get target address of Executor(%s) on chain %s: %w", defaultExecutor, chain, err) } - if destChainSelectorsPerExecutor[getTargetReport.Output] == nil { - destChainSelectorsPerExecutor[getTargetReport.Output] = []ExecutorRemoteChainConfigArgs{} + if destChainSelectorsPerExecutor[executorImpl] == nil { + destChainSelectorsPerExecutor[executorImpl] = []ExecutorRemoteChainConfigArgs{} } - destChainSelectorsPerExecutor[getTargetReport.Output] = append(destChainSelectorsPerExecutor[getTargetReport.Output], ExecutorRemoteChainConfigArgs{ + destChainSelectorsPerExecutor[executorImpl] = append(destChainSelectorsPerExecutor[executorImpl], ExecutorRemoteChainConfigArgs{ DestChainSelector: remoteSelector, Config: changesetadapters.ExecutorDestChainConfig(destChain.ExecutorDestChainConfig), }) @@ -114,7 +133,7 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("failed to bind fee quoter contract at address %s on chain %s: %w", sourceFeeQuoter, chain.String(), err) } - feeQuoterArgs := make([]fee_quoter.DestChainConfigArgs, 0, 1) + feeQuoterArgs := make([]fqc.FeeQuoterDestChainConfigArgs, 0, 1) if !destChain.FeeQuoterDestChainConfig.OverrideExistingConfig { destChainCfg, err := feeQContract.GetDestChainConfig(&bind.CallOpts{ Context: b.GetContext(), @@ -137,47 +156,41 @@ var ConfigureLaneLegAsSource = cldf_ops.NewSequence( } } if len(feeQuoterArgs) > 0 { - feeQuoterReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.ApplyDestChainConfigUpdates, chain, contract.FunctionInput[[]fee_quoter.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(sourceFeeQuoter), - Args: feeQuoterArgs, + feeQuoterReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewWriteApplyDestChainConfigUpdates(feeQContract), chain, ops2contract.FunctionInput[[]fqc.FeeQuoterDestChainConfigArgs]{ + Args: feeQuoterArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply dest chain config updates to FeeQuoter(%s) on chain %s: %w", sourceFeeQuoter, chain, err) } - writes = append(writes, feeQuoterReport.Output) + writes = append(writes, writeOutputOps2ToSeqContract(feeQuoterReport.Output)) } // UpdatePrices on FeeQuoter (gas prices only, as these are per dest chain) - gasPriceUpdates := make([]fee_quoter.GasPriceUpdate, 0, 1) + gasPriceUpdates := make([]fqc.InternalGasPriceUpdate, 0, 1) if destChain.FeeQuoterDestChainConfig.V2Params != nil && destChain.FeeQuoterDestChainConfig.V2Params.USDPerUnitGas != nil { - gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.GetDestinationChainGasPrice, chain, contract.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(sourceFeeQuoter), - Args: remoteSelector, + gasPriceReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewReadGetDestinationChainGasPrice(feeQContract), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get gas prices on FeeQuoter(%s) on chain %s: %w", sourceFeeQuoter, chain, err) } if destChain.FeeQuoterDestChainConfig.V2Params.USDPerUnitGas.Cmp(gasPriceReport.Output.Value) != 0 { - gasPriceUpdates = append(gasPriceUpdates, fee_quoter.GasPriceUpdate{ + gasPriceUpdates = append(gasPriceUpdates, fqc.InternalGasPriceUpdate{ DestChainSelector: remoteSelector, UsdPerUnitGas: destChain.FeeQuoterDestChainConfig.V2Params.USDPerUnitGas, }) } } if len(gasPriceUpdates) > 0 { - feeQuoterUpdatePricesReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.UpdatePrices, chain, contract.FunctionInput[fee_quoter.PriceUpdates]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(sourceFeeQuoter), - Args: fee_quoter.PriceUpdates{ + feeQuoterUpdatePricesReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewWriteUpdatePrices(feeQContract), chain, ops2contract.FunctionInput[fqc.InternalPriceUpdates]{ + Args: fqc.InternalPriceUpdates{ GasPriceUpdates: gasPriceUpdates, }, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to update gas prices on FeeQuoter(%s) on chain %s: %w", sourceFeeQuoter, chain, err) } - writes = append(writes, feeQuoterUpdatePricesReport.Output) + writes = append(writes, writeOutputOps2ToSeqContract(feeQuoterUpdatePricesReport.Output)) } // Apply Router ramp updates (only when there are changes). @@ -247,22 +260,25 @@ var ConfigureLaneLegAsDest = cldf_ops.NewSequence( destRouter := common.BytesToAddress(destChain.Router).Hex() destOffRamp := common.BytesToAddress(destChain.OffRamp).Hex() + offRampContract, err := offbind.NewOffRamp(common.HexToAddress(destOffRamp), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind off ramp at %s on chain %s: %w", destOffRamp, chain.String(), err) + } + // Apply OffRamp source chain configs (only entries that differ from on-chain). - offRampArgs := make([]offramp.SourceChainConfigArgs, 0, 1) - offRampArgs, err := maybeAddSourceChainConfigArg(b, chain, input, offRampArgs) + offRampArgs := make([]offbind.OffRampSourceChainConfigArgs, 0, 1) + offRampArgs, err = maybeAddSourceChainConfigArg(b, chain, input, offRampContract, offRampArgs) if err != nil { return sequences.OnChainOutput{}, err } if len(offRampArgs) > 0 { - offRampReport, err := cldf_ops.ExecuteOperation(b, offramp.ApplySourceChainConfigUpdates, chain, contract.FunctionInput[[]offramp.SourceChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(destOffRamp), - Args: offRampArgs, + offRampReport, err := cldf_ops.ExecuteOperation(b, offramp.NewWriteApplySourceChainConfigUpdates(offRampContract), chain, ops2contract.FunctionInput[[]offbind.OffRampSourceChainConfigArgs]{ + Args: offRampArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply source chain config updates to OffRamp(%s) on chain %s: %w", destOffRamp, chain, err) } - writes = append(writes, offRampReport.Output) + writes = append(writes, writeOutputOps2ToSeqContract(offRampReport.Output)) } // Apply Router ramp updates (only when there are changes). @@ -321,7 +337,7 @@ var ConfigureLaneLegAsDest = cldf_ops.NewSequence( // maybeAddSourceChainConfigArg fetches current OffRamp source chain config, builds desired arg from input, // and appends to offRampArgs only when the lane is enabled and config differs (idempotent). -func maybeAddSourceChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lanes.UpdateLanesInput, offRampArgs []offramp.SourceChainConfigArgs) ([]offramp.SourceChainConfigArgs, error) { +func maybeAddSourceChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lanes.UpdateLanesInput, offRampContract *offbind.OffRamp, offRampArgs []offbind.OffRampSourceChainConfigArgs) ([]offbind.OffRampSourceChainConfigArgs, error) { defaultInboundCCVs := make([]common.Address, 0, len(input.Dest.DefaultInboundCCVs)) for _, ccv := range input.Dest.DefaultInboundCCVs { defaultInboundCCVs = append(defaultInboundCCVs, common.HexToAddress(ccv.Address)) @@ -333,7 +349,7 @@ func maybeAddSourceChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lane // always include the default onramp as well // TODO: might need to support multiple onramps in the future onRamps := [][]byte{common.LeftPadBytes(input.Source.OnRamp, 32)} - desiredOffRampArg := offramp.SourceChainConfigArgs{ + desiredOffRampArg := offbind.OffRampSourceChainConfigArgs{ Router: common.BytesToAddress(input.Dest.Router), SourceChainSelector: input.Source.Selector, IsEnabled: !input.IsDisabled, @@ -341,10 +357,8 @@ func maybeAddSourceChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lane DefaultCCVs: defaultInboundCCVs, LaneMandatedCCVs: laneMandatedInboundCCVs, } - offRampCurrentReport, err := cldf_ops.ExecuteOperation(b, offramp.GetSourceChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: input.Dest.Selector, - Address: common.BytesToAddress(input.Dest.OffRamp), - Args: input.Source.Selector, + offRampCurrentReport, err := cldf_ops.ExecuteOperation(b, offramp.NewReadGetSourceChainConfig(offRampContract), chain, ops2contract.FunctionInput[uint64]{ + Args: input.Source.Selector, }) if err != nil { return nil, fmt.Errorf("failed to get source chain config for selector %d from OffRamp(%s) on chain %v: %w", input.Source.Selector, input.Dest.OffRamp, chain, err) @@ -421,7 +435,7 @@ func MaybeAddRouterOnRampsAddsConfigArg(b cldf_ops.Bundle, chain evm.Chain, inpu fmt.Errorf("failed to get version of existing onRamp at address %s "+ "for dest %d from Router(%s) on chain %s: %w", onRampAddrReport.Output.Hex(), remoteSelector, sourceRouter, chain, err) } - if version.GreaterThanEqual(onramp.Version) || (onramp.Version.Major() == version.Major()) { + if version.GreaterThanEqual(onrampops.Version) || (onrampops.Version.Major() == version.Major()) { if onRampAddrReport.Output != srcOnRampAddr { onRampAdds = append(onRampAdds, router.OnRamp{ DestChainSelector: remoteSelector, @@ -433,7 +447,7 @@ func MaybeAddRouterOnRampsAddsConfigArg(b cldf_ops.Bundle, chain evm.Chain, inpu "chain %s has version %s, which is lower than the version of the onRamp we want to add: %s. "+ "Skipping adding onRamp to router to avoid potential compatibility issues. "+ "If you want to add this onRamp, please run migration changeset.", - onRampAddrReport.Output.Hex(), remoteSelector, sourceRouter, chain.String(), version, onramp.Version) + onRampAddrReport.Output.Hex(), remoteSelector, sourceRouter, chain.String(), version, onrampops.Version) } } } @@ -442,7 +456,7 @@ func MaybeAddRouterOnRampsAddsConfigArg(b cldf_ops.Bundle, chain evm.Chain, inpu // maybeAddOnRampDestChainConfigArg fetches current OnRamp dest chain config, builds desired arg from input, // and appends to onRampArgs only when config differs (idempotent). -func maybeAddOnRampDestChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lanes.UpdateLanesInput, onRampArgs []onramp.DestChainConfigArgs) ([]onramp.DestChainConfigArgs, error) { +func maybeAddOnRampDestChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input lanes.UpdateLanesInput, onRampContract *orbind.OnRamp, onRampArgs []orbind.OnRampDestChainConfigArgs) ([]orbind.OnRampDestChainConfigArgs, error) { defaultOutboundCCVs := make([]common.Address, 0, len(input.Source.DefaultOutboundCCVs)) for _, ccv := range input.Source.DefaultOutboundCCVs { defaultOutboundCCVs = append(defaultOutboundCCVs, common.HexToAddress(ccv.Address)) @@ -451,7 +465,7 @@ func maybeAddOnRampDestChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input for _, ccv := range input.Source.LaneMandatedOutboundCCVs { laneMandatedOutboundCCVs = append(laneMandatedOutboundCCVs, common.HexToAddress(ccv.Address)) } - desiredOnRampArg := onramp.DestChainConfigArgs{ + desiredOnRampArg := orbind.OnRampDestChainConfigArgs{ Router: common.BytesToAddress(input.Source.Router), DestChainSelector: input.Dest.Selector, AddressBytesLength: input.Dest.AddressBytesLength, @@ -463,10 +477,8 @@ func maybeAddOnRampDestChainConfigArg(b cldf_ops.Bundle, chain evm.Chain, input DefaultExecutor: common.HexToAddress(input.Source.DefaultExecutor.Address), OffRamp: input.Dest.OffRamp, } - onRampCurrentReport, err := cldf_ops.ExecuteOperation(b, onramp.GetDestChainConfig, chain, contract.FunctionInput[uint64]{ - ChainSelector: input.Source.Selector, - Address: common.BytesToAddress(input.Source.OnRamp), - Args: input.Dest.Selector, + onRampCurrentReport, err := cldf_ops.ExecuteOperation(b, onrampops.NewReadGetDestChainConfig(onRampContract), chain, ops2contract.FunctionInput[uint64]{ + Args: input.Dest.Selector, }) if err != nil { return nil, fmt.Errorf("failed to get dest chain config for selector %d from OnRamp(%s) on chain %v: %w", input.Dest.Selector, input.Source.OnRamp, chain, err) @@ -532,7 +544,7 @@ func feeQuoterDestChainConfigEqual(cur fqc.FeeQuoterDestChainConfig, desired lan // maybeAddFeeQuoterDestChainConfigArg fetches current FeeQuoter dest chain config and appends to feeQuoterArgs // only when the config differs from desired (idempotent). Call only when OverrideExistingConfig is false. // When a desired field is zero, the on-chain value is used so we do not overwrite with zero. -func maybeAddFeeQuoterDestChainConfigArg(feeQContract *fqc.FeeQuoter, b cldf_ops.Bundle, feeQuoterAddr string, chain evm.Chain, remoteSelector uint64, remoteConfig *lanes.ChainDefinition, feeQuoterArgs []fee_quoter.DestChainConfigArgs) ([]fee_quoter.DestChainConfigArgs, error) { +func maybeAddFeeQuoterDestChainConfigArg(feeQContract *fqc.FeeQuoter, b cldf_ops.Bundle, feeQuoterAddr string, chain evm.Chain, remoteSelector uint64, remoteConfig *lanes.ChainDefinition, feeQuoterArgs []fqc.FeeQuoterDestChainConfigArgs) ([]fqc.FeeQuoterDestChainConfigArgs, error) { cur, err := feeQContract.GetDestChainConfig(&bind.CallOpts{ Context: b.GetContext(), }, remoteSelector) @@ -580,18 +592,18 @@ func maybeAddFeeQuoterDestChainConfigArg(feeQContract *fqc.FeeQuoter, b cldf_ops if feeQuoterDestChainConfigEqual(cur, desired) { return feeQuoterArgs, nil } - return append(feeQuoterArgs, fee_quoter.DestChainConfigArgs{ + return append(feeQuoterArgs, fqc.FeeQuoterDestChainConfigArgs{ DestChainSelector: remoteSelector, DestChainConfig: adapterDestChainConfigToFeeQuoter(desired), }), nil } -func adapterDestChainConfigToFeeQuoter(cfg lanes.FeeQuoterDestChainConfig) fee_quoter.DestChainConfig { +func adapterDestChainConfigToFeeQuoter(cfg lanes.FeeQuoterDestChainConfig) fqc.FeeQuoterDestChainConfig { var linkFeeMultiplierPercent uint8 if cfg.V2Params != nil { linkFeeMultiplierPercent = cfg.V2Params.LinkFeeMultiplierPercent } - return fee_quoter.DestChainConfig{ + return fqc.FeeQuoterDestChainConfig{ IsEnabled: cfg.IsEnabled, MaxDataBytes: cfg.MaxDataBytes, MaxPerMsgGasLimit: cfg.MaxPerMsgGasLimit, diff --git a/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg_test.go b/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg_test.go index 6475892b27..41e1d169b7 100644 --- a/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/configure_lane_leg_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/create2_factory" @@ -28,7 +29,12 @@ import ( contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" onramp2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" + onramp160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/message_hasher" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" versioned_verifier_resolver_latest "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/versioned_verifier_resolver" "github.com/smartcontractkit/chainlink-ccip/deployment/lanes" ) @@ -272,12 +278,17 @@ func TestConfigureLaneLegAsSourceAndDest(t *testing.T) { require.Len(t, offRampsOnRouter.Output, 1, "There should be one OffRamp on the router for the remote chain") require.Equal(t, offRampAddr, offRampsOnRouter.Output[0].OffRamp.Hex(), "OffRamp address on router should match OffRamp address") + offRampContract, err := offbind.NewOffRamp(common.HexToAddress(offRampAddr), evmChain.Client) + require.NoError(t, err) + onRampContract, err := orbind.NewOnRamp(common.HexToAddress(onRampAddr), evmChain.Client) + require.NoError(t, err) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(committeeVerifierAddr), evmChain.Client) + require.NoError(t, err) + execContract, err := execbind.NewExecutor(common.HexToAddress(executorAddr), evmChain.Client) + require.NoError(t, err) + // Check sourceChainConfig on OffRamp - sourceChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, offramp.GetSourceChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(offRampAddr), - Args: remoteChainSelector, - }) + sourceChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, offramp.NewReadGetSourceChainConfig(offRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, common.LeftPadBytes(remoteChainDef.OnRamp, 32), sourceChainConfig.Output.OnRamps[0], "OnRamp in source chain config should match OnRamp address") require.Len(t, sourceChainConfig.Output.DefaultCCVs, 1, "There should be one DefaultCCV in source chain config") @@ -286,11 +297,7 @@ func TestConfigureLaneLegAsSourceAndDest(t *testing.T) { require.Equal(t, routerAddress, sourceChainConfig.Output.Router.Hex(), "Router in source chain config should match Router address") // Check destChainConfig on OnRamp - destChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, onramp.GetDestChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(onRampAddr), - Args: remoteChainSelector, - }) + destChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, onramp.NewReadGetDestChainConfig(onRampContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, routerAddress, destChainConfig.Output.Router.Hex(), "Router in dest chain config should match Router address") require.Equal(t, remoteChainDef.OffRamp, destChainConfig.Output.OffRamp, "OffRamp in dest chain config should match CCIPMessageDest") @@ -299,21 +306,13 @@ func TestConfigureLaneLegAsSourceAndDest(t *testing.T) { require.Equal(t, committeeVerifierAddr, destChainConfig.Output.DefaultCCVs[0].Hex(), "DefaultCCV in dest chain config should match CommitteeVerifier address") // Check destChainConfig on CommitteeVerifier - committeeVerifierRemoteChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.GetRemoteChainConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(committeeVerifierAddr), - Args: remoteChainSelector, - }) + committeeVerifierRemoteChainConfig, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.NewReadGetRemoteChainConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, routerAddress, committeeVerifierRemoteChainConfig.Output.RemoteChainConfig.Router.Hex(), "Router in CommitteeVerifier remote chain config should match Router address") require.False(t, committeeVerifierRemoteChainConfig.Output.RemoteChainConfig.AllowlistEnabled, "AllowlistEnabled in CommitteeVerifier remote chain config should be false") // Check signature quorum on CommitteeVerifier - signatureQuorumReport, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.GetSignatureConfig, evmChain, contract.FunctionInput[uint64]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(committeeVerifierAddr), - Args: remoteChainSelector, - }) + signatureQuorumReport, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.NewReadGetSignatureConfig(cvContract), evmChain, ops2contract.FunctionInput[uint64]{Args: remoteChainSelector}) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, uint8(1), signatureQuorumReport.Output.Threshold, "Threshold in CommitteeVerifier signature config should be 1") require.Equal(t, []common.Address{common.HexToAddress("0x01")}, signatureQuorumReport.Output.Signers, "Signers in CommitteeVerifier signature config should match") @@ -326,20 +325,14 @@ func TestConfigureLaneLegAsSourceAndDest(t *testing.T) { require.Equal(t, committeeVerifierAddr, outboundImpl.Hex(), "Outbound implementation verifier on CommitteeVerifierResolver should match CommitteeVerifier address") // Check inbound implementation on CommitteeVerifierResolver - versionTagReport, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.VersionTag, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(committeeVerifierAddr), - }) + versionTagReport, err := operations.ExecuteOperation(e.OperationsBundle, committee_verifier.NewReadVersionTag(cvContract), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err, "ExecuteOperation should not error") inboundImpl, err := boundResolver.GetInboundImplementation(&bind.CallOpts{Context: t.Context()}, versionTagReport.Output[:]) require.NoError(t, err, "GetInboundImplementationForVersion should not error") require.Equal(t, committeeVerifierAddr, inboundImpl.Hex(), "Inbound implementation verifier on CommitteeVerifierResolver should match CommitteeVerifier address") // Check dest chains on Executor - executorDestChains, err := operations.ExecuteOperation(e.OperationsBundle, executor.GetDestChains, evmChain, contract.FunctionInput[struct{}]{ - ChainSelector: evmChain.Selector, - Address: common.HexToAddress(executorAddr), - }) + executorDestChains, err := operations.ExecuteOperation(e.OperationsBundle, executor.NewReadGetDestChains(execContract), evmChain, ops2contract.FunctionInput[struct{}]{}) require.NoError(t, err, "ExecuteOperation should not error") require.Len(t, executorDestChains.Output, 1, "There should be one dest chain on Executor") expectedExecConfig := testsetup.CreateBasicExecutorDestChainConfig() @@ -587,17 +580,16 @@ func TestMaybeAddRouterOnRampsAddsConfigArg(t *testing.T) { remoteChainDef.Router = common.HexToAddress(remoteRouterAddress).Bytes() // add an onramp with version 1.6.0 // deploy onramp 1.6.0 - out, err := operations.ExecuteOperation(testsetup.BundleWithFreshReporter(e.OperationsBundle), onramp2.Deploy, evmChain, contract_utils.DeployInput[onramp2.ConstructorArgs]{ - ChainSelector: chainSelector, + out, err := operations.ExecuteOperation(testsetup.BundleWithFreshReporter(e.OperationsBundle), onramp2.Deploy, evmChain, ops2contract.DeployInput[onramp2.ConstructorArgs]{ TypeAndVersion: onramp2.TypeAndVersion, Args: onramp2.ConstructorArgs{ - StaticConfig: onramp2.StaticConfig{ + StaticConfig: onramp160bind.OnRampStaticConfig{ ChainSelector: chainSelector, RmnRemote: utils.RandomAddress(), NonceManager: utils.RandomAddress(), TokenAdminRegistry: utils.RandomAddress(), }, - DynamicConfig: onramp2.DynamicConfig{ + DynamicConfig: onramp160bind.OnRampDynamicConfig{ FeeQuoter: utils.RandomAddress(), FeeAggregator: utils.RandomAddress(), }, diff --git a/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor.go b/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor.go index b03f5f344e..80ddd80638 100644 --- a/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor.go +++ b/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor.go @@ -5,9 +5,9 @@ import ( "github.com/Masterminds/semver/v3" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks_extractor" - contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -23,9 +23,8 @@ var DeployAdvancedPoolHooksExtractor = cldf_ops.NewSequence( semver.MustParse("2.0.0"), "Deploys the AdvancedPoolHooksExtractor contract", func(b cldf_ops.Bundle, chain evm.Chain, input DeployAdvancedPoolHooksExtractorInput) (sequences.OnChainOutput, error) { - ref, err := contract_utils.MaybeDeployContract(b, advanced_pool_hooks_extractor.Deploy, chain, contract_utils.DeployInput[advanced_pool_hooks_extractor.ConstructorArgs]{ + ref, err := ops2contract.MaybeDeployContract(b, advanced_pool_hooks_extractor.Deploy, chain, ops2contract.DeployInput[advanced_pool_hooks_extractor.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks_extractor.ContractType, *advanced_pool_hooks_extractor.Version), - ChainSelector: chain.Selector, Args: advanced_pool_hooks_extractor.ConstructorArgs{}, }, input.ExistingAddresses) if err != nil { diff --git a/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor_test.go b/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor_test.go index 960fe3809d..39831b5f99 100644 --- a/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/deploy_advanced_pool_hooks_extractor_test.go @@ -101,5 +101,6 @@ func TestDeployAdvancedPoolHooksExtractor_MultipleChains(t *testing.T) { } require.Len(t, addresses, len(chainSelectors)) - require.NotEqual(t, addresses[chainSelectors[0]], addresses[chainSelectors[1]]) + // CREATE2 deploys the same implementation address on each chain. + require.Equal(t, addresses[chainSelectors[0]], addresses[chainSelectors[1]]) } diff --git a/chains/evm/deployment/v2_0_0/sequences/deploy_chain_contracts.go b/chains/evm/deployment/v2_0_0/sequences/deploy_chain_contracts.go index bcc29d7390..f9f62a04dc 100644 --- a/chains/evm/deployment/v2_0_0/sequences/deploy_chain_contracts.go +++ b/chains/evm/deployment/v2_0_0/sequences/deploy_chain_contracts.go @@ -13,10 +13,16 @@ import ( mcms_types "github.com/smartcontractkit/mcms/types" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + mrv2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/mock_receiver_v2" + offbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/offramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" proxy_bindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/proxy" evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" @@ -48,12 +54,24 @@ type proxyAcceptOwnershipArgs struct { IsProposedOwner bool } +func writeOutputOps2ToUpstream(w ops2contract.WriteOutput) upstream.WriteOutput { + var ei *upstream.ExecInfo + if w.ExecInfo != nil { + ei = &upstream.ExecInfo{Hash: w.ExecInfo.Hash} + } + return upstream.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + var proxyAcceptOwnership = contract_utils.NewWrite(contract_utils.WriteParams[proxyAcceptOwnershipArgs, *proxy_bindings.Proxy]{ Name: "proxy:accept-ownership", Version: proxy.Version, Description: "Accept ownership of the proxy", ContractType: proxy.ContractType, - ContractABI: proxy.ProxyABI, + ContractABI: proxy_bindings.ProxyMetaData.ABI, NewContract: proxy_bindings.NewProxy, IsAllowedCaller: func(_ *proxy_bindings.Proxy, _ *bind.CallOpts, _ common.Address, args proxyAcceptOwnershipArgs) (bool, error) { return args.IsProposedOwner, nil @@ -113,7 +131,7 @@ type FeeQuoterParams struct { type ExecutorParams struct { Version *semver.Version MaxCCVsPerMsg uint8 - DynamicConfig executor.DynamicConfig + DynamicConfig execbind.ExecutorDynamicConfig Qualifier string } @@ -183,9 +201,8 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, linkRef) // Deploy RMNRemote - rmnRemoteRef, err := contract_utils.MaybeDeployContract(b, rmn_remote.Deploy, chain, contract_utils.DeployInput[rmn_remote.ConstructorArgs]{ + rmnRemoteRef, err := ops2contract.MaybeDeployContract(b, rmn_remote.Deploy, chain, ops2contract.DeployInput[rmn_remote.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(rmn_remote.ContractType, *input.ContractParams.RMNRemote.Version), - ChainSelector: chain.Selector, Args: rmn_remote.ConstructorArgs{ LocalChainSelector: chain.Selector, LegacyRMN: input.ContractParams.RMNRemote.LegacyRMN, @@ -354,11 +371,10 @@ var DeployChainContracts = cldf_ops.NewSequence( if cllccipTimelockAddr != (common.Address{}) { priceUpdaters = append(priceUpdaters, cllccipTimelockAddr) } - feeQuoterRef, err := contract_utils.MaybeDeployContract(b, fee_quoter.Deploy, chain, contract_utils.DeployInput[fee_quoter.ConstructorArgs]{ + feeQuoterRef, err := ops2contract.MaybeDeployContract(b, fee_quoter.Deploy, chain, ops2contract.DeployInput[fee_quoter.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(fee_quoter.ContractType, *input.ContractParams.FeeQuoter.Version), - ChainSelector: chain.Selector, Args: fee_quoter.ConstructorArgs{ - StaticConfig: fee_quoter.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ MaxFeeJuelsPerMsg: input.ContractParams.FeeQuoter.MaxFeeJuelsPerMsg, LinkToken: common.HexToAddress(linkRef.Address), }, @@ -375,39 +391,40 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, feeQuoterRef) ownableContracts = append(ownableContracts, feeQuoterRef) - var tokenPriceUpdates []fee_quoter.TokenPriceUpdate + var tokenPriceUpdates []fqbind.InternalTokenPriceUpdate if input.ContractParams.FeeQuoter.USDPerLINK != nil { - tokenPriceUpdates = append(tokenPriceUpdates, fee_quoter.TokenPriceUpdate{ + tokenPriceUpdates = append(tokenPriceUpdates, fqbind.InternalTokenPriceUpdate{ SourceToken: common.HexToAddress(linkRef.Address), UsdPerToken: input.ContractParams.FeeQuoter.USDPerLINK, }) } if input.ContractParams.FeeQuoter.USDPerWETH != nil { - tokenPriceUpdates = append(tokenPriceUpdates, fee_quoter.TokenPriceUpdate{ + tokenPriceUpdates = append(tokenPriceUpdates, fqbind.InternalTokenPriceUpdate{ SourceToken: common.HexToAddress(wethRef.Address), UsdPerToken: input.ContractParams.FeeQuoter.USDPerWETH, }) } if len(tokenPriceUpdates) > 0 { - updatePricesReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.UpdatePrices, chain, contract_utils.FunctionInput[fee_quoter.PriceUpdates]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(feeQuoterRef.Address), - Args: fee_quoter.PriceUpdates{ + fqForPrices, err := fqbind.NewFeeQuoter(common.HexToAddress(feeQuoterRef.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind fee quoter for price updates: %w", err) + } + updatePricesReport, err := cldf_ops.ExecuteOperation(b, fee_quoter.NewWriteUpdatePrices(fqForPrices), chain, ops2contract.FunctionInput[fqbind.InternalPriceUpdates]{ + Args: fqbind.InternalPriceUpdates{ TokenPriceUpdates: tokenPriceUpdates, }, }) if err != nil { return output, fmt.Errorf("failed to update token prices on FeeQuoter: %w", err) } - writes = append(writes, updatePricesReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(updatePricesReport.Output)) } // Deploy OffRamp - offRampRef, err := contract_utils.MaybeDeployContract(b, offramp.Deploy, chain, contract_utils.DeployInput[offramp.ConstructorArgs]{ + offRampRef, err := ops2contract.MaybeDeployContract(b, offramp.Deploy, chain, ops2contract.DeployInput[offramp.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(offramp.ContractType, *input.ContractParams.OffRamp.Version), - ChainSelector: chain.Selector, Args: offramp.ConstructorArgs{ - StaticConfig: offramp.StaticConfig{ + StaticConfig: offbind.OffRampStaticConfig{ LocalChainSelector: chain.Selector, RmnRemote: common.HexToAddress(rmnProxyRef.Address), GasForCallExactCheck: input.ContractParams.OffRamp.GasForCallExactCheck, @@ -423,17 +440,16 @@ var DeployChainContracts = cldf_ops.NewSequence( ownableContracts = append(ownableContracts, offRampRef) // Deploy OnRamp - onRampRef, err := contract_utils.MaybeDeployContract(b, onramp.Deploy, chain, contract_utils.DeployInput[onramp.ConstructorArgs]{ + onRampRef, err := ops2contract.MaybeDeployContract(b, onramp.Deploy, chain, ops2contract.DeployInput[onramp.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(onramp.ContractType, *input.ContractParams.OnRamp.Version), - ChainSelector: chain.Selector, Args: onramp.ConstructorArgs{ - StaticConfig: onramp.StaticConfig{ + StaticConfig: orbind.OnRampStaticConfig{ ChainSelector: chain.Selector, RmnRemote: common.HexToAddress(rmnRemoteRef.Address), TokenAdminRegistry: common.HexToAddress(tokenAdminRegistryRef.Address), MaxUSDCentsPerMessage: input.ContractParams.OnRamp.MaxUSDCentsPerMessage, }, - DynamicConfig: onramp.DynamicConfig{ + DynamicConfig: orbind.OnRampDynamicConfig{ FeeQuoter: common.HexToAddress(feeQuoterRef.Address), FeeAggregator: input.ContractParams.OnRamp.FeeAggregator, }, @@ -445,12 +461,13 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, onRampRef) ownableContracts = append(ownableContracts, onRampRef) + onRampContract, err := orbind.NewOnRamp(common.HexToAddress(onRampRef.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind onramp: %w", err) + } + // Fetch the dynamic config on the OnRamp - dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, onramp.GetDynamicConfig, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(onRampRef.Address), - Args: struct{}{}, - }) + dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, onramp.NewReadGetDynamicConfig(onRampContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return output, fmt.Errorf("failed to get dynamic config on OnRamp: %w", err) } @@ -461,20 +478,18 @@ var DeployChainContracts = cldf_ops.NewSequence( desiredFeeAggregator = input.ContractParams.OnRamp.FeeAggregator } if dynamicConfigReport.Output.FeeQuoter != common.HexToAddress(feeQuoterRef.Address) || desiredFeeAggregator != dynamicConfigReport.Output.FeeAggregator { - desiredDynamicConfig := onramp.DynamicConfig{ + desiredDynamicConfig := orbind.OnRampDynamicConfig{ FeeQuoter: common.HexToAddress(feeQuoterRef.Address), ReentrancyGuardEntered: false, // This should never be true. - FeeAggregator: input.ContractParams.OnRamp.FeeAggregator, + FeeAggregator: desiredFeeAggregator, } - setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, onramp.SetDynamicConfig, chain, contract_utils.FunctionInput[onramp.DynamicConfig]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(onRampRef.Address), - Args: desiredDynamicConfig, + setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, onramp.NewWriteSetDynamicConfig(onRampContract), chain, ops2contract.FunctionInput[orbind.OnRampDynamicConfig]{ + Args: desiredDynamicConfig, }) if err != nil { return output, fmt.Errorf("failed to set dynamic config on OnRamp: %w", err) } - writes = append(writes, setDynamicConfigReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setDynamicConfigReport.Output)) } // TODO: validate prior to deploying that qualifiers are unique? @@ -501,9 +516,8 @@ var DeployChainContracts = cldf_ops.NewSequence( if executorParam.Qualifier != "" { qualifierPtr = &executorParam.Qualifier } - executorRef, err := contract_utils.MaybeDeployContract(b, executor.Deploy, chain, contract_utils.DeployInput[executor.ConstructorArgs]{ + executorRef, err := ops2contract.MaybeDeployContract(b, executor.Deploy, chain, ops2contract.DeployInput[executor.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(executor.ContractType, *executorParam.Version), - ChainSelector: chain.Selector, Args: executor.ConstructorArgs{ MaxCCVsPerMsg: executorParam.MaxCCVsPerMsg, DynamicConfig: executorParam.DynamicConfig, @@ -516,12 +530,13 @@ var DeployChainContracts = cldf_ops.NewSequence( addresses = append(addresses, executorRef) ownableContracts = append(ownableContracts, executorRef) + execContract, err := execbind.NewExecutor(common.HexToAddress(executorRef.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind executor: %w", err) + } + // Fetch the dynamic config on the Executor - dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, executor.GetDynamicConfig, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorRef.Address), - Args: struct{}{}, - }) + dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, executor.NewReadGetDynamicConfig(execContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return output, fmt.Errorf("failed to get dynamic config on Executor: %w", err) } @@ -534,11 +549,9 @@ var DeployChainContracts = cldf_ops.NewSequence( if desiredFeeAggregator != dynamicConfigReport.Output.FeeAggregator || dynamicConfigReport.Output.AllowedFinalityConfig != executorParam.DynamicConfig.AllowedFinalityConfig || dynamicConfigReport.Output.CcvAllowlistEnabled != executorParam.DynamicConfig.CcvAllowlistEnabled { - setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, executor.SetDynamicConfig, chain, contract_utils.FunctionInput[executor.DynamicConfig]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorRef.Address), - Args: executor.DynamicConfig{ - FeeAggregator: executorParam.DynamicConfig.FeeAggregator, + setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, executor.NewWriteSetDynamicConfig(execContract), chain, ops2contract.FunctionInput[execbind.ExecutorDynamicConfig]{ + Args: execbind.ExecutorDynamicConfig{ + FeeAggregator: desiredFeeAggregator, AllowedFinalityConfig: executorParam.DynamicConfig.AllowedFinalityConfig, CcvAllowlistEnabled: executorParam.DynamicConfig.CcvAllowlistEnabled, }, @@ -546,7 +559,7 @@ var DeployChainContracts = cldf_ops.NewSequence( if err != nil { return output, fmt.Errorf("failed to set dynamic config on Executor: %w", err) } - writes = append(writes, setDynamicConfigReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setDynamicConfigReport.Output)) } // Deploy ExecutorProxy via CREATE2 @@ -570,8 +583,8 @@ var DeployChainContracts = cldf_ops.NewSequence( Type: datastore.ContractType(ExecutorProxyType), Version: executor.Version, CREATE2Factory: input.CREATE2Factory, - ABI: proxy.ProxyABI, - BIN: proxy.ProxyBin, + ABI: proxy_bindings.ProxyMetaData.ABI, + BIN: proxy_bindings.ProxyMetaData.Bin, ConstructorArgs: []any{ // To ensure consistent addresses, we have to deploy with the same constructor args on every chain. // Instead of setting in the constructor, we set the target and fee aggregator after deployment. @@ -605,48 +618,43 @@ var DeployChainContracts = cldf_ops.NewSequence( } ownableContracts = append(ownableContracts, *executorProxyRef) - // Fetch the target on the ExecutorProxy - targetReport, err := cldf_ops.ExecuteOperation(b, proxy.GetTarget, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorProxyRef.Address), - }) + execProxyContract, err := proxy_bindings.NewProxy(common.HexToAddress(executorProxyRef.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind executor proxy: %w", err) + } + + // Fetch the target on the ExecutorProxy (direct read avoids ops-bundle cache collisions across chains). + currentTarget, err := execProxyContract.GetTarget(&bind.CallOpts{Context: b.GetContext()}) if err != nil { return output, fmt.Errorf("failed to get target on ExecutorProxy: %w", err) } // Set target on the ExecutorProxy if diff exists - if targetReport.Output != common.HexToAddress(executorRef.Address) { - setTargetReport, err := cldf_ops.ExecuteOperation(b, proxy.SetTarget, chain, contract_utils.FunctionInput[common.Address]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorProxyRef.Address), - Args: common.HexToAddress(executorRef.Address), + if currentTarget != common.HexToAddress(executorRef.Address) { + setTargetReport, err := cldf_ops.ExecuteOperation(b, proxy.NewWriteSetTarget(execProxyContract), chain, ops2contract.FunctionInput[common.Address]{ + Args: common.HexToAddress(executorRef.Address), }) if err != nil { return output, fmt.Errorf("failed to set target on ExecutorProxy: %w", err) } - writes = append(writes, setTargetReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setTargetReport.Output)) } - // Fetch the fee aggregator on the ExecutorProxy - feeAggregatorReport, err := cldf_ops.ExecuteOperation(b, proxy.GetFeeAggregator, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorProxyRef.Address), - }) + // Fetch the fee aggregator on the ExecutorProxy (direct read avoids ops-bundle cache collisions across chains). + currentFeeAggregator, err := execProxyContract.GetFeeAggregator(&bind.CallOpts{Context: b.GetContext()}) if err != nil { return output, fmt.Errorf("failed to get fee aggregator on ExecutorProxy: %w", err) } // Set fee aggregator on the ExecutorProxy if diff exists - if feeAggregatorReport.Output != executorParam.DynamicConfig.FeeAggregator { - setFeeAggregatorReport, err := cldf_ops.ExecuteOperation(b, proxy.SetFeeAggregator, chain, contract_utils.FunctionInput[common.Address]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(executorProxyRef.Address), - Args: executorParam.DynamicConfig.FeeAggregator, + if currentFeeAggregator != executorParam.DynamicConfig.FeeAggregator { + setFeeAggregatorReport, err := cldf_ops.ExecuteOperation(b, proxy.NewWriteSetFeeAggregator(execProxyContract), chain, ops2contract.FunctionInput[common.Address]{ + Args: executorParam.DynamicConfig.FeeAggregator, }) if err != nil { return output, fmt.Errorf("failed to set fee aggregator on ExecutorProxy: %w", err) } - writes = append(writes, setFeeAggregatorReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setFeeAggregatorReport.Output)) } } @@ -659,27 +667,28 @@ var DeployChainContracts = cldf_ops.NewSequence( if mockReceiverParams.Qualifier != "" { qualifierPtr = &mockReceiverParams.Qualifier } - deployReceiverReport, err := cldf_ops.ExecuteOperation(b, mock_receiver.Deploy, chain, contract_utils.DeployInput[mock_receiver.ConstructorArgs]{ + deployReceiverRef, err := ops2contract.MaybeDeployContract(b, mock_receiver.Deploy, chain, ops2contract.DeployInput[mock_receiver.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(mock_receiver.ContractType, *mockReceiverParams.Version), - ChainSelector: chain.Selector, + Qualifier: qualifierPtr, Args: mock_receiver.ConstructorArgs{ Required: requiredVerifiers, Optional: optionalVerifiers, Threshold: mockReceiverParams.OptionalThreshold, }, - Qualifier: qualifierPtr, - }) + }, input.ExistingAddresses) if err != nil { return output, fmt.Errorf("failed to deploy MockReceiver: %w", err) } - addresses = append(addresses, deployReceiverReport.Output) + addresses = append(addresses, deployReceiverRef) // Set finality config on the MockReceiver if diff exists if mockReceiverParams.AllowedFinalityConfig != finality.RawWaitForFinality { + mockRecvContract, err := mrv2bind.NewMockReceiverV2(common.HexToAddress(deployReceiverRef.Address), chain.Client) + if err != nil { + return output, fmt.Errorf("bind mock receiver: %w", err) + } // Get the current finality config on the MockReceiver - finalityConfigResult, err := cldf_ops.ExecuteOperation(b, mock_receiver_v2.GetCCVsAndFinalityConfig, chain, contract_utils.FunctionInput[mock_receiver_v2.GetCCVsAndFinalityConfigArgs]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(deployReceiverReport.Output.Address), + finalityConfigResult, err := cldf_ops.ExecuteOperation(b, mock_receiver_v2.NewReadGetCCVsAndFinalityConfig(mockRecvContract), chain, ops2contract.FunctionInput[mock_receiver_v2.GetCCVsAndFinalityConfigArgs]{ Args: mock_receiver_v2.GetCCVsAndFinalityConfigArgs{ Arg0: chain.Selector, Arg1: []byte{}, @@ -690,15 +699,13 @@ var DeployChainContracts = cldf_ops.NewSequence( } if finalityConfigResult.Output.AllowedFinalityConfig != mockReceiverParams.AllowedFinalityConfig { // Set the finality config on the MockReceiver - setFinalityConfigReport, err := cldf_ops.ExecuteOperation(b, mock_receiver_v2.SetAllowedFinalityConfig, chain, contract_utils.FunctionInput[[4]byte]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(deployReceiverReport.Output.Address), - Args: mockReceiverParams.AllowedFinalityConfig, + setFinalityConfigReport, err := cldf_ops.ExecuteOperation(b, mock_receiver_v2.NewWriteSetAllowedFinalityConfig(mockRecvContract), chain, ops2contract.FunctionInput[[4]byte]{ + Args: mockReceiverParams.AllowedFinalityConfig, }) if err != nil { return output, fmt.Errorf("failed to set finality config on MockReceiver: %w", err) } - writes = append(writes, setFinalityConfigReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setFinalityConfigReport.Output)) } } } diff --git a/chains/evm/deployment/v2_0_0/sequences/deploy_committee_verifier.go b/chains/evm/deployment/v2_0_0/sequences/deploy_committee_verifier.go index 56845c02e4..081a36e338 100644 --- a/chains/evm/deployment/v2_0_0/sequences/deploy_committee_verifier.go +++ b/chains/evm/deployment/v2_0_0/sequences/deploy_committee_verifier.go @@ -12,11 +12,13 @@ import ( cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" + contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/committee_verifier" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/verifier_tags" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/versioned_verifier_resolver" - contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/committee_verifier" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) var CommitteeVerifierResolverType = versioned_verifier_resolver.CommitteeVerifierResolverType @@ -51,11 +53,10 @@ var DeployCommitteeVerifier = cldf_ops.NewSequence( if input.Params.Qualifier != "" { qualifierPtr = &input.Params.Qualifier } - committeeVerifierRef, err := contract_utils.MaybeDeployContract(b, committee_verifier.Deploy, chain, contract_utils.DeployInput[committee_verifier.ConstructorArgs]{ + committeeVerifierRef, err := ops2contract.MaybeDeployContract(b, committee_verifier.Deploy, chain, ops2contract.DeployInput[committee_verifier.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(committee_verifier.ContractType, *input.Params.Version), - ChainSelector: chain.Selector, Args: committee_verifier.ConstructorArgs{ - DynamicConfig: committee_verifier.DynamicConfig{ + DynamicConfig: cvbind.CommitteeVerifierDynamicConfig{ FeeAggregator: input.Params.FeeAggregator, AllowlistAdmin: input.Params.AllowlistAdmin, }, @@ -70,12 +71,13 @@ var DeployCommitteeVerifier = cldf_ops.NewSequence( } addresses = append(addresses, committeeVerifierRef) + cvContract, err := cvbind.NewCommitteeVerifier(common.HexToAddress(committeeVerifierRef.Address), chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind committee verifier: %w", err) + } + // Fetch dynamic config on the CommitteeVerifier - dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.GetDynamicConfig, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifierRef.Address), - Args: struct{}{}, - }) + dynamicConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewReadGetDynamicConfig(cvContract), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get dynamic config on CommitteeVerifier: %w", err) } @@ -90,10 +92,8 @@ var DeployCommitteeVerifier = cldf_ops.NewSequence( desiredAllowlistAdmin = input.Params.AllowlistAdmin } if desiredFeeAggregator != dynamicConfigReport.Output.FeeAggregator || desiredAllowlistAdmin != dynamicConfigReport.Output.AllowlistAdmin { - setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.SetDynamicConfig, chain, contract_utils.FunctionInput[committee_verifier.DynamicConfig]{ - ChainSelector: chain.Selector, - Address: common.HexToAddress(committeeVerifierRef.Address), - Args: committee_verifier.DynamicConfig{ + setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, committee_verifier.NewWriteSetDynamicConfig(cvContract), chain, ops2contract.FunctionInput[cvbind.CommitteeVerifierDynamicConfig]{ + Args: cvbind.CommitteeVerifierDynamicConfig{ AllowlistAdmin: desiredAllowlistAdmin, FeeAggregator: desiredFeeAggregator, }, @@ -101,7 +101,7 @@ var DeployCommitteeVerifier = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set dynamic config on CommitteeVerifier: %w", err) } - writes = append(writes, setDynamicConfigReport.Output) + writes = append(writes, writeOutputOps2ToUpstream(setDynamicConfigReport.Output)) } if input.CREATE2Factory == (common.Address{}) { diff --git a/chains/evm/deployment/v2_0_0/sequences/executor_custom.go b/chains/evm/deployment/v2_0_0/sequences/executor_custom.go index 995b1790f9..e61b66db90 100644 --- a/chains/evm/deployment/v2_0_0/sequences/executor_custom.go +++ b/chains/evm/deployment/v2_0_0/sequences/executor_custom.go @@ -6,8 +6,8 @@ import ( executor_bindings "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" cldf_deployment "github.com/smartcontractkit/chainlink-deployments-framework/deployment" ) @@ -29,7 +29,7 @@ var ExecutorApplyDestChainUpdates = contract_utils.NewWrite(contract_utils.Write Version: executor.Version, Description: "Applies updates to supported destination chains on the Executor", ContractType: executor.ContractType, - ContractABI: executor.ExecutorABI, + ContractABI: executor_bindings.ExecutorMetaData.ABI, NewContract: executor_bindings.NewExecutor, IsAllowedCaller: contract_utils.OnlyOwner[*executor_bindings.Executor, ExecutorApplyDestChainUpdatesArgs], Validate: func(ExecutorApplyDestChainUpdatesArgs) error { return nil }, diff --git a/chains/evm/deployment/v2_0_0/sequences/fee_quoter.go b/chains/evm/deployment/v2_0_0/sequences/fee_quoter.go index 7efa6d850c..92511a57c7 100644 --- a/chains/evm/deployment/v2_0_0/sequences/fee_quoter.go +++ b/chains/evm/deployment/v2_0_0/sequences/fee_quoter.go @@ -17,7 +17,6 @@ import ( mcms_types "github.com/smartcontractkit/mcms/types" "golang.org/x/exp/maps" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" adapters1_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/adapters" priceregistryops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/price_registry" routerops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" @@ -26,12 +25,14 @@ import ( seq1_5 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/sequences" fq1_6 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/fee_quoter" seq1_6 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" "github.com/smartcontractkit/chainlink-ccip/deployment/utils" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" ) const ( @@ -89,10 +90,10 @@ type FeeQuoterUpdate struct { ChainSelector uint64 ExistingAddresses []datastore.AddressRef ConstructorArgs fqops.ConstructorArgs - PriceUpdates fqops.PriceUpdates - DestChainConfigs []fqops.DestChainConfigArgs + PriceUpdates fqbind.InternalPriceUpdates + DestChainConfigs []fqbind.FeeQuoterDestChainConfigArgs TokenTransferFeeConfigUpdates fqops.ApplyTokenTransferFeeConfigUpdatesArgs - AuthorizedCallerUpdates fqops.AuthorizedCallerArgs + AuthorizedCallerUpdates fqbind.AuthorizedCallersAuthorizedCallerArgs } func (fqu FeeQuoterUpdate) IsEmpty() (bool, error) { @@ -131,11 +132,9 @@ var ( gasPriceUpdateBatches := batches.GasPriceUpdateBatches tokenPriceUpdateBatches := batches.TokenPriceUpdateBatches - // deploy fee quoter or fetch existing fee quoter address - feeQuoterRef, err := contract.MaybeDeployContract( - b, fqops.Deploy, chain, contract.DeployInput[fqops.ConstructorArgs]{ + feeQuoterRef, err := ops2contract.MaybeDeployContract( + b, fqops.Deploy, chain, ops2contract.DeployInput[fqops.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(fqops.ContractType, *fqops.Version), - ChainSelector: chain.Selector, Args: input.ConstructorArgs, }, input.ExistingAddresses) if err != nil { @@ -145,17 +144,19 @@ var ( return sequences.OnChainOutput{}, fmt.Errorf("failed to deploy or "+ "fetch FeeQuoter on chain %s", chain.String()) } - writes := make([]contract.WriteOutput, 0) + writes := make([]ops2contract.WriteOutput, 0) output.Addresses = append(output.Addresses, feeQuoterRef) fqAddr := common.HexToAddress(feeQuoterRef.Address) - // ApplyDestChainConfigUpdates on FeeQuoter + fqContract, err := fqbind.NewFeeQuoter(fqAddr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind fee quoter: %w", err) + } + for _, batch := range destChainConfigBatches { feeQuoterReport, err := cldf_ops.ExecuteOperation( - b, fqops.ApplyDestChainConfigUpdates, chain, - contract.FunctionInput[[]fqops.DestChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: fqAddr, - Args: batch, + b, fqops.NewWriteApplyDestChainConfigUpdates(fqContract), chain, + ops2contract.FunctionInput[[]fqbind.FeeQuoterDestChainConfigArgs]{ + Args: batch, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply dest chain "+ @@ -164,17 +165,16 @@ var ( writes = append(writes, feeQuoterReport.Output) } - // update price (gas and token prices batched to avoid block gas limit; paired by step index) priceUpdateSteps := len(gasPriceUpdateBatches) if len(tokenPriceUpdateBatches) > priceUpdateSteps { priceUpdateSteps = len(tokenPriceUpdateBatches) } for i := 0; i < priceUpdateSteps; i++ { - var gasBatch []fqops.GasPriceUpdate + var gasBatch []fqbind.InternalGasPriceUpdate if i < len(gasPriceUpdateBatches) { gasBatch = gasPriceUpdateBatches[i] } - var tokenBatch []fqops.TokenPriceUpdate + var tokenBatch []fqbind.InternalTokenPriceUpdate if i < len(tokenPriceUpdateBatches) { tokenBatch = tokenPriceUpdateBatches[i] } @@ -182,10 +182,8 @@ var ( continue } feeQuoterUpdatePricesReport, err := cldf_ops.ExecuteOperation( - b, fqops.UpdatePrices, chain, contract.FunctionInput[fqops.PriceUpdates]{ - ChainSelector: chain.Selector, - Address: fqAddr, - Args: fqops.PriceUpdates{ + b, fqops.NewWriteUpdatePrices(fqContract), chain, ops2contract.FunctionInput[fqbind.InternalPriceUpdates]{ + Args: fqbind.InternalPriceUpdates{ GasPriceUpdates: gasBatch, TokenPriceUpdates: tokenBatch, }, @@ -198,19 +196,16 @@ var ( } defaultFeeConfigApplied := false for _, batch := range tokenTransferFeeConfigBatches { - // we consider that TokensToUseDefaultFeeConfigs will not have a lot of entries, so we can apply them in the first batch - var defaultFeeConfig []fqops.TokenTransferFeeConfigRemoveArgs + var defaultFeeConfig []fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs if !defaultFeeConfigApplied { defaultFeeConfig = input.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs defaultFeeConfigApplied = true } else { - defaultFeeConfig = make([]fqops.TokenTransferFeeConfigRemoveArgs, 0) + defaultFeeConfig = make([]fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs, 0) } feeQuoterTokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation( - b, fqops.ApplyTokenTransferFeeConfigUpdates, chain, - contract.FunctionInput[fqops.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: chain.Selector, - Address: fqAddr, + b, fqops.NewWriteApplyTokenTransferFeeConfigUpdates(fqContract), chain, + ops2contract.FunctionInput[fqops.ApplyTokenTransferFeeConfigUpdatesArgs]{ Args: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ TokenTransferFeeConfigArgs: batch, TokensToUseDefaultFeeConfigs: defaultFeeConfig, @@ -223,13 +218,10 @@ var ( writes = append(writes, feeQuoterTokenTransferFeeConfigReport.Output) } - // in case there are still TokensToUseDefaultFeeConfigs that are not applied because they are not included in the batches, we apply them here if len(input.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs) > 0 && !defaultFeeConfigApplied { feeQuoterTokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation( - b, fqops.ApplyTokenTransferFeeConfigUpdates, chain, - contract.FunctionInput[fqops.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: chain.Selector, - Address: fqAddr, + b, fqops.NewWriteApplyTokenTransferFeeConfigUpdates(fqContract), chain, + ops2contract.FunctionInput[fqops.ApplyTokenTransferFeeConfigUpdatesArgs]{ Args: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ TokensToUseDefaultFeeConfigs: input.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs, }, @@ -240,15 +232,12 @@ var ( } writes = append(writes, feeQuoterTokenTransferFeeConfigReport.Output) } - // ApplyAuthorizedCallerUpdates on FeeQuoter if len(input.AuthorizedCallerUpdates.AddedCallers) > 0 || len(input.AuthorizedCallerUpdates.RemovedCallers) > 0 { feeQuoterAuthorizedCallerReport, err := cldf_ops.ExecuteOperation( - b, fqops.ApplyAuthorizedCallerUpdates, chain, - contract.FunctionInput[fqops.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: fqAddr, - Args: input.AuthorizedCallerUpdates, + b, fqops.NewWriteApplyAuthorizedCallerUpdates(fqContract), chain, + ops2contract.FunctionInput[fqbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: input.AuthorizedCallerUpdates, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply authorized caller "+ @@ -256,7 +245,7 @@ var ( } writes = append(writes, feeQuoterAuthorizedCallerReport.Output) } - batch, err := contract.NewBatchOperationFromWrites(writes) + batch, err := ops2contract.NewBatchOperationFromWrites(writes) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -327,8 +316,8 @@ var ( "", ) isNewFQV2Deployment := datastore_utils.IsAddressRefEmpty(feeQuoterRef) - tokenTransferFeeConfigArgs := make([]fqops.TokenTransferFeeConfigArgs, 0) - allDestChainConfigs := make([]fqops.DestChainConfigArgs, 0) + tokenTransferFeeConfigArgs := make([]fqbind.FeeQuoterTokenTransferFeeConfigArgs, 0) + allDestChainConfigs := make([]fqbind.FeeQuoterDestChainConfigArgs, 0) lastKnownGasPriceUpdates := make(map[uint64]*big.Int) var providedRemoteChains map[uint64]struct{} if len(input.RemoteChainSelectors) > 0 { @@ -371,9 +360,9 @@ var ( output.PriceUpdates.TokenPriceUpdates = append(output.PriceUpdates.TokenPriceUpdates, priceUpdates.TokenPriceUpdates...) } - outDestchainCfg := fqops.DestChainConfigArgs{ + outDestchainCfg := fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: remoteChain, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: destChainConfig.IsEnabled, MaxDataBytes: destChainConfig.MaxDataBytes, MaxPerMsgGasLimit: destChainConfig.MaxPerMsgGasLimit, @@ -387,14 +376,14 @@ var ( LinkFeeMultiplierPercent: LinkFeeMultiplierPercent, }, } - tokenTransferFeeCfgs := make([]fqops.TokenTransferFeeConfigSingleTokenArgs, 0) + tokenTransferFeeCfgs := make([]fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs, 0) for token, transferCfg := range cfg.TokenTransferFeeCfgs { if !transferCfg.IsEnabled { continue } - tokenTransferFeeCfgs = append(tokenTransferFeeCfgs, fqops.TokenTransferFeeConfigSingleTokenArgs{ + tokenTransferFeeCfgs = append(tokenTransferFeeCfgs, fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ Token: token, - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fqbind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: transferCfg.MinFeeUSDCents, DestGasOverhead: transferCfg.DestGasOverhead, DestBytesOverhead: transferCfg.DestBytesOverhead, @@ -402,7 +391,7 @@ var ( }, }) } - tokenTransferFeeConfigArgs = append(tokenTransferFeeConfigArgs, fqops.TokenTransferFeeConfigArgs{ + tokenTransferFeeConfigArgs = append(tokenTransferFeeConfigArgs, fqbind.FeeQuoterTokenTransferFeeConfigArgs{ DestChainSelector: remoteChain, TokenTransferFeeConfigs: tokenTransferFeeCfgs, }) @@ -422,7 +411,7 @@ var ( // if new deployment, adding deployer key as price updater so that // manual gas prices can be set right after deployment if needed output.ConstructorArgs = fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: fqOutput.StaticCfg.LinkToken, MaxFeeJuelsPerMsg: fqOutput.StaticCfg.MaxFeeJuelsPerMsg, }, @@ -431,7 +420,7 @@ var ( DestChainConfigArgs: allDestChainConfigs, } } else { - output.AuthorizedCallerUpdates = fqops.AuthorizedCallerArgs{ + output.AuthorizedCallerUpdates = fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: fqOutput.PriceUpdaters, } output.TokenTransferFeeConfigUpdates = fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ @@ -530,9 +519,9 @@ var ( ) isNewFQv2Deployment := datastore_utils.IsAddressRefEmpty(feeQuoterV2Ref) - var staticCfg fqops.StaticConfig - var destChainCfgs []fqops.DestChainConfigArgs - var tokenTransferFeeConfigArgsForAll []fqops.TokenTransferFeeConfigArgs + var staticCfg fqbind.FeeQuoterStaticConfig + var destChainCfgs []fqbind.FeeQuoterDestChainConfigArgs + var tokenTransferFeeConfigArgsForAll []fqbind.FeeQuoterTokenTransferFeeConfigArgs var providedRemoteChains map[uint64]struct{} if len(input.RemoteChainSelectors) > 0 { // initialize providedRemoteChains map if remote chain selectors are provided in the input, @@ -554,7 +543,7 @@ var ( output.PriceUpdates.TokenPriceUpdates = append(output.PriceUpdates.TokenPriceUpdates, lastKnownPriceUpdates.TokenPriceUpdates...) output.PriceUpdates.GasPriceUpdates = append(output.PriceUpdates.GasPriceUpdates, lastKnownPriceUpdates.GasPriceUpdates...) for _, meta := range onRampMetadata { - var tokenTransferFeeConfigArgs []fqops.TokenTransferFeeConfigSingleTokenArgs + var tokenTransferFeeConfigArgs []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs // Convert metadata to typed struct if needed onRampCfg, err := datastore_utils.ConvertMetadataToType[seq1_5.OnRampImportConfigSequenceOutput](meta.Metadata) @@ -580,16 +569,16 @@ var ( } } if staticCfg.LinkToken == (common.Address{}) { - staticCfg = fqops.StaticConfig{ + staticCfg = fqbind.FeeQuoterStaticConfig{ LinkToken: onRampCfg.StaticConfig.LinkToken, MaxFeeJuelsPerMsg: onRampCfg.StaticConfig.MaxNopFeesJuels, } } chainFamilySelector := utils.GetSelectorHex(onRampCfg.RemoteChainSelector) - destChainCfgs = append(destChainCfgs, fqops.DestChainConfigArgs{ + destChainCfgs = append(destChainCfgs, fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: onRampCfg.RemoteChainSelector, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: onRampCfg.DynamicConfig.MaxDataBytes, MaxPerMsgGasLimit: onRampCfg.DynamicConfig.MaxPerMsgGasLimit, @@ -604,9 +593,9 @@ var ( }, }) for token, tokenCfg := range onRampCfg.TokenTransferFeeConfig { - tokenTransferFeeConfigArgs = append(tokenTransferFeeConfigArgs, fqops.TokenTransferFeeConfigSingleTokenArgs{ + tokenTransferFeeConfigArgs = append(tokenTransferFeeConfigArgs, fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ Token: token, - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fqbind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: tokenCfg.MinFeeUSDCents, DestGasOverhead: tokenCfg.DestGasOverhead, DestBytesOverhead: tokenCfg.DestBytesOverhead, @@ -614,14 +603,14 @@ var ( }, }) } - tokenTransferFeeConfigArgsForAll = append(tokenTransferFeeConfigArgsForAll, fqops.TokenTransferFeeConfigArgs{ + tokenTransferFeeConfigArgsForAll = append(tokenTransferFeeConfigArgsForAll, fqbind.FeeQuoterTokenTransferFeeConfigArgs{ DestChainSelector: onRampCfg.RemoteChainSelector, TokenTransferFeeConfigs: tokenTransferFeeConfigArgs, }) } if isNewFQv2Deployment { output.ConstructorArgs = fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: staticCfg.LinkToken, MaxFeeJuelsPerMsg: staticCfg.MaxFeeJuelsPerMsg, }, @@ -632,7 +621,7 @@ var ( } else { output.DestChainConfigs = destChainCfgs output.TokenTransferFeeConfigUpdates.TokenTransferFeeConfigArgs = tokenTransferFeeConfigArgsForAll - output.AuthorizedCallerUpdates = fqops.AuthorizedCallerArgs{ + output.AuthorizedCallerUpdates = fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: priceUpdaters, } } @@ -719,7 +708,7 @@ func MergeFeeQuoterUpdateOutputs(output16, output15 FeeQuoterUpdate) (FeeQuoterU } // AuthorizedCallerUpdates: merge unique entries from both outputs - result.AuthorizedCallerUpdates = mergePriceUpdaters(result.AuthorizedCallerUpdates, output15.AuthorizedCallerUpdates) + result.AuthorizedCallerUpdates = mergeAuthorizedCallerUpdates(result.AuthorizedCallerUpdates, output15.AuthorizedCallerUpdates) // PriceUpdates: merge by dest chain / token; v1.6.x (output16) takes precedence on duplicates result.PriceUpdates = mergeFeeQuoterPriceUpdates(output16.PriceUpdates, output15.PriceUpdates) @@ -729,22 +718,22 @@ func MergeFeeQuoterUpdateOutputs(output16, output15 FeeQuoterUpdate) (FeeQuoterU // mergeFeeQuoterPriceUpdates merges token and gas price updates from two sources. For duplicate // destination chain selectors (gas) or source tokens (token prices), values from p16 win. -func mergeFeeQuoterPriceUpdates(p16, p15 fqops.PriceUpdates) fqops.PriceUpdates { - gasByDest := make(map[uint64]fqops.GasPriceUpdate) +func mergeFeeQuoterPriceUpdates(p16, p15 fqbind.InternalPriceUpdates) fqbind.InternalPriceUpdates { + gasByDest := make(map[uint64]fqbind.InternalGasPriceUpdate) for _, u := range p15.GasPriceUpdates { gasByDest[u.DestChainSelector] = u } for _, u := range p16.GasPriceUpdates { gasByDest[u.DestChainSelector] = u } - tokenByAddr := make(map[common.Address]fqops.TokenPriceUpdate) + tokenByAddr := make(map[common.Address]fqbind.InternalTokenPriceUpdate) for _, u := range p15.TokenPriceUpdates { tokenByAddr[u.SourceToken] = u } for _, u := range p16.TokenPriceUpdates { tokenByAddr[u.SourceToken] = u } - var out fqops.PriceUpdates + var out fqbind.InternalPriceUpdates for _, u := range gasByDest { out.GasPriceUpdates = append(out.GasPriceUpdates, u) } @@ -754,7 +743,7 @@ func mergeFeeQuoterPriceUpdates(p16, p15 fqops.PriceUpdates) fqops.PriceUpdates return out } -func mergeTokenTransferFeeConfigArgs(args1, args2 []fqops.TokenTransferFeeConfigArgs) []fqops.TokenTransferFeeConfigArgs { +func mergeTokenTransferFeeConfigArgs(args1, args2 []fqbind.FeeQuoterTokenTransferFeeConfigArgs) []fqbind.FeeQuoterTokenTransferFeeConfigArgs { result := args1 // TokenTransferFeeConfigArgs: merge by DestChainSelector if len(result) == 0 { @@ -776,7 +765,7 @@ func mergeTokenTransferFeeConfigArgs(args1, args2 []fqops.TokenTransferFeeConfig return result } -func mergePriceUpdaters(updaters1, updaters2 fqops.AuthorizedCallerArgs) fqops.AuthorizedCallerArgs { +func mergeAuthorizedCallerUpdates(updaters1, updaters2 fqbind.AuthorizedCallersAuthorizedCallerArgs) fqbind.AuthorizedCallersAuthorizedCallerArgs { result := updaters1 // AddedCallers: merge unique addresses from both outputs addedCallersMap := make(map[common.Address]bool) @@ -804,11 +793,11 @@ func mergePriceUpdaters(updaters1, updaters2 fqops.AuthorizedCallerArgs) fqops.A } // mergeDestChainConfigs merges two slices of DestChainConfigArgs, giving precedence to the first slice in case of duplicate DestChainSelectors. -func mergeDestChainConfigs(cfgs1, cfgs2 []fqops.DestChainConfigArgs) []fqops.DestChainConfigArgs { +func mergeDestChainConfigs(cfgs1, cfgs2 []fqbind.FeeQuoterDestChainConfigArgs) []fqbind.FeeQuoterDestChainConfigArgs { result := cfgs1 // Create a map of dest chain selectors from cfgs1 which will be skipped when adding from cfgs2 - destChainMap := make(map[uint64]fqops.DestChainConfigArgs) + destChainMap := make(map[uint64]fqbind.FeeQuoterDestChainConfigArgs) for _, cfg := range cfgs1 { destChainMap[cfg.DestChainSelector] = cfg } @@ -825,7 +814,7 @@ func mergeDestChainConfigs(cfgs1, cfgs2 []fqops.DestChainConfigArgs) []fqops.Des } func IsConstructorArgsEmpty(a fqops.ConstructorArgs) bool { - return (a.StaticConfig == fqops.StaticConfig{}) && + return (a.StaticConfig == fqbind.FeeQuoterStaticConfig{}) && len(a.PriceUpdaters) == 0 && len(a.TokenTransferFeeConfigArgs) == 0 && len(a.DestChainConfigArgs) == 0 @@ -838,7 +827,7 @@ func IsConstructorArgsEmpty(a fqops.ConstructorArgs) bool { // and adds it to the output. If the chain family has no hardcoded price, it returns empty price updates. // Returns an error only for an invalid gas price string in config or failure to resolve the chain family. // It is exported for testing. -func HandleEmptyGasPriceStalenessThreshold(remoteChain uint64, input deploy.FeeQuoterUpdateInput) (output fqops.PriceUpdates, err error) { +func HandleEmptyGasPriceStalenessThreshold(remoteChain uint64, input deploy.FeeQuoterUpdateInput) (output fqbind.InternalPriceUpdates, err error) { var staticPrice *big.Int if input.AdditionalConfig != nil && input.AdditionalConfig.GasPricesPerRemoteChain != nil { gaspriceStr, ok := input.AdditionalConfig.GasPricesPerRemoteChain[remoteChain] @@ -846,7 +835,7 @@ func HandleEmptyGasPriceStalenessThreshold(remoteChain uint64, input deploy.FeeQ var success bool staticPrice, success = new(big.Int).SetString(gaspriceStr, 10) if !success { - return fqops.PriceUpdates{}, fmt.Errorf("invalid gas price %s for remote chain %d in input additional config", gaspriceStr, remoteChain) + return fqbind.InternalPriceUpdates{}, fmt.Errorf("invalid gas price %s for remote chain %d in input additional config", gaspriceStr, remoteChain) } } } @@ -854,24 +843,24 @@ func HandleEmptyGasPriceStalenessThreshold(remoteChain uint64, input deploy.FeeQ // check if static gas price is already hard coded for the chain family chainFamily, err := chain_selectors.GetSelectorFamily(remoteChain) if err != nil { - return fqops.PriceUpdates{}, fmt.Errorf("failed to get chain family for remote chain %d: %w", remoteChain, err) + return fqbind.InternalPriceUpdates{}, fmt.Errorf("failed to get chain family for remote chain %d: %w", remoteChain, err) } var exists bool staticPrice, exists = staticGasPriceByChainFamily[chainFamily] if !exists || staticPrice == nil { - return fqops.PriceUpdates{}, nil + return fqbind.InternalPriceUpdates{}, nil } } - output.GasPriceUpdates = append(output.GasPriceUpdates, fqops.GasPriceUpdate{ + output.GasPriceUpdates = append(output.GasPriceUpdates, fqbind.InternalGasPriceUpdate{ DestChainSelector: remoteChain, UsdPerUnitGas: staticPrice, }) return output, nil } -func batchedDestChainConfigArgs(destChainConfigs []fqops.DestChainConfigArgs) [][]fqops.DestChainConfigArgs { - var batches [][]fqops.DestChainConfigArgs +func batchedDestChainConfigArgs(destChainConfigs []fqbind.FeeQuoterDestChainConfigArgs) [][]fqbind.FeeQuoterDestChainConfigArgs { + var batches [][]fqbind.FeeQuoterDestChainConfigArgs if len(destChainConfigs) <= DestChainConfigUpdateBatchLen { return append(batches, destChainConfigs) } @@ -885,8 +874,8 @@ func batchedDestChainConfigArgs(destChainConfigs []fqops.DestChainConfigArgs) [] return batches } -func batchedTokenTransferFeeConfigArgs(tokenTransferFeeConfigArgs []fqops.TokenTransferFeeConfigArgs) [][]fqops.TokenTransferFeeConfigArgs { - var batches [][]fqops.TokenTransferFeeConfigArgs +func batchedTokenTransferFeeConfigArgs(tokenTransferFeeConfigArgs []fqbind.FeeQuoterTokenTransferFeeConfigArgs) [][]fqbind.FeeQuoterTokenTransferFeeConfigArgs { + var batches [][]fqbind.FeeQuoterTokenTransferFeeConfigArgs if len(tokenTransferFeeConfigArgs) <= TokenTransferFeeConfigUpdateBatchLen { return append(batches, tokenTransferFeeConfigArgs) } @@ -900,8 +889,8 @@ func batchedTokenTransferFeeConfigArgs(tokenTransferFeeConfigArgs []fqops.TokenT return batches } -func batchedGasPriceUpdates(gasPriceUpdates []fqops.GasPriceUpdate) [][]fqops.GasPriceUpdate { - var batches [][]fqops.GasPriceUpdate +func batchedGasPriceUpdates(gasPriceUpdates []fqbind.InternalGasPriceUpdate) [][]fqbind.InternalGasPriceUpdate { + var batches [][]fqbind.InternalGasPriceUpdate if len(gasPriceUpdates) <= GasPriceUpdateBatchLen { return append(batches, gasPriceUpdates) } @@ -915,8 +904,8 @@ func batchedGasPriceUpdates(gasPriceUpdates []fqops.GasPriceUpdate) [][]fqops.Ga return batches } -func batchedTokenPriceUpdates(tokenPriceUpdates []fqops.TokenPriceUpdate) [][]fqops.TokenPriceUpdate { - var batches [][]fqops.TokenPriceUpdate +func batchedTokenPriceUpdates(tokenPriceUpdates []fqbind.InternalTokenPriceUpdate) [][]fqbind.InternalTokenPriceUpdate { + var batches [][]fqbind.InternalTokenPriceUpdate if len(tokenPriceUpdates) <= TokenPriceUpdateBatchLen { return append(batches, tokenPriceUpdates) } @@ -931,10 +920,10 @@ func batchedTokenPriceUpdates(tokenPriceUpdates []fqops.TokenPriceUpdate) [][]fq } type BatchedFeeQuoterUpdate struct { - DestChainConfigBatches [][]fqops.DestChainConfigArgs - TokenTransferFeeConfigBatches [][]fqops.TokenTransferFeeConfigArgs - GasPriceUpdateBatches [][]fqops.GasPriceUpdate - TokenPriceUpdateBatches [][]fqops.TokenPriceUpdate + DestChainConfigBatches [][]fqbind.FeeQuoterDestChainConfigArgs + TokenTransferFeeConfigBatches [][]fqbind.FeeQuoterTokenTransferFeeConfigArgs + GasPriceUpdateBatches [][]fqbind.InternalGasPriceUpdate + TokenPriceUpdateBatches [][]fqbind.InternalTokenPriceUpdate } // BatchedInputForSequenceFeeQuoterUpdate takes the FeeQuoterUpdate output from the import sequences and checks if the number of dest chain configs, token transfer fee configs, gas price updates, or token price updates exceed the batch length limit for on-chain update. @@ -942,10 +931,10 @@ type BatchedFeeQuoterUpdate struct { // This is to avoid hitting block gas limit when there are too many dest chain configs, token transfer fee configs, gas price updates, or token price updates to be updated on-chain. // Exported for testing. func BatchedInputForSequenceFeeQuoterUpdate(input *FeeQuoterUpdate) BatchedFeeQuoterUpdate { - var destChainConfigBatches [][]fqops.DestChainConfigArgs - var tokenTransferFeeConfigBatches [][]fqops.TokenTransferFeeConfigArgs - var gasPriceUpdateBatches [][]fqops.GasPriceUpdate - var tokenPriceUpdateBatches [][]fqops.TokenPriceUpdate + var destChainConfigBatches [][]fqbind.FeeQuoterDestChainConfigArgs + var tokenTransferFeeConfigBatches [][]fqbind.FeeQuoterTokenTransferFeeConfigArgs + var gasPriceUpdateBatches [][]fqbind.InternalGasPriceUpdate + var tokenPriceUpdateBatches [][]fqbind.InternalTokenPriceUpdate // check the destchain configs in constructor args, if it needs batching, we send batch 1 // in constructor args, and then rest of the batches in ApplyDestChainConfigUpdates, // this is to make sure that if there are a lot of dest chain configs to be updated, we don't run into block gas limit issue @@ -989,19 +978,19 @@ func BatchedInputForSequenceFeeQuoterUpdate(input *FeeQuoterUpdate) BatchedFeeQu } } -func GetLastKnownPriceUpdates(tokenPrices map[common.Address]*big.Int, gasPrices map[uint64]*big.Int, inputPrices map[uint64]string) (fqops.PriceUpdates, error) { - var tokenPriceUpdates []fqops.TokenPriceUpdate +func GetLastKnownPriceUpdates(tokenPrices map[common.Address]*big.Int, gasPrices map[uint64]*big.Int, inputPrices map[uint64]string) (fqbind.InternalPriceUpdates, error) { + var tokenPriceUpdates []fqbind.InternalTokenPriceUpdate for token, price := range tokenPrices { if price == nil || price.Cmp(big.NewInt(0)) <= 0 { // if price is not found or invalid, we just skip adding price update for that token, continue } - tokenPriceUpdates = append(tokenPriceUpdates, fqops.TokenPriceUpdate{ + tokenPriceUpdates = append(tokenPriceUpdates, fqbind.InternalTokenPriceUpdate{ SourceToken: token, UsdPerToken: price, }) } - var gasPriceUpdates []fqops.GasPriceUpdate + var gasPriceUpdates []fqbind.InternalGasPriceUpdate for chainSelector, price := range gasPrices { if price == nil || price.Cmp(big.NewInt(0)) <= 0 { priceStr := "nil" @@ -1015,20 +1004,20 @@ func GetLastKnownPriceUpdates(tokenPrices map[common.Address]*big.Int, gasPrices } family, err := chain_selectors.GetSelectorFamily(chainSelector) if err != nil { - return fqops.PriceUpdates{}, fmt.Errorf("failed to get chain family for remote chain %d: %w", chainSelector, err) + return fqbind.InternalPriceUpdates{}, fmt.Errorf("failed to get chain family for remote chain %d: %w", chainSelector, err) } if _, exists := staticGasPriceByChainFamily[family]; exists { // if the chain family has a hardcoded static price, we skip the error and rely on that static price to be used in the import sequence continue } - return fqops.PriceUpdates{}, fmt.Errorf("invalid gas price %s for remote chain %d", priceStr, chainSelector) + return fqbind.InternalPriceUpdates{}, fmt.Errorf("invalid gas price %s for remote chain %d", priceStr, chainSelector) } - gasPriceUpdates = append(gasPriceUpdates, fqops.GasPriceUpdate{ + gasPriceUpdates = append(gasPriceUpdates, fqbind.InternalGasPriceUpdate{ DestChainSelector: chainSelector, UsdPerUnitGas: price, }) } - return fqops.PriceUpdates{ + return fqbind.InternalPriceUpdates{ TokenPriceUpdates: tokenPriceUpdates, GasPriceUpdates: gasPriceUpdates, }, nil diff --git a/chains/evm/deployment/v2_0_0/sequences/fee_quoter_test.go b/chains/evm/deployment/v2_0_0/sequences/fee_quoter_test.go index 5c2f086cc6..9a3972c77e 100644 --- a/chains/evm/deployment/v2_0_0/sequences/fee_quoter_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/fee_quoter_test.go @@ -10,6 +10,7 @@ import ( fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" + fqbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" ) func TestFeeQuoterUpdate_IsEmpty(t *testing.T) { @@ -49,7 +50,7 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } output15 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: linkToken, MaxFeeJuelsPerMsg: maxFeeJuelsPerMsg, }, @@ -68,7 +69,7 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { maxFeeJuelsPerMsg15 := big.NewInt(1000000000000000000) // 1 LINK output16 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: linkToken16, MaxFeeJuelsPerMsg: maxFeeJuelsPerMsg16, }, @@ -76,7 +77,7 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } output15 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: linkToken15, MaxFeeJuelsPerMsg: maxFeeJuelsPerMsg15, }, @@ -92,23 +93,23 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { t.Run("ConstructorArgs - merge DestChainConfig,PriceUpdaters TokenTransferFeeConfigArgs", func(t *testing.T) { output16 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: common.HexToAddress("0x514910771AF9Ca656af840dff83E8264EcF986CA"), MaxFeeJuelsPerMsg: big.NewInt(2000000000000000000), // 2 LINK }, PriceUpdaters: []common.Address{addr1, addr2}, - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 100, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr1}, }, }, }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fqbind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 100, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 1000, }, @@ -118,36 +119,36 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } output15 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: common.HexToAddress("0x326C977E6efc84E512bB9C30f76E30c160eD06FB"), MaxFeeJuelsPerMsg: big.NewInt(1000000000000000000), // 1 LINK }, PriceUpdaters: []common.Address{addr2, addr3}, // addr2 is duplicate - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 100, // duplicate selector - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr2}, }, }, { DestChainSelector: 200, // unique selector - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr3}, }, }, }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fqbind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 100, // duplicate selector - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: false, MaxDataBytes: 2000, }, }, { DestChainSelector: 200, // unique selector - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 3000, }, @@ -157,36 +158,36 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } expected := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: common.HexToAddress("0x514910771AF9Ca656af840dff83E8264EcF986CA"), MaxFeeJuelsPerMsg: big.NewInt(2000000000000000000), // from output16 }, PriceUpdaters: []common.Address{addr1, addr2, addr3}, // merged with duplicates removed - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 100, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr1}, // from output16 (takes precedence) }, }, { DestChainSelector: 200, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr3}, // from output15 }, }, }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fqbind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 100, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 1000, }, }, { DestChainSelector: 200, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 3000, }, @@ -214,10 +215,10 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { t.Run("DestChainConfigs - output16 takes precedence for duplicates", func(t *testing.T) { output16 := sequences.FeeQuoterUpdate{ - DestChainConfigs: []fqops.DestChainConfigArgs{ + DestChainConfigs: []fqbind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 100, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 1000, }, @@ -225,17 +226,17 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { }, } output15 := sequences.FeeQuoterUpdate{ - DestChainConfigs: []fqops.DestChainConfigArgs{ + DestChainConfigs: []fqbind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 100, // duplicate selector - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: false, MaxDataBytes: 2000, }, }, { DestChainSelector: 200, // unique selector - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fqbind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 3000, }, @@ -257,10 +258,10 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { t.Run("TokenTransferFeeConfigArgs - output16 takes precedence for duplicates", func(t *testing.T) { output16 := sequences.FeeQuoterUpdate{ TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 100, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr1}, }, }, @@ -269,16 +270,16 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } output15 := sequences.FeeQuoterUpdate{ TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 100, // duplicate - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr2}, }, }, { DestChainSelector: 200, // unique - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ {Token: addr3}, }, }, @@ -299,7 +300,7 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { t.Run("TokensToUseDefaultFeeConfigs - merge by DestChainSelector and Token", func(t *testing.T) { output16 := sequences.FeeQuoterUpdate{ TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokensToUseDefaultFeeConfigs: []fqops.TokenTransferFeeConfigRemoveArgs{ + TokensToUseDefaultFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{ {DestChainSelector: 100, Token: addr1}, {DestChainSelector: 100, Token: addr2}, }, @@ -307,7 +308,7 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { } output15 := sequences.FeeQuoterUpdate{ TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokensToUseDefaultFeeConfigs: []fqops.TokenTransferFeeConfigRemoveArgs{ + TokensToUseDefaultFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{ {DestChainSelector: 100, Token: addr2}, // duplicate {DestChainSelector: 200, Token: addr3}, // unique }, @@ -318,22 +319,22 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { require.Len(t, result.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs, 3) // Verify all expected entries are present require.Contains(t, result.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs, - fqops.TokenTransferFeeConfigRemoveArgs{DestChainSelector: 100, Token: addr1}) + fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{DestChainSelector: 100, Token: addr1}) require.Contains(t, result.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs, - fqops.TokenTransferFeeConfigRemoveArgs{DestChainSelector: 100, Token: addr2}) + fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{DestChainSelector: 100, Token: addr2}) require.Contains(t, result.TokenTransferFeeConfigUpdates.TokensToUseDefaultFeeConfigs, - fqops.TokenTransferFeeConfigRemoveArgs{DestChainSelector: 200, Token: addr3}) + fqbind.FeeQuoterTokenTransferFeeConfigRemoveArgs{DestChainSelector: 200, Token: addr3}) }) t.Run("AuthorizedCallerUpdates - merge unique entries", func(t *testing.T) { output16 := sequences.FeeQuoterUpdate{ - AuthorizedCallerUpdates: fqops.AuthorizedCallerArgs{ + AuthorizedCallerUpdates: fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{addr1, addr2}, RemovedCallers: []common.Address{addr3}, }, } output15 := sequences.FeeQuoterUpdate{ - AuthorizedCallerUpdates: fqops.AuthorizedCallerArgs{ + AuthorizedCallerUpdates: fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{addr2, addr4}, // addr2 is duplicate RemovedCallers: []common.Address{addr3, addr5}, // addr3 is duplicate }, @@ -356,41 +357,41 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { maxFeeJuelsPerMsg15 := big.NewInt(1000000000000000000) // 1 LINK output16 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: linkToken16, MaxFeeJuelsPerMsg: maxFeeJuelsPerMsg16, }, }, - DestChainConfigs: []fqops.DestChainConfigArgs{ - {DestChainSelector: 200, DestChainConfig: fqops.DestChainConfig{IsEnabled: true}}, + DestChainConfigs: []fqbind.FeeQuoterDestChainConfigArgs{ + {DestChainSelector: 200, DestChainConfig: fqbind.FeeQuoterDestChainConfig{IsEnabled: true}}, }, TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ - {DestChainSelector: 400, TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{{Token: addr1}}}, + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ + {DestChainSelector: 400, TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{{Token: addr1}}}, }, }, - AuthorizedCallerUpdates: fqops.AuthorizedCallerArgs{ + AuthorizedCallerUpdates: fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{addr1}, }, } output15 := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fqbind.FeeQuoterStaticConfig{ LinkToken: linkToken15, MaxFeeJuelsPerMsg: maxFeeJuelsPerMsg15, }, }, - DestChainConfigs: []fqops.DestChainConfigArgs{ - {DestChainSelector: 200, DestChainConfig: fqops.DestChainConfig{IsEnabled: false}}, // duplicate - {DestChainSelector: 300, DestChainConfig: fqops.DestChainConfig{IsEnabled: true}}, // unique + DestChainConfigs: []fqbind.FeeQuoterDestChainConfigArgs{ + {DestChainSelector: 200, DestChainConfig: fqbind.FeeQuoterDestChainConfig{IsEnabled: false}}, // duplicate + {DestChainSelector: 300, DestChainConfig: fqbind.FeeQuoterDestChainConfig{IsEnabled: true}}, // unique }, TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ - {DestChainSelector: 400, TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{{Token: addr2}}}, // duplicate - {DestChainSelector: 500, TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{{Token: addr3}}}, // unique + TokenTransferFeeConfigArgs: []fqbind.FeeQuoterTokenTransferFeeConfigArgs{ + {DestChainSelector: 400, TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{{Token: addr2}}}, // duplicate + {DestChainSelector: 500, TokenTransferFeeConfigs: []fqbind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{{Token: addr3}}}, // unique }, }, - AuthorizedCallerUpdates: fqops.AuthorizedCallerArgs{ + AuthorizedCallerUpdates: fqbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{addr2, addr3}, }, } @@ -414,21 +415,21 @@ func TestMergeFeeQuoterUpdateOutputs(t *testing.T) { }) } -func destChainConfigsFromSelectors(selectors ...uint64) []fqops.DestChainConfigArgs { - out := make([]fqops.DestChainConfigArgs, len(selectors)) +func destChainConfigsFromSelectors(selectors ...uint64) []fqbind.FeeQuoterDestChainConfigArgs { + out := make([]fqbind.FeeQuoterDestChainConfigArgs, len(selectors)) for i, s := range selectors { - out[i] = fqops.DestChainConfigArgs{ + out[i] = fqbind.FeeQuoterDestChainConfigArgs{ DestChainSelector: s, - DestChainConfig: fqops.DestChainConfig{IsEnabled: true}, + DestChainConfig: fqbind.FeeQuoterDestChainConfig{IsEnabled: true}, } } return out } -func tokenTransferFeeConfigArgsFromSelectors(selectors ...uint64) []fqops.TokenTransferFeeConfigArgs { - out := make([]fqops.TokenTransferFeeConfigArgs, len(selectors)) +func tokenTransferFeeConfigArgsFromSelectors(selectors ...uint64) []fqbind.FeeQuoterTokenTransferFeeConfigArgs { + out := make([]fqbind.FeeQuoterTokenTransferFeeConfigArgs, len(selectors)) for i, s := range selectors { - out[i] = fqops.TokenTransferFeeConfigArgs{DestChainSelector: s} + out[i] = fqbind.FeeQuoterTokenTransferFeeConfigArgs{DestChainSelector: s} } return out } @@ -447,7 +448,7 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { cfgs := destChainConfigsFromSelectors(1, 2, 3) input := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - DestChainConfigArgs: append([]fqops.DestChainConfigArgs(nil), cfgs...), + DestChainConfigArgs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), cfgs...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) @@ -467,14 +468,14 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { cfgs := destChainConfigsFromSelectors(selectors...) input := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - DestChainConfigArgs: append([]fqops.DestChainConfigArgs(nil), cfgs...), + DestChainConfigArgs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), cfgs...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Len(t, input.ConstructorArgs.DestChainConfigArgs, 8) require.Equal(t, cfgs[:8], input.ConstructorArgs.DestChainConfigArgs) require.Len(t, got.DestChainConfigBatches, 1) - require.Equal(t, []fqops.DestChainConfigArgs{cfgs[8]}, got.DestChainConfigBatches[0]) + require.Equal(t, []fqbind.FeeQuoterDestChainConfigArgs{cfgs[8]}, got.DestChainConfigBatches[0]) require.Nil(t, got.TokenTransferFeeConfigBatches) require.Nil(t, got.GasPriceUpdateBatches) require.Nil(t, got.TokenPriceUpdateBatches) @@ -487,7 +488,7 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { } cfgs := destChainConfigsFromSelectors(selectors...) input := sequences.FeeQuoterUpdate{ - DestChainConfigs: append([]fqops.DestChainConfigArgs(nil), cfgs...), + DestChainConfigs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), cfgs...), } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Len(t, got.DestChainConfigBatches, 2) @@ -504,13 +505,13 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { updates := destChainConfigsFromSelectors(10, 11, 12) input := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - DestChainConfigArgs: append([]fqops.DestChainConfigArgs(nil), cons...), + DestChainConfigArgs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), cons...), }, - DestChainConfigs: append([]fqops.DestChainConfigArgs(nil), updates...), + DestChainConfigs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), updates...), } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Len(t, got.DestChainConfigBatches, 2) - require.Equal(t, []fqops.DestChainConfigArgs{cons[sequences.DestChainConfigUpdateBatchLen]}, got.DestChainConfigBatches[0]) + require.Equal(t, []fqbind.FeeQuoterDestChainConfigArgs{cons[sequences.DestChainConfigUpdateBatchLen]}, got.DestChainConfigBatches[0]) require.Equal(t, updates, got.DestChainConfigBatches[1]) }) @@ -522,7 +523,7 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { args := tokenTransferFeeConfigArgsFromSelectors(selectors...) input := sequences.FeeQuoterUpdate{ ConstructorArgs: fqops.ConstructorArgs{ - TokenTransferFeeConfigArgs: append([]fqops.TokenTransferFeeConfigArgs(nil), args...), + TokenTransferFeeConfigArgs: append([]fqbind.FeeQuoterTokenTransferFeeConfigArgs(nil), args...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) @@ -530,7 +531,7 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { require.Len(t, input.ConstructorArgs.TokenTransferFeeConfigArgs, sequences.TokenTransferFeeConfigUpdateBatchLen) require.Equal(t, args[:sequences.TokenTransferFeeConfigUpdateBatchLen], input.ConstructorArgs.TokenTransferFeeConfigArgs) require.Len(t, got.TokenTransferFeeConfigBatches, 1) - require.Equal(t, []fqops.TokenTransferFeeConfigArgs{args[sequences.TokenTransferFeeConfigUpdateBatchLen]}, got.TokenTransferFeeConfigBatches[0]) + require.Equal(t, []fqbind.FeeQuoterTokenTransferFeeConfigArgs{args[sequences.TokenTransferFeeConfigUpdateBatchLen]}, got.TokenTransferFeeConfigBatches[0]) require.Nil(t, got.GasPriceUpdateBatches) require.Nil(t, got.TokenPriceUpdateBatches) }) @@ -543,7 +544,7 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { args := tokenTransferFeeConfigArgsFromSelectors(selectors...) input := sequences.FeeQuoterUpdate{ TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: append([]fqops.TokenTransferFeeConfigArgs(nil), args...), + TokenTransferFeeConfigArgs: append([]fqbind.FeeQuoterTokenTransferFeeConfigArgs(nil), args...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) @@ -569,9 +570,9 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { tokenArgs := tokenTransferFeeConfigArgsFromSelectors(tokenSelectors...) input := sequences.FeeQuoterUpdate{ - DestChainConfigs: append([]fqops.DestChainConfigArgs(nil), destCfgs...), + DestChainConfigs: append([]fqbind.FeeQuoterDestChainConfigArgs(nil), destCfgs...), TokenTransferFeeConfigUpdates: fqops.ApplyTokenTransferFeeConfigUpdatesArgs{ - TokenTransferFeeConfigArgs: append([]fqops.TokenTransferFeeConfigArgs(nil), tokenArgs...), + TokenTransferFeeConfigArgs: append([]fqbind.FeeQuoterTokenTransferFeeConfigArgs(nil), tokenArgs...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) @@ -588,15 +589,15 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { }) t.Run("GasPriceUpdates within batch size returns single batch", func(t *testing.T) { - gasUpdates := make([]fqops.GasPriceUpdate, sequences.GasPriceUpdateBatchLen) + gasUpdates := make([]fqbind.InternalGasPriceUpdate, sequences.GasPriceUpdateBatchLen) for i := range gasUpdates { - gasUpdates[i] = fqops.GasPriceUpdate{ + gasUpdates[i] = fqbind.InternalGasPriceUpdate{ DestChainSelector: uint64(i + 1), UsdPerUnitGas: big.NewInt(int64(i + 1)), } } input := sequences.FeeQuoterUpdate{ - PriceUpdates: fqops.PriceUpdates{GasPriceUpdates: append([]fqops.GasPriceUpdate(nil), gasUpdates...)}, + PriceUpdates: fqbind.InternalPriceUpdates{GasPriceUpdates: append([]fqbind.InternalGasPriceUpdate(nil), gasUpdates...)}, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Nil(t, got.DestChainConfigBatches) @@ -609,15 +610,15 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { t.Run("GasPriceUpdates over batch size split into batches of GasPriceUpdateBatchLen", func(t *testing.T) { n := sequences.GasPriceUpdateBatchLen + 3 - gasUpdates := make([]fqops.GasPriceUpdate, n) + gasUpdates := make([]fqbind.InternalGasPriceUpdate, n) for i := range gasUpdates { - gasUpdates[i] = fqops.GasPriceUpdate{ + gasUpdates[i] = fqbind.InternalGasPriceUpdate{ DestChainSelector: uint64(100 + i), UsdPerUnitGas: big.NewInt(int64(100 + i)), } } input := sequences.FeeQuoterUpdate{ - PriceUpdates: fqops.PriceUpdates{GasPriceUpdates: append([]fqops.GasPriceUpdate(nil), gasUpdates...)}, + PriceUpdates: fqbind.InternalPriceUpdates{GasPriceUpdates: append([]fqbind.InternalGasPriceUpdate(nil), gasUpdates...)}, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Nil(t, got.DestChainConfigBatches) @@ -630,15 +631,15 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { }) t.Run("TokenPriceUpdates within batch size returns single batch", func(t *testing.T) { - tokenUpdates := make([]fqops.TokenPriceUpdate, sequences.TokenPriceUpdateBatchLen) + tokenUpdates := make([]fqbind.InternalTokenPriceUpdate, sequences.TokenPriceUpdateBatchLen) for i := range tokenUpdates { - tokenUpdates[i] = fqops.TokenPriceUpdate{ + tokenUpdates[i] = fqbind.InternalTokenPriceUpdate{ SourceToken: common.BytesToAddress([]byte{byte(i + 1)}), UsdPerToken: big.NewInt(int64(i + 1)), } } input := sequences.FeeQuoterUpdate{ - PriceUpdates: fqops.PriceUpdates{TokenPriceUpdates: append([]fqops.TokenPriceUpdate(nil), tokenUpdates...)}, + PriceUpdates: fqbind.InternalPriceUpdates{TokenPriceUpdates: append([]fqbind.InternalTokenPriceUpdate(nil), tokenUpdates...)}, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Nil(t, got.DestChainConfigBatches) @@ -651,15 +652,15 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { t.Run("TokenPriceUpdates over batch size split into batches of TokenPriceUpdateBatchLen", func(t *testing.T) { n := sequences.TokenPriceUpdateBatchLen + 2 - tokenUpdates := make([]fqops.TokenPriceUpdate, n) + tokenUpdates := make([]fqbind.InternalTokenPriceUpdate, n) for i := range tokenUpdates { - tokenUpdates[i] = fqops.TokenPriceUpdate{ + tokenUpdates[i] = fqbind.InternalTokenPriceUpdate{ SourceToken: common.BytesToAddress([]byte{byte(100 + i)}), UsdPerToken: big.NewInt(int64(100 + i)), } } input := sequences.FeeQuoterUpdate{ - PriceUpdates: fqops.PriceUpdates{TokenPriceUpdates: append([]fqops.TokenPriceUpdate(nil), tokenUpdates...)}, + PriceUpdates: fqbind.InternalPriceUpdates{TokenPriceUpdates: append([]fqbind.InternalTokenPriceUpdate(nil), tokenUpdates...)}, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) require.Nil(t, got.DestChainConfigBatches) @@ -673,19 +674,19 @@ func TestBatchedInputForSequenceFeeQuoterUpdate(t *testing.T) { t.Run("gas and token price batches both split for large inputs", func(t *testing.T) { gasN := sequences.GasPriceUpdateBatchLen + 1 - gasUpdates := make([]fqops.GasPriceUpdate, gasN) + gasUpdates := make([]fqbind.InternalGasPriceUpdate, gasN) for i := range gasUpdates { - gasUpdates[i] = fqops.GasPriceUpdate{DestChainSelector: uint64(i), UsdPerUnitGas: big.NewInt(1)} + gasUpdates[i] = fqbind.InternalGasPriceUpdate{DestChainSelector: uint64(i), UsdPerUnitGas: big.NewInt(1)} } tokenN := sequences.TokenPriceUpdateBatchLen + 3 - tokenUpdates := make([]fqops.TokenPriceUpdate, tokenN) + tokenUpdates := make([]fqbind.InternalTokenPriceUpdate, tokenN) for i := range tokenUpdates { - tokenUpdates[i] = fqops.TokenPriceUpdate{SourceToken: common.BytesToAddress([]byte{byte(200 + i)}), UsdPerToken: big.NewInt(2)} + tokenUpdates[i] = fqbind.InternalTokenPriceUpdate{SourceToken: common.BytesToAddress([]byte{byte(200 + i)}), UsdPerToken: big.NewInt(2)} } input := sequences.FeeQuoterUpdate{ - PriceUpdates: fqops.PriceUpdates{ - GasPriceUpdates: append([]fqops.GasPriceUpdate(nil), gasUpdates...), - TokenPriceUpdates: append([]fqops.TokenPriceUpdate(nil), tokenUpdates...), + PriceUpdates: fqbind.InternalPriceUpdates{ + GasPriceUpdates: append([]fqbind.InternalGasPriceUpdate(nil), gasUpdates...), + TokenPriceUpdates: append([]fqbind.InternalTokenPriceUpdate(nil), tokenUpdates...), }, } got := sequences.BatchedInputForSequenceFeeQuoterUpdate(&input) diff --git a/chains/evm/deployment/v2_0_0/sequences/lane_config_helpers.go b/chains/evm/deployment/v2_0_0/sequences/lane_config_helpers.go index 493170a266..d2d3eb0127 100644 --- a/chains/evm/deployment/v2_0_0/sequences/lane_config_helpers.go +++ b/chains/evm/deployment/v2_0_0/sequences/lane_config_helpers.go @@ -3,6 +3,7 @@ package sequences import ( "fmt" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" @@ -10,8 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" - - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/executor" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" ) // FilterOffRampAdds reads all currently registered OffRamps from the Router in a single call, @@ -52,15 +52,16 @@ func FilterExecutorDestChains( ) (map[common.Address][]ExecutorRemoteChainConfigArgs, error) { out := make(map[common.Address][]ExecutorRemoteChainConfigArgs, len(destChainSelectorsPerExecutor)) for executorAddr, toAdd := range destChainSelectorsPerExecutor { - currentReport, err := cldf_ops.ExecuteOperation(b, executor.GetDestChains, chain, contract.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: executorAddr, - }) + execContract, err := execbind.NewExecutor(executorAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("bind executor at %s: %w", executorAddr.Hex(), err) + } + currentDestChains, err := execContract.GetDestChains(&bind.CallOpts{Context: b.GetContext()}) if err != nil { return nil, fmt.Errorf("failed to get dest chains from Executor(%s) on chain %v: %w", executorAddr, chain, err) } - currentMap := make(map[uint64]executor.RemoteChainConfigArgs, len(currentReport.Output)) - for _, current := range currentReport.Output { + currentMap := make(map[uint64]execbind.ExecutorRemoteChainConfigArgs, len(currentDestChains)) + for _, current := range currentDestChains { currentMap[current.DestChainSelector] = current } filtered := toAdd[:0] diff --git a/chains/evm/deployment/v2_0_0/sequences/lombard/configure_lombard_chain_for_lanes.go b/chains/evm/deployment/v2_0_0/sequences/lombard/configure_lombard_chain_for_lanes.go index 3172834967..69c3b1bd68 100644 --- a/chains/evm/deployment/v2_0_0/sequences/lombard/configure_lombard_chain_for_lanes.go +++ b/chains/evm/deployment/v2_0_0/sequences/lombard/configure_lombard_chain_for_lanes.go @@ -16,6 +16,7 @@ import ( cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks" @@ -28,8 +29,23 @@ import ( datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/v2_0_0/adapters" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + ltpbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lombard_token_pool" + lvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lombard_verifier" ) +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) contract_utils.WriteOutput { + var ei *contract_utils.ExecInfo + if w.ExecInfo != nil { + ei = &contract_utils.ExecInfo{Hash: w.ExecInfo.Hash} + } + return contract_utils.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + var ConfigureLombardChainForLanes = cldf_ops.NewSequence( "configure-lombard-chain-for-lanes", semver.MustParse("2.0.0"), @@ -106,10 +122,19 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( remoteChainConfigs := make(map[uint64]tokens_core.RemoteChainConfig[[]byte, string]) outboundImplementations := make([]versioned_verifier_resolver.OutboundImplementationArgs, 0) - remoteChainConfigArgs := make([]lombard_verifier.RemoteChainConfigArgs, 0) - remoteAdapterArgs := make([]lombard_verifier.RemoteAdapterArgs, 0) + lv, err := lvbind.NewLombardVerifier(lombardVerifierAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind LombardVerifier at %s: %w", lombardVerifierAddress.Hex(), err) + } + aphContract, err := aphbind.NewAdvancedPoolHooks(advancedPoolHooksAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind AdvancedPoolHooks at %s: %w", advancedPoolHooksAddress.Hex(), err) + } + + remoteChainConfigArgs := make([]lvbind.BaseVerifierRemoteChainConfigArgs, 0) + remoteAdapterArgs := make([]lvbind.LombardVerifierRemoteAdapterArgs, 0) tokenPoolPathArgs := make([]lombard_token_pool.SetPathArgs, 0) - advancedPoolHooks := make([]advanced_pool_hooks.CCVConfigArg, 0) + advancedPoolHooks := make([]aphbind.AdvancedPoolHooksCCVConfigArg, 0) for remoteChainSelector, remoteChain := range input.RemoteChains { remotePoolAddress, err := dep.RemoteChains[remoteChainSelector].RemoteTokenPoolAddress(dep.DataStore, dep.BlockChains, remoteChainSelector, *tokenPoolQualifier(input.TokenQualifier)) @@ -141,7 +166,7 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( Verifier: lombardVerifierAddress, }) - remoteChainConfigArgs = append(remoteChainConfigArgs, lombard_verifier.RemoteChainConfigArgs{ + remoteChainConfigArgs = append(remoteChainConfigArgs, lvbind.BaseVerifierRemoteChainConfigArgs{ Router: routerAddress, RemoteChainSelector: remoteChainSelector, FeeUSDCents: remoteChain.FeeUSDCents, @@ -149,7 +174,7 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( PayloadSizeBytes: remoteChain.PayloadSizeBytes, }) - advancedPoolHooks = append(advancedPoolHooks, advanced_pool_hooks.CCVConfigArg{ + advancedPoolHooks = append(advancedPoolHooks, aphbind.AdvancedPoolHooksCCVConfigArg{ RemoteChainSelector: remoteChainSelector, OutboundCCVs: []common.Address{ lombardVerifierResolverAddress, @@ -169,9 +194,7 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( } } - existingRemoteAdapterReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.GetRemoteAdapter, chain, contract_utils.FunctionInput[lombard_verifier.GetRemoteAdapterArgs]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, + existingRemoteAdapterReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewReadGetRemoteAdapter(lv), chain, ops2contract.FunctionInput[lombard_verifier.GetRemoteAdapterArgs]{ Args: lombard_verifier.GetRemoteAdapterArgs{ RemoteChainSelector: remoteChainSelector, Token: sourceTokenOrAdapterForRemoteAdapterLookup, @@ -181,7 +204,7 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote adapter on LombardVerifier for remote chain %d: %w", remoteChainSelector, err) } if existingRemoteAdapterReport.Output != remoteAdapter { - remoteAdapterArgs = append(remoteAdapterArgs, lombard_verifier.RemoteAdapterArgs{ + remoteAdapterArgs = append(remoteAdapterArgs, lvbind.LombardVerifierRemoteAdapterArgs{ RemoteChainSelector: remoteChainSelector, Token: sourceTokenOrAdapterForRemoteAdapterLookup, RemoteAdapter: remoteAdapter, @@ -209,19 +232,15 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( RemoteAdapter: remoteAdapter, }) - existingVerifierPathReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.GetPath, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, - Args: remoteChainSelector, + existingVerifierPathReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewReadGetPath(lv), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote path on LombardVerifier for remote chain %d: %w", remoteChainSelector, err) } if existingVerifierPathReport.Output.LChainId != lchainID || existingVerifierPathReport.Output.AllowedCaller != verifierAllowedCaller { - setRemotePathReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.SetPath, chain, contract_utils.FunctionInput[lombard_verifier.SetPathArgs]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, + setRemotePathReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewWriteSetPath(lv), chain, ops2contract.FunctionInput[lombard_verifier.SetPathArgs]{ Args: lombard_verifier.SetPathArgs{ RemoteChainSelector: remoteChainSelector, LChainId: lchainID, @@ -231,7 +250,7 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set remote path on LombardVerifier for remote chain %d: %w", remoteChainSelector, err) } - writes = append(writes, setRemotePathReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setRemotePathReport.Output)) } } @@ -247,38 +266,32 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( writes = append(writes, setOutboundImplementationReport.Output) // Apply remote chain config updates on the LombardVerifier - applyRemoteChainConfigUpdatesReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.ApplyRemoteChainConfigUpdates, chain, contract_utils.FunctionInput[[]lombard_verifier.RemoteChainConfigArgs]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, - Args: remoteChainConfigArgs, + applyRemoteChainConfigUpdatesReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewWriteApplyRemoteChainConfigUpdates(lv), chain, ops2contract.FunctionInput[[]lvbind.BaseVerifierRemoteChainConfigArgs]{ + Args: remoteChainConfigArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply remote chain config updates on LombardVerifier: %w", err) } - writes = append(writes, applyRemoteChainConfigUpdatesReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(applyRemoteChainConfigUpdatesReport.Output)) if len(remoteAdapterArgs) > 0 { - setRemoteAdaptersReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.SetRemoteAdapters, chain, contract_utils.FunctionInput[[]lombard_verifier.RemoteAdapterArgs]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, - Args: remoteAdapterArgs, + setRemoteAdaptersReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewWriteSetRemoteAdapters(lv), chain, ops2contract.FunctionInput[[]lvbind.LombardVerifierRemoteAdapterArgs]{ + Args: remoteAdapterArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set remote adapters on LombardVerifier: %w", err) } - writes = append(writes, setRemoteAdaptersReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setRemoteAdaptersReport.Output)) } // Apply advanced pool hooks CCV config updates - advancedPoolHooksApplyReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyCCVConfigUpdates, chain, contract_utils.FunctionInput[[]advanced_pool_hooks.CCVConfigArg]{ - Address: advancedPoolHooksAddress, - ChainSelector: chain.Selector, - Args: advancedPoolHooks, + advancedPoolHooksApplyReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteApplyCCVConfigUpdates(aphContract), chain, ops2contract.FunctionInput[[]aphbind.AdvancedPoolHooksCCVConfigArg]{ + Args: advancedPoolHooks, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply advanced pool hooks CCV config updates: %w", err) } - writes = append(writes, advancedPoolHooksApplyReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(advancedPoolHooksApplyReport.Output)) // Call into configure token for transfers sequence configureTokenForTransfersReport, err := cldf_ops.ExecuteSequence(b, tokens_sequences.ConfigureTokenForTransfers, dep.BlockChains, tokens_core.ConfigureTokenForTransfersInput{ @@ -294,11 +307,13 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( } batchOps = append(batchOps, configureTokenForTransfersReport.Output.BatchOps...) + ltp, err := ltpbind.NewLombardTokenPool(tokenPoolAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind LombardTokenPool at %s: %w", tokenPoolAddress.Hex(), err) + } for _, pathArgs := range tokenPoolPathArgs { - existingPathReport, err := cldf_ops.ExecuteOperation(b, lombard_token_pool.GetPath, chain, contract_utils.FunctionInput[uint64]{ - ChainSelector: chain.Selector, - Address: tokenPoolAddress, - Args: pathArgs.RemoteChainSelector, + existingPathReport, err := cldf_ops.ExecuteOperation(b, lombard_token_pool.NewReadGetPath(ltp), chain, ops2contract.FunctionInput[uint64]{ + Args: pathArgs.RemoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get LombardTokenPool path for remote chain %d: %w", pathArgs.RemoteChainSelector, err) @@ -310,15 +325,13 @@ var ConfigureLombardChainForLanes = cldf_ops.NewSequence( continue } - setPathReport, err := cldf_ops.ExecuteOperation(b, lombard_token_pool.SetPath, chain, contract_utils.FunctionInput[lombard_token_pool.SetPathArgs]{ - ChainSelector: chain.Selector, - Address: tokenPoolAddress, - Args: pathArgs, + setPathReport, err := cldf_ops.ExecuteOperation(b, lombard_token_pool.NewWriteSetPath(ltp), chain, ops2contract.FunctionInput[lombard_token_pool.SetPathArgs]{ + Args: pathArgs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set LombardTokenPool path for remote chain %d: %w", pathArgs.RemoteChainSelector, err) } - writes = append(writes, setPathReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setPathReport.Output)) } if len(writes) > 0 { diff --git a/chains/evm/deployment/v2_0_0/sequences/lombard/deploy_lombard_chain.go b/chains/evm/deployment/v2_0_0/sequences/lombard/deploy_lombard_chain.go index 324d3064a6..e3c9aa8ea7 100644 --- a/chains/evm/deployment/v2_0_0/sequences/lombard/deploy_lombard_chain.go +++ b/chains/evm/deployment/v2_0_0/sequences/lombard/deploy_lombard_chain.go @@ -7,8 +7,11 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" mcms_types "github.com/smartcontractkit/mcms/types" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + lvbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lombard_verifier" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -82,14 +85,13 @@ var DeployLombardChain = cldf_ops.NewSequence( routerAddress := common.HexToAddress(routerRef.Address) // Deploy LombardVerifier if needed - lombardVerifierRef, err := contract_utils.MaybeDeployContract(b, lombard_verifier.Deploy, chain, contract_utils.DeployInput[lombard_verifier.ConstructorArgs]{ + lombardVerifierRef, err := ops2contract.MaybeDeployContract(b, lombard_verifier.Deploy, chain, ops2contract.DeployInput[lombard_verifier.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(lombard_verifier.ContractType, *lombard_verifier.Version), - ChainSelector: input.ChainSelector, Qualifier: &ContractQualifier, Args: lombard_verifier.ConstructorArgs{ Bridge: lombardBridgeAddress, StorageLocation: input.StorageLocations, - DynamicConfig: lombard_verifier.DynamicConfig{ + DynamicConfig: lvbind.LombardVerifierDynamicConfig{ FeeAggregator: feeAggregatorAddress, }, Rmn: rmnAddress, @@ -102,11 +104,13 @@ var DeployLombardChain = cldf_ops.NewSequence( addresses = append(addresses, lombardVerifierRef) lombardVerifierAddress := common.HexToAddress(lombardVerifierRef.Address) - _, err = cldf_ops.ExecuteOperation(b, lombard_verifier.UpdateSupportedTokens, chain, contract_utils.FunctionInput[lombard_verifier.UpdateSupportedTokensArgs]{ - ChainSelector: input.ChainSelector, - Address: lombardVerifierAddress, + lv, err := lvbind.NewLombardVerifier(lombardVerifierAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind LombardVerifier at %s: %w", lombardVerifierAddress.Hex(), err) + } + _, err = cldf_ops.ExecuteOperation(b, lombard_verifier.NewWriteUpdateSupportedTokens(lv), chain, ops2contract.FunctionInput[lombard_verifier.UpdateSupportedTokensArgs]{ Args: lombard_verifier.UpdateSupportedTokensArgs{ - TokensToSet: []lombard_verifier.SupportedTokenArgs{ + TokensToSet: []lvbind.LombardVerifierSupportedTokenArgs{ { LocalToken: tokenAddress, LocalAdapter: localAdapterAddress, @@ -154,10 +158,7 @@ var DeployLombardChain = cldf_ops.NewSequence( addresses = append(addresses, lombardVerifierResolverRef) } - versionTagReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.VersionTag, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: chain.Selector, - Address: lombardVerifierAddress, - }) + versionTagReport, err := cldf_ops.ExecuteOperation(b, lombard_verifier.NewReadVersionTag(lv), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get version tag from LombardVerifier: %w", err) } @@ -175,9 +176,8 @@ var DeployLombardChain = cldf_ops.NewSequence( writes = append(writes, report.Output) // There can be multiple pools / tokens and advancedPoolHooks for Lombard - advancedPoolHooksRef, err := contract_utils.MaybeDeployContract(b, advanced_pool_hooks.Deploy, chain, contract_utils.DeployInput[advanced_pool_hooks.ConstructorArgs]{ + advancedPoolHooksRef, err := ops2contract.MaybeDeployContract(b, advanced_pool_hooks.Deploy, chain, ops2contract.DeployInput[advanced_pool_hooks.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks.ContractType, *advanced_pool_hooks.Version), - ChainSelector: input.ChainSelector, Qualifier: tokenPoolQualifier(input.TokenQualifier), Args: advanced_pool_hooks.ConstructorArgs{ Allowlist: []common.Address{}, // Empty allowlist @@ -191,9 +191,8 @@ var DeployLombardChain = cldf_ops.NewSequence( advancedPoolHooksAddress := common.HexToAddress(advancedPoolHooksRef.Address) lombardVerifierResolverAddress := common.HexToAddress(lombardVerifierResolverRef.Address) - lombardTokenPoolRef, err := contract_utils.MaybeDeployContract(b, lombard_token_pool.Deploy, chain, contract_utils.DeployInput[lombard_token_pool.ConstructorArgs]{ + lombardTokenPoolRef, err := ops2contract.MaybeDeployContract(b, lombard_token_pool.Deploy, chain, ops2contract.DeployInput[lombard_token_pool.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(lombard_token_pool.ContractType, *lombard_token_pool.Version), - ChainSelector: input.ChainSelector, Qualifier: tokenPoolQualifier(input.TokenQualifier), Args: lombard_token_pool.ConstructorArgs{ Token: tokenAddress, @@ -214,19 +213,18 @@ var DeployLombardChain = cldf_ops.NewSequence( // Add the newly deployed token pool as an authorized caller on the hooks. { - getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetAllAuthorizedCallers, chain, contract_utils.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: advancedPoolHooksAddress, - }) + aph, err := tokens_sequences.BindAdvancedPoolHooks(advancedPoolHooksAddress, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetAllAuthorizedCallers(aph), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get authorized callers from advanced pool hooks %s on %d: %w", advancedPoolHooksAddress, input.ChainSelector, err) } if !slices.Contains(getAuthorizedCallersReport.Output, lombardTokenPoolAddress) { - applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyAuthorizedCallerUpdates, chain, contract_utils.FunctionInput[advanced_pool_hooks.AuthorizedCallerArgs]{ - ChainSelector: input.ChainSelector, - Address: advancedPoolHooksAddress, - Args: advanced_pool_hooks.AuthorizedCallerArgs{ + applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteApplyAuthorizedCallerUpdates(aph), chain, ops2contract.FunctionInput[aphbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: aphbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{lombardTokenPoolAddress}, }, }) @@ -234,7 +232,7 @@ var DeployLombardChain = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("failed to authorize token pool %s on advanced pool hooks %s on %d: %w", lombardTokenPoolAddress, advancedPoolHooksAddress, input.ChainSelector, err) } - batchOp, err := contract_utils.NewBatchOperationFromWrites([]contract_utils.WriteOutput{applyAuthorizedCallerUpdatesReport.Output}) + batchOp, err := contract_utils.NewBatchOperationFromWrites([]contract_utils.WriteOutput{tokens_sequences.WriteOutputOps2ToLegacy(applyAuthorizedCallerUpdatesReport.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/rmn.go b/chains/evm/deployment/v2_0_0/sequences/rmn.go index 1712237032..8aeb108b2c 100644 --- a/chains/evm/deployment/v2_0_0/sequences/rmn.go +++ b/chains/evm/deployment/v2_0_0/sequences/rmn.go @@ -5,13 +5,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" rmnops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/rmn" + rmnbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/rmn" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) @@ -19,7 +20,7 @@ import ( type ConfigureRMNCurseAdminsInput struct { ChainSelector uint64 RMNAddress common.Address - Args rmnops.AuthorizedCallerArgs + Args rmnbind.AuthorizedCallersAuthorizedCallerArgs } // ConfigureRMNCurseAdmins applies authorized caller (curse admin) updates to an already-deployed RMN contract. @@ -35,18 +36,20 @@ var ConfigureRMNCurseAdmins = cldf_ops.NewSequence( if len(input.Args.AddedCallers) == 0 && len(input.Args.RemovedCallers) == 0 { return sequences.OnChainOutput{}, nil } + rmn, err := rmnbind.NewRMN(input.RMNAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind RMN: %w", err) + } report, err := cldf_ops.ExecuteOperation( - b, rmnops.ApplyAuthorizedCallerUpdates, chain, - contract.FunctionInput[rmnops.AuthorizedCallerArgs]{ - ChainSelector: chain.Selector, - Address: input.RMNAddress, - Args: input.Args, + b, rmnops.NewWriteApplyAuthorizedCallerUpdates(rmn), chain, + ops2contract.FunctionInput[rmnbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: input.Args, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply authorized caller updates to RMN(%s) on chain %d: %w", input.RMNAddress.Hex(), chain.Selector, err) } - batch, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{report.Output}) + batch, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{report.Output}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -73,9 +76,8 @@ var DeployRMN = cldf_ops.NewSequence( input.ChainSelector, chain.Selector) } - rmnRef, err := contract.MaybeDeployContract(b, rmnops.Deploy, chain, contract.DeployInput[rmnops.ConstructorArgs]{ + rmnRef, err := ops2contract.MaybeDeployContract(b, rmnops.Deploy, chain, ops2contract.DeployInput[rmnops.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(rmnops.ContractType, *rmnops.Version), - ChainSelector: chain.Selector, Args: input.Args, }, input.ExistingAddresses) if err != nil { @@ -113,15 +115,17 @@ var RmnCurse = cldf_ops.NewSequence( rmnops.Version, "Cursing subjects with RMN", func(b cldf_ops.Bundle, chain evm.Chain, in SeqCurseInput) (output sequences.OnChainOutput, err error) { - opOutput, err := cldf_ops.ExecuteOperation(b, rmnops.Curse0, chain, contract.FunctionInput[[][16]byte]{ - Address: in.RMNAddress, - ChainSelector: chain.Selector, - Args: in.Subjects, + rmn, err := rmnbind.NewRMN(in.RMNAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind RMN: %w", err) + } + opOutput, err := cldf_ops.ExecuteOperation(b, rmnops.NewWriteCurse0(rmn), chain, ops2contract.FunctionInput[[][16]byte]{ + Args: in.Subjects, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to curse with RMN at %s on chain %d: %w", in.RMNAddress.String(), chain.Selector, err) } - batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{opOutput.Output}) + batchOp, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{opOutput.Output}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -134,15 +138,17 @@ var RmnUncurse = cldf_ops.NewSequence( rmnops.Version, "Uncursing subjects with RMN", func(b cldf_ops.Bundle, chain evm.Chain, in SeqUncurseInput) (output sequences.OnChainOutput, err error) { - opOutput, err := cldf_ops.ExecuteOperation(b, rmnops.Uncurse0, chain, contract.FunctionInput[[][16]byte]{ - Address: in.RMNAddress, - ChainSelector: chain.Selector, - Args: in.Subjects, + rmn, err := rmnbind.NewRMN(in.RMNAddress, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("bind RMN: %w", err) + } + opOutput, err := cldf_ops.ExecuteOperation(b, rmnops.NewWriteUncurse0(rmn), chain, ops2contract.FunctionInput[[][16]byte]{ + Args: in.Subjects, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to uncurse with RMN at %s on chain %d: %w", in.RMNAddress.String(), chain.Selector, err) } - batchOp, err := contract.NewBatchOperationFromWrites([]contract.WriteOutput{opOutput.Output}) + batchOp, err := ops2contract.NewBatchOperationFromWrites([]ops2contract.WriteOutput{opOutput.Output}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/sequence_fee_quoter_input_creation_test.go b/chains/evm/deployment/v2_0_0/sequences/sequence_fee_quoter_input_creation_test.go index cf97ce3ef0..31f4cbf963 100644 --- a/chains/evm/deployment/v2_0_0/sequences/sequence_fee_quoter_input_creation_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/sequence_fee_quoter_input_creation_test.go @@ -15,6 +15,8 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + onramp160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" evm_2_evm_onramp_v1_5_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" @@ -26,9 +28,10 @@ import ( seq1_5 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/sequences" onrampv1_6ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/operations/onramp" seq1_6 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_0/sequences" - fee_quoter_v1_6_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" + fq160bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/fee_quoter" evmadapter "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/adapters" fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" + fq2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" "github.com/smartcontractkit/chainlink-ccip/deployment/deploy" "github.com/smartcontractkit/chainlink-ccip/deployment/utils" @@ -70,7 +73,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ Metadata: seq1_6.FeeQuoterImportConfigSequenceOutput{ RemoteChainCfgs: map[uint64]seq1_6.FeeQuoterImportConfigSequenceOutputPerRemoteChain{ 15971525489660198786: { - DestChainCfg: fee_quoter_v1_6_0.DestChainConfig{ + DestChainCfg: fq160bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 3, MaxDataBytes: 8000, @@ -91,7 +94,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPriceStalenessThreshold: 10, NetworkFeeUSDCents: 10, }, - TokenTransferFeeCfgs: map[common.Address]fee_quoter_v1_6_0.TokenTransferFeeConfig{ + TokenTransferFeeCfgs: map[common.Address]fq160bind.FeeQuoterTokenTransferFeeConfig{ common.HexToAddress("0x2222222222222222222222222222222222222222"): { MinFeeUSDCents: 4, MaxFeeUSDCents: 40, @@ -104,7 +107,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPrice: new(big.Int).Set(testImportGasPriceWei), }, }, - StaticCfg: fee_quoter_v1_6_0.StaticConfig{ + StaticCfg: fq160bind.FeeQuoterStaticConfig{ MaxFeeJuelsPerMsg: big.NewInt(1000000000000000000), LinkToken: common.HexToAddress("0x514910771AF9Ca656af840dff83E8264EcF986CA"), TokenPriceStalenessThreshold: 3600, @@ -176,7 +179,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ Metadata: seq1_6.FeeQuoterImportConfigSequenceOutput{ RemoteChainCfgs: map[uint64]seq1_6.FeeQuoterImportConfigSequenceOutputPerRemoteChain{ 15971525489660198786: { - DestChainCfg: fee_quoter_v1_6_0.DestChainConfig{ + DestChainCfg: fq160bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 3, MaxDataBytes: 8000, @@ -197,7 +200,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPriceStalenessThreshold: 10, NetworkFeeUSDCents: 10, }, - TokenTransferFeeCfgs: map[common.Address]fee_quoter_v1_6_0.TokenTransferFeeConfig{ + TokenTransferFeeCfgs: map[common.Address]fq160bind.FeeQuoterTokenTransferFeeConfig{ common.HexToAddress("0x2222222222222222222222222222222222222222"): { MinFeeUSDCents: 4, MaxFeeUSDCents: 40, @@ -210,7 +213,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPrice: new(big.Int).Set(testImportGasPriceWei), }, }, - StaticCfg: fee_quoter_v1_6_0.StaticConfig{ + StaticCfg: fq160bind.FeeQuoterStaticConfig{ MaxFeeJuelsPerMsg: big.NewInt(1000000000000000000), LinkToken: common.HexToAddress("0x514910771AF9Ca656af840dff83E8264EcF986CA"), TokenPriceStalenessThreshold: 3600, @@ -325,7 +328,7 @@ var dummyContractMetadata = []datastore.ContractMetadata{ Metadata: seq1_6.FeeQuoterImportConfigSequenceOutput{ RemoteChainCfgs: map[uint64]seq1_6.FeeQuoterImportConfigSequenceOutputPerRemoteChain{ 5009297550715157269: { - DestChainCfg: fee_quoter_v1_6_0.DestChainConfig{ + DestChainCfg: fq160bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 5, MaxDataBytes: 10000, @@ -346,11 +349,11 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 10, }, - TokenTransferFeeCfgs: map[common.Address]fee_quoter_v1_6_0.TokenTransferFeeConfig{}, + TokenTransferFeeCfgs: map[common.Address]fq160bind.FeeQuoterTokenTransferFeeConfig{}, GasPrice: new(big.Int).Set(testImportGasPriceWei), }, 4949039107694359620: { - DestChainCfg: fee_quoter_v1_6_0.DestChainConfig{ + DestChainCfg: fq160bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 4, MaxDataBytes: 9000, @@ -371,11 +374,11 @@ var dummyContractMetadata = []datastore.ContractMetadata{ GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 10, }, - TokenTransferFeeCfgs: map[common.Address]fee_quoter_v1_6_0.TokenTransferFeeConfig{}, + TokenTransferFeeCfgs: map[common.Address]fq160bind.FeeQuoterTokenTransferFeeConfig{}, GasPrice: new(big.Int).Set(testImportGasPriceWei), }, }, - StaticCfg: fee_quoter_v1_6_0.StaticConfig{ + StaticCfg: fq160bind.FeeQuoterStaticConfig{ MaxFeeJuelsPerMsg: big.NewInt(1000000000000000000), LinkToken: common.HexToAddress("0x514910771AF9Ca656af840dff83E8264EcF986CA"), TokenPriceStalenessThreshold: 3600, @@ -515,7 +518,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { expected[5009297550715157269] = sequences.FeeQuoterUpdate{ ChainSelector: 5009297550715157269, ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fq2bind.FeeQuoterStaticConfig{ LinkToken: linkToken, MaxFeeJuelsPerMsg: maxFeeJuels, }, @@ -524,10 +527,10 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { common.HexToAddress("0x5555555555555555555555555555555555555555"), common.HexToAddress("0x2222222222222222222222222222222222222221"), }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fq2bind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 15971525489660198786, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 8000, MaxPerMsgGasLimit: 4000000, @@ -542,13 +545,13 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fq2bind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 15971525489660198786, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: common.HexToAddress("0x2222222222222222222222222222222222222222"), - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 4, DestGasOverhead: 25000, DestBytesOverhead: 80, @@ -559,11 +562,11 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - PriceUpdates: fqops.PriceUpdates{ - GasPriceUpdates: []fqops.GasPriceUpdate{ + PriceUpdates: fq2bind.InternalPriceUpdates{ + GasPriceUpdates: []fq2bind.InternalGasPriceUpdate{ {DestChainSelector: 15971525489660198786, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, }, - TokenPriceUpdates: []fqops.TokenPriceUpdate{ + TokenPriceUpdates: []fq2bind.InternalTokenPriceUpdate{ {SourceToken: linkToken, UsdPerToken: new(big.Int).Set(testImportTokenPriceWei)}, }, }, @@ -573,7 +576,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { expected[4949039107694359620] = sequences.FeeQuoterUpdate{ ChainSelector: 4949039107694359620, ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fq2bind.FeeQuoterStaticConfig{ LinkToken: linkToken, MaxFeeJuelsPerMsg: maxFeeJuels, }, @@ -583,10 +586,10 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { common.HexToAddress("0x3333333333333333333333333333333333333333"), common.HexToAddress("0x9999999999999999999999999999999999999999"), }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fq2bind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 15971525489660198786, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 8000, MaxPerMsgGasLimit: 4000000, @@ -602,7 +605,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, { DestChainSelector: 5009297550715157269, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 10000, MaxPerMsgGasLimit: 5000000, @@ -617,13 +620,13 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fq2bind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 15971525489660198786, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: common.HexToAddress("0x2222222222222222222222222222222222222222"), - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 4, DestGasOverhead: 25000, DestBytesOverhead: 80, @@ -634,10 +637,10 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, { DestChainSelector: 5009297550715157269, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: common.HexToAddress("0x2222222222222222222222222222222222222222"), - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 5, DestGasOverhead: 30000, DestBytesOverhead: 100, @@ -648,12 +651,12 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - PriceUpdates: fqops.PriceUpdates{ - GasPriceUpdates: []fqops.GasPriceUpdate{ + PriceUpdates: fq2bind.InternalPriceUpdates{ + GasPriceUpdates: []fq2bind.InternalGasPriceUpdate{ {DestChainSelector: 5009297550715157269, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, {DestChainSelector: 15971525489660198786, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, }, - TokenPriceUpdates: []fqops.TokenPriceUpdate{ + TokenPriceUpdates: []fq2bind.InternalTokenPriceUpdate{ {SourceToken: linkToken, UsdPerToken: new(big.Int).Set(testImportTokenPriceWei)}, }, }, @@ -664,14 +667,14 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { expected[15971525489660198786] = sequences.FeeQuoterUpdate{ ChainSelector: 15971525489660198786, ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fq2bind.FeeQuoterStaticConfig{ LinkToken: linkToken, MaxFeeJuelsPerMsg: maxFeeJuels159, }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fq2bind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 5009297550715157269, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 10000, MaxPerMsgGasLimit: 5000000, @@ -686,13 +689,13 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fq2bind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 5009297550715157269, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{ + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{ { Token: common.HexToAddress("0x2222222222222222222222222222222222222222"), - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 5, DestGasOverhead: 30000, DestBytesOverhead: 100, @@ -701,7 +704,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, { Token: common.HexToAddress("0x3333333333333333333333333333333333333333"), - TokenTransferFeeConfig: fqops.TokenTransferFeeConfig{ + TokenTransferFeeConfig: fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 10, DestGasOverhead: 40000, DestBytesOverhead: 200, @@ -715,11 +718,11 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { common.HexToAddress("0x4444444444444444444444444444444444444444"), }, }, - PriceUpdates: fqops.PriceUpdates{ - GasPriceUpdates: []fqops.GasPriceUpdate{ + PriceUpdates: fq2bind.InternalPriceUpdates{ + GasPriceUpdates: []fq2bind.InternalGasPriceUpdate{ {DestChainSelector: 5009297550715157269, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, }, - TokenPriceUpdates: []fqops.TokenPriceUpdate{ + TokenPriceUpdates: []fq2bind.InternalTokenPriceUpdate{ {SourceToken: linkToken, UsdPerToken: new(big.Int).Set(testImportTokenPriceWei)}, }, }, @@ -729,7 +732,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { expected[5936861837188149645] = sequences.FeeQuoterUpdate{ ChainSelector: 5936861837188149645, ConstructorArgs: fqops.ConstructorArgs{ - StaticConfig: fqops.StaticConfig{ + StaticConfig: fq2bind.FeeQuoterStaticConfig{ LinkToken: linkToken, MaxFeeJuelsPerMsg: maxFeeJuels, }, @@ -738,10 +741,10 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { common.HexToAddress("0x5555555555555555555555555555555555555555"), common.HexToAddress("0x5555555555555555555555555555555555555551"), }, - DestChainConfigArgs: []fqops.DestChainConfigArgs{ + DestChainConfigArgs: []fq2bind.FeeQuoterDestChainConfigArgs{ { DestChainSelector: 5009297550715157269, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 10000, MaxPerMsgGasLimit: 5000000, @@ -757,7 +760,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, { DestChainSelector: 4949039107694359620, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 9000, MaxPerMsgGasLimit: 4500000, @@ -773,7 +776,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, { DestChainSelector: 15971525489660198786, - DestChainConfig: fqops.DestChainConfig{ + DestChainConfig: fq2bind.FeeQuoterDestChainConfig{ IsEnabled: true, MaxDataBytes: 8000, MaxPerMsgGasLimit: 4000000, @@ -788,24 +791,24 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { }, }, }, - TokenTransferFeeConfigArgs: []fqops.TokenTransferFeeConfigArgs{ + TokenTransferFeeConfigArgs: []fq2bind.FeeQuoterTokenTransferFeeConfigArgs{ { DestChainSelector: 5009297550715157269, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{}, + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{}, }, { DestChainSelector: 4949039107694359620, - TokenTransferFeeConfigs: []fqops.TokenTransferFeeConfigSingleTokenArgs{}, + TokenTransferFeeConfigs: []fq2bind.FeeQuoterTokenTransferFeeConfigSingleTokenArgs{}, }, }, }, - PriceUpdates: fqops.PriceUpdates{ - GasPriceUpdates: []fqops.GasPriceUpdate{ + PriceUpdates: fq2bind.InternalPriceUpdates{ + GasPriceUpdates: []fq2bind.InternalGasPriceUpdate{ {DestChainSelector: 5009297550715157269, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, {DestChainSelector: 4949039107694359620, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, {DestChainSelector: 15971525489660198786, UsdPerUnitGas: new(big.Int).Set(testImportGasPriceWei)}, }, - TokenPriceUpdates: []fqops.TokenPriceUpdate{ + TokenPriceUpdates: []fq2bind.InternalTokenPriceUpdate{ {SourceToken: linkToken, UsdPerToken: new(big.Int).Set(testImportTokenPriceWei)}, }, }, @@ -814,7 +817,7 @@ func getExpectedOutput() map[uint64]sequences.FeeQuoterUpdate { return expected } -func requirePriceUpdatesMatch(t *testing.T, expected, actual fqops.PriceUpdates, chainSelector uint64) { +func requirePriceUpdatesMatch(t *testing.T, expected, actual fq2bind.InternalPriceUpdates, chainSelector uint64) { t.Helper() require.Len(t, actual.GasPriceUpdates, len(expected.GasPriceUpdates), "gas price update count on chain %d", chainSelector) @@ -1042,7 +1045,7 @@ func TestSequenceFeeQuoterInputCreation(t *testing.T) { // Verify DestChainConfigs against expected values // Build a map of expected dest chain configs for easier lookup - expectedDestChainConfigsMap := make(map[uint64]fqops.DestChainConfigArgs) + expectedDestChainConfigsMap := make(map[uint64]fq2bind.FeeQuoterDestChainConfigArgs) for _, cfg := range expected.DestChainConfigs { expectedDestChainConfigsMap[cfg.DestChainSelector] = cfg } @@ -1292,24 +1295,23 @@ func deployOnRamps(t *testing.T, e *cldf.Environment, chainSelector uint64, remo require.NoError(t, err) rampAddr = out.Output case "1.6.0": - out, err := cldf_ops.ExecuteOperation(e.OperationsBundle, onrampv1_6ops.Deploy, chain, contract.DeployInput[onrampv1_6ops.ConstructorArgs]{ - ChainSelector: chainSelector, + out, err := cldf_ops.ExecuteOperation(e.OperationsBundle, onrampv1_6ops.Deploy, chain, ops2contract.DeployInput[onrampv1_6ops.ConstructorArgs]{ TypeAndVersion: cldf.NewTypeAndVersion(onrampv1_6ops.ContractType, *onrampv1_6ops.Version), Args: onrampv1_6ops.ConstructorArgs{ - StaticConfig: onrampv1_6ops.StaticConfig{ + StaticConfig: onramp160bind.OnRampStaticConfig{ ChainSelector: chainSelector, RmnRemote: rmnProxyPlaceholder, NonceManager: utils2.RandomAddress(), TokenAdminRegistry: tokenAdminRegistryPlaceholder, }, - DynamicConfig: onrampv1_6ops.DynamicConfig{ + DynamicConfig: onramp160bind.OnRampDynamicConfig{ FeeQuoter: utils2.RandomAddress(), ReentrancyGuardEntered: false, MessageInterceptor: common.Address{}, FeeAggregator: chain.DeployerKey.From, AllowlistAdmin: chain.DeployerKey.From, }, - DestChainConfigArgs: []onrampv1_6ops.DestChainConfigArgs{ + DestChainConfigArgs: []onramp160bind.OnRampDestChainConfigArgs{ { DestChainSelector: remoteChainSelector, Router: routerAddr, diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers.go index 46d874eeb7..37403706c9 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain" evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) @@ -49,20 +50,22 @@ var ConfigureTokenForTransfers = cldf_ops.NewSequence( registryAddress = addr } + tokenPoolAddress := common.HexToAddress(input.TokenPoolAddress) + tp, err := bindTokenPool(tokenPoolAddress, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + var tokenAddress common.Address if input.TokenAddress != "" { tokenAddress = common.HexToAddress(input.TokenAddress) } else { - tokenAddrReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetToken, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: common.HexToAddress(input.TokenPoolAddress), - }) + tokenAddrReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetToken(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token address from token pool with address %s on %s: %w", input.TokenPoolAddress, evmChain, err) } tokenAddress = tokenAddrReport.Output } - tokenPoolAddress := common.HexToAddress(input.TokenPoolAddress) registryTokenPoolAddress := tokenPoolAddress if input.RegistryTokenPoolAddress != "" { registryTokenPoolAddress = common.HexToAddress(input.RegistryTokenPoolAddress) @@ -103,10 +106,8 @@ var ConfigureTokenForTransfers = cldf_ops.NewSequence( } // Validate the pool supports the token - isSupported, err := cldf_ops.ExecuteOperation(b, token_pool.IsSupportedToken, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddress, - Args: tokenAddress, + isSupported, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadIsSupportedToken(tp), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: tokenAddress, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to check if token %s is supported by token pool %s on %s: %w", tokenAddress, tokenPoolAddress, evmChain, err) @@ -117,23 +118,18 @@ var ConfigureTokenForTransfers = cldf_ops.NewSequence( if !input.AllowedFinalityConfig.IsZero() { desiredFinalityConfig := input.AllowedFinalityConfig.Raw() - currentAllowedFinalityReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetAllowedFinalityConfig, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddress, - }) + currentAllowedFinalityReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetAllowedFinalityConfig(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get allowed finality config from token pool with address %s on %s: %w", input.TokenPoolAddress, evmChain, err) } if currentAllowedFinalityReport.Output != desiredFinalityConfig { - configureMinBlockConfirmationReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetAllowedFinalityConfig, evmChain, evm_contract.FunctionInput[[4]byte]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddress, - Args: desiredFinalityConfig, + configureMinBlockConfirmationReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteSetAllowedFinalityConfig(tp), evmChain, ops2contract.FunctionInput[[4]byte]{ + Args: desiredFinalityConfig, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to configure minimum block confirmation for token pool with address %s on %s: %w", input.TokenPoolAddress, evmChain, err) } - configureMinBlockConfirmationOps, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{configureMinBlockConfirmationReport.Output}) + configureMinBlockConfirmationOps, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{writeOutputOps2ToLegacy(configureMinBlockConfirmationReport.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from write outputs: %w", err) } @@ -143,13 +139,14 @@ var ConfigureTokenForTransfers = cldf_ops.NewSequence( // Create a fresh bundle to avoid stale reads of allowedFinalityConfig in subsequent operations. // See: deployment/docs/style-guide.md#avoid-stale-reads-from-cached-operations b = cldf_ops.NewBundle(b.GetContext, b.Logger, cldf_ops.NewMemoryReporter()) + tp, err = bindTokenPool(tokenPoolAddress, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } } // Get the advanced pool hooks address - advancedPoolHooksAddress, err := cldf_ops.ExecuteOperation(b, token_pool.GetAdvancedPoolHooks, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: tokenPoolAddress, - }) + advancedPoolHooksAddress, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetAdvancedPoolHooks(tp), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get advanced pool hooks address from token pool with address %s on %s: %w", input.TokenPoolAddress, evmChain, err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers_test.go index 3fb3f89456..e8f64b8032 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_for_transfers_test.go @@ -20,6 +20,7 @@ import ( tokens_core "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore" evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" @@ -163,14 +164,12 @@ func TestConfigureTokenForTransfers(t *testing.T) { require.Equal(t, common.HexToAddress(tokenPoolAddress), tokenConfigReport.Output.TokenPool, "Token pool address should be set correctly") // Verify token address from token pool + evmChain := e.BlockChains.EVMChains()[chainSel] actualTokenAddress, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetToken, - e.BlockChains.EVMChains()[chainSel], - evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(tokenPoolAddress), - }, + token_pool.NewReadGetToken(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, common.HexToAddress(tokenAddress), actualTokenAddress.Output, "Token address should match") diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool.go index c6dd173814..d96091e26b 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool.go @@ -9,6 +9,7 @@ import ( evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" @@ -46,32 +47,32 @@ var ConfigureTokenPool = cldf_ops.NewSequence( // Set threshold amount for additional CCVs (if necessary) if input.ThresholdAmountForAdditionalCCVs != nil { - currentThresholdAmountReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetThresholdAmount, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.AdvancedPoolHooks, - }) + aph, err := bindAdvancedPoolHooks(input.AdvancedPoolHooks, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + currentThresholdAmountReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetThresholdAmount(aph), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get current threshold amount for additional CCVs on advanced pool hooks with address %s on %s: %w", input.AdvancedPoolHooks, chain, err) } if currentThresholdAmountReport.Output.Cmp(input.ThresholdAmountForAdditionalCCVs) != 0 { - setThresholdAmountReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.SetThresholdAmount, chain, evm_contract.FunctionInput[*big.Int]{ - ChainSelector: input.ChainSelector, - Address: input.AdvancedPoolHooks, - Args: input.ThresholdAmountForAdditionalCCVs, + setThresholdAmountReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteSetThresholdAmount(aph), chain, ops2contract.FunctionInput[*big.Int]{ + Args: input.ThresholdAmountForAdditionalCCVs, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set threshold amount for additional CCVs on advanced pool hooks with address %s on %s: %w", input.AdvancedPoolHooks, chain, err) } - writes = append(writes, setThresholdAmountReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setThresholdAmountReport.Output)) } } // Set dynamic config (if necessary) if input.RouterAddress != (common.Address{}) || input.RateLimitAdmin != (common.Address{}) || input.FeeAggregator != (common.Address{}) { - currentDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetDynamicConfig, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - }) + tp, err := bindTokenPool(input.TokenPoolAddress, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + currentDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetDynamicConfig(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get current dynamic config from token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } @@ -94,9 +95,7 @@ var ConfigureTokenPool = cldf_ops.NewSequence( } if desiredRouter != currentDynamicConfig.Router || desiredRateLimitAdmin != currentDynamicConfig.RateLimitAdmin || desiredFeeAdmin != currentDynamicConfig.FeeAdmin { - setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetDynamicConfig, chain, evm_contract.FunctionInput[token_pool.SetDynamicConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + setDynamicConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteSetDynamicConfig(tp), chain, ops2contract.FunctionInput[token_pool.SetDynamicConfigArgs]{ Args: token_pool.SetDynamicConfigArgs{ Router: desiredRouter, RateLimitAdmin: desiredRateLimitAdmin, @@ -106,7 +105,7 @@ var ConfigureTokenPool = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set dynamic config on token pool with address %s on %s: %w", input.TokenPoolAddress, chain, err) } - writes = append(writes, setDynamicConfigReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setDynamicConfigReport.Output)) } } diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain.go index 9858408810..9eb2fd65ac 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain.go @@ -16,6 +16,7 @@ import ( fqops_v163 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" @@ -36,6 +37,15 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" onrampops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" + + bmproxybind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/burn_mint_token_pool_and_proxy" + fq163bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + tp161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + fq2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" + orbind160 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" + orbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/onramp" + tpbinding "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/token_pool" ) // ConfigureTokenPoolForRemoteChainInput is the input for the ConfigureTokenPoolForRemoteChain sequence. @@ -85,6 +95,11 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } writes := make([]evm_contract.WriteOutput, 0) + tp, err := bindTokenPool(input.TokenPoolAddress, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + imported, err := importConfigFromActivePool(b, chain, input.ChainSelector, input.RegistryAddress, input.TokenAddress, input.RemoteChainSelector) if err != nil { return sequences.OnChainOutput{}, err @@ -97,10 +112,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( activePoolRemotePools = imported.RemotePools } - localDecimalsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetTokenDecimals, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - }) + localDecimalsReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetTokenDecimals(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token decimals: %w", err) } @@ -148,11 +160,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // Read allowedFinalityConfig to determine whether to use fast finality (custom) or default finality - finalityConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetAllowedFinalityConfig, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: struct{}{}, - }) + finalityConfigReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetAllowedFinalityConfig(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get allowed finality config: %w", err) } @@ -170,15 +178,17 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("make CCV updates: %w", err) } if needCCVUpdate && ccvArg != nil { - setCCVsReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyCCVConfigUpdates, chain, evm_contract.FunctionInput[[]advanced_pool_hooks.CCVConfigArg]{ - ChainSelector: input.ChainSelector, - Address: input.AdvancedPoolHooks, - Args: []advanced_pool_hooks.CCVConfigArg{*ccvArg}, + aph, err := bindAdvancedPoolHooks(input.AdvancedPoolHooks, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + setCCVsReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteApplyCCVConfigUpdates(aph), chain, ops2contract.FunctionInput[[]aphbind.AdvancedPoolHooksCCVConfigArg]{ + Args: []aphbind.AdvancedPoolHooksCCVConfigArg{*ccvArg}, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set CCVs: %w", err) } - writes = append(writes, setCCVsReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(setCCVsReport.Output)) } } @@ -189,10 +199,8 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( removes := make([]uint64, 0, 1) // Cap == 1 because we may need to remove the chain if the remote token is different if input.RemoteChainAlreadySupported { // Check existing remote token - getRemoteTokenReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRemoteToken, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RemoteChainSelector, + getRemoteTokenReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetRemoteToken(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: input.RemoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote token: %w", err) @@ -207,8 +215,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( rateLimitersReport, err := maybeUpdateRateLimiters( b, chain, - input.ChainSelector, - input.TokenPoolAddress, + tp, input.RemoteChainSelector, fastFinality, inboundRateLimiterConfig, @@ -222,10 +229,8 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // Check existing remote pools and add any missing (active pool's remote pools first for upgrade, then requested pool) - getRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetRemotePools, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - Args: input.RemoteChainSelector, + getRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetRemotePools(tp), chain, ops2contract.FunctionInput[uint64]{ + Args: input.RemoteChainSelector, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get remote pools: %w", err) @@ -238,9 +243,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( for _, activePoolAddr := range activePoolRemotePools { padded := common.LeftPadBytes(activePoolAddr, 32) if !containsPool(padded) { - addReport, err := cldf_ops.ExecuteOperation(b, token_pool.AddRemotePool, chain, evm_contract.FunctionInput[token_pool.AddRemotePoolArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + addReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteAddRemotePool(tp), chain, ops2contract.FunctionInput[token_pool.AddRemotePoolArgs]{ Args: token_pool.AddRemotePoolArgs{ RemoteChainSelector: input.RemoteChainSelector, RemotePoolAddress: padded, @@ -249,14 +252,12 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to add active pool remote pool: %w", err) } - writes = append(writes, addReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(addReport.Output)) existingPools = append(existingPools, padded) } } if !containsPool(common.LeftPadBytes(input.RemoteChainConfig.RemotePool, 32)) { - addRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.AddRemotePool, chain, evm_contract.FunctionInput[token_pool.AddRemotePoolArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + addRemotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteAddRemotePool(tp), chain, ops2contract.FunctionInput[token_pool.AddRemotePoolArgs]{ Args: token_pool.AddRemotePoolArgs{ RemoteChainSelector: input.RemoteChainSelector, RemotePoolAddress: common.LeftPadBytes(input.RemoteChainConfig.RemotePool, 32), @@ -265,11 +266,11 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to add remote pool: %w", err) } - writes = append(writes, addRemotePoolsReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(addRemotePoolsReport.Output)) } // Update token transfer fee configuration (chain is already supported) - tokenTransferFeeWrites, err := applyTokenTransferFeeConfigIfNeeded(b, chain, input, input.RemoteChainSelector) + tokenTransferFeeWrites, err := applyTokenTransferFeeConfigIfNeeded(b, chain, tp, input, input.RemoteChainSelector) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply token transfer fee config updates: %w", err) } @@ -295,12 +296,10 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if !slices.ContainsFunc(remotePoolAddresses, func(b []byte) bool { return bytes.Equal(b, inputPoolPadded) }) { remotePoolAddresses = append(remotePoolAddresses, inputPoolPadded) } - applyChainUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.ApplyChainUpdates, chain, evm_contract.FunctionInput[token_pool.ApplyChainUpdatesArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + applyChainUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteApplyChainUpdates(tp), chain, ops2contract.FunctionInput[token_pool.ApplyChainUpdatesArgs]{ Args: token_pool.ApplyChainUpdatesArgs{ RemoteChainSelectorsToRemove: removes, - ChainsToAdd: []token_pool.ChainUpdate{ + ChainsToAdd: []tpbinding.TokenPoolChainUpdate{ { RemoteChainSelector: input.RemoteChainSelector, RemotePoolAddresses: remotePoolAddresses, @@ -314,10 +313,10 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply chain updates: %w", err) } - writes = append(writes, applyChainUpdatesReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(applyChainUpdatesReport.Output)) // Update token transfer fee configuration (chain was just added) - tokenTransferFeeWrites, err := applyTokenTransferFeeConfigIfNeeded(b, chain, input, input.RemoteChainSelector) + tokenTransferFeeWrites, err := applyTokenTransferFeeConfigIfNeeded(b, chain, tp, input, input.RemoteChainSelector) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply token transfer fee config updates: %w", err) } @@ -327,8 +326,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( rateLimitersReport, err := maybeUpdateRateLimiters( b, chain, - input.ChainSelector, - input.TokenPoolAddress, + tp, input.RemoteChainSelector, fastFinality, inboundRateLimiterConfig, @@ -342,14 +340,12 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( } // Update token transfer fee configuration (after applyChainUpdates so chain exists on pool). - tokenTransferFeeConfigUpdates, err := makeTokenTransferFeeConfigUpdates(b, chain, input, input.RemoteChainSelector) + tokenTransferFeeConfigUpdates, err := makeTokenTransferFeeConfigUpdates(b, chain, tp, input, input.RemoteChainSelector) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to make token transfer fee config updates: %w", err) } if len(tokenTransferFeeConfigUpdates) > 0 { - applyTokenTransferFeeConfigUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.ApplyTokenTransferFeeConfigUpdates, chain, evm_contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + applyTokenTransferFeeConfigUpdatesReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteApplyTokenTransferFeeConfigUpdates(tp), chain, ops2contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ Args: token_pool.ApplyTokenTransferFeeConfigUpdatesArgs{ TokenTransferFeeConfigArgs: tokenTransferFeeConfigUpdates, }, @@ -357,7 +353,7 @@ var ConfigureTokenPoolForRemoteChain = cldf_ops.NewSequence( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply token transfer fee config updates: %w", err) } - writes = append(writes, applyTokenTransferFeeConfigUpdatesReport.Output) + writes = append(writes, writeOutputOps2ToLegacy(applyTokenTransferFeeConfigUpdatesReport.Output)) } batchOp, err := evm_contract.NewBatchOperationFromWrites(writes) @@ -439,11 +435,11 @@ func importConfigFromActivePoolV150( typeStr := string(tav.Type) poolForRateLimits := activePool if strings.Contains(typeStr, "Proxy") { - prevReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.GetPreviousPool, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: activePool, - Args: struct{}{}, - }) + poolV150, err := bmproxybind.NewBurnMintTokenPoolAndProxy(activePool, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind active pool at %s: %w", activePool.Hex(), err) + } + prevReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.NewReadGetPreviousPool(poolV150), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get previous pool from proxy: %w", err) } @@ -481,26 +477,28 @@ func fetchRateLimitsAndRemotePoolV150( poolForRateLimits, poolForRemotePool common.Address, remoteChainSelector uint64, ) (*activePoolImportedConfig, error) { - inboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.GetCurrentInboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: poolForRateLimits, - Args: remoteChainSelector, + poolForRateLimitsBound, err := bmproxybind.NewBurnMintTokenPoolAndProxy(poolForRateLimits, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind pool for rate limits at %s: %w", poolForRateLimits.Hex(), err) + } + poolForRemotePoolBound, err := bmproxybind.NewBurnMintTokenPoolAndProxy(poolForRemotePool, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind pool for remote pool at %s: %w", poolForRemotePool.Hex(), err) + } + inboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.NewReadGetCurrentInboundRateLimiterState(poolForRateLimitsBound), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get inbound rate limiter state: %w", err) } - outboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.GetCurrentOutboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: poolForRateLimits, - Args: remoteChainSelector, + outboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.NewReadGetCurrentOutboundRateLimiterState(poolForRateLimitsBound), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get outbound rate limiter state: %w", err) } - remotePoolReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.GetRemotePool, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: poolForRemotePool, - Args: remoteChainSelector, + remotePoolReport, err := cldf_ops.ExecuteOperation(b, token_pool_v150.NewReadGetRemotePool(poolForRemotePoolBound), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get remote pool: %w", err) @@ -524,26 +522,24 @@ func importConfigFromActivePoolV161( activePool common.Address, remoteChainSelector uint64, ) (*activePoolImportedConfig, error) { - inboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.GetCurrentInboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: activePool, - Args: remoteChainSelector, + poolV161, err := tp161bind.NewTokenPool(activePool, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind active pool at %s: %w", activePool.Hex(), err) + } + inboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.NewReadGetCurrentInboundRateLimiterState(poolV161), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get active pool inbound rate limiter state: %w", err) } - outboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.GetCurrentOutboundRateLimiterState, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: activePool, - Args: remoteChainSelector, + outboundReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.NewReadGetCurrentOutboundRateLimiterState(poolV161), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get active pool outbound rate limiter state: %w", err) } - remotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.GetRemotePools, chain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSelector, - Address: activePool, - Args: remoteChainSelector, + remotePoolsReport, err := cldf_ops.ExecuteOperation(b, token_pool_v161.NewReadGetRemotePools(poolV161), chain, ops2contract.FunctionInput[uint64]{ + Args: remoteChainSelector, }) if err != nil { return nil, fmt.Errorf("failed to get active pool remote pools: %w", err) @@ -586,7 +582,7 @@ func scaleDecimalsInt(amount *big.Int, fromDecimals, toDecimals uint8) *big.Int } // tokenBucketV150ToRateLimiterConfig converts a 1.5.0 (proxy bindings) RateLimiterTokenBucket to tokens.RateLimiterConfig. -func tokenBucketV150ToRateLimiterConfig(b token_pool_v150.TokenBucket) *tokens.RateLimiterConfig { +func tokenBucketV150ToRateLimiterConfig(b bmproxybind.RateLimiterTokenBucket) *tokens.RateLimiterConfig { return &tokens.RateLimiterConfig{ IsEnabled: b.IsEnabled, Capacity: new(big.Int).Set(b.Capacity), @@ -595,7 +591,7 @@ func tokenBucketV150ToRateLimiterConfig(b token_pool_v150.TokenBucket) *tokens.R } // tokenBucketToRateLimiterConfig converts a 1.6.1 TokenBucket to tokens.RateLimiterConfig. -func tokenBucketToRateLimiterConfig(b token_pool_v161.TokenBucket) *tokens.RateLimiterConfig { +func tokenBucketToRateLimiterConfig(b tp161bind.RateLimiterTokenBucket) *tokens.RateLimiterConfig { return &tokens.RateLimiterConfig{ IsEnabled: b.IsEnabled, Capacity: new(big.Int).Set(b.Capacity), @@ -608,17 +604,14 @@ func tokenBucketToRateLimiterConfig(b token_pool_v161.TokenBucket) *tokens.RateL func maybeUpdateRateLimiters( b cldf_ops.Bundle, chain evm.Chain, - chainSelector uint64, - tokenPoolAddress common.Address, + tp tpbinding.TokenPoolInterface, remoteChainSelector uint64, fastFinality bool, desiredInboundRateLimiterConfig tokens.RateLimiterConfig, desiredOutboundRateLimiterConfig tokens.RateLimiterConfig, ) (*evm_contract.WriteOutput, error) { // Check existing rate limiters - rateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetCurrentRateLimiterState, chain, evm_contract.FunctionInput[token_pool.GetCurrentRateLimiterStateArgs]{ - ChainSelector: chainSelector, - Address: tokenPoolAddress, + rateLimiterStateReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetCurrentRateLimiterState(tp), chain, ops2contract.FunctionInput[token_pool.GetCurrentRateLimiterStateArgs]{ Args: token_pool.GetCurrentRateLimiterStateArgs{ RemoteChainSelector: remoteChainSelector, FastFinality: fastFinality, @@ -635,10 +628,8 @@ func maybeUpdateRateLimiters( // Disabling traffic on a token is allowed, as in this case IsEnabled would be true with rate = capacity = 0. if (!rateLimiterConfigsEqual(currentStates.InboundRateLimiterState, desiredInboundRateLimiterConfig) && desiredInboundRateLimiterConfig.IsEnabled) || (!rateLimiterConfigsEqual(currentStates.OutboundRateLimiterState, desiredOutboundRateLimiterConfig) && desiredOutboundRateLimiterConfig.IsEnabled) { - setInboundRateLimiterReport, err := cldf_ops.ExecuteOperation(b, token_pool.SetRateLimitConfig, chain, evm_contract.FunctionInput[[]token_pool.RateLimitConfigArgs]{ - ChainSelector: chainSelector, - Address: tokenPoolAddress, - Args: []token_pool.RateLimitConfigArgs{ + setInboundRateLimiterReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteSetRateLimitConfig(tp), chain, ops2contract.FunctionInput[[]tpbinding.TokenPoolRateLimitConfigArgs]{ + Args: []tpbinding.TokenPoolRateLimitConfigArgs{ { RemoteChainSelector: remoteChainSelector, FastFinality: fastFinality, @@ -650,39 +641,38 @@ func maybeUpdateRateLimiters( if err != nil { return nil, fmt.Errorf("failed to set rate limiters config: %w", err) } - return &setInboundRateLimiterReport.Output, nil + out := writeOutputOps2ToLegacy(setInboundRateLimiterReport.Output) + return &out, nil } return nil, nil } // rateLimiterConfigsEqual returns true if the current rate limiter config on-chain matches the desired config. -func rateLimiterConfigsEqual(current token_pool.TokenBucket, desired tokens.RateLimiterConfig) bool { +func rateLimiterConfigsEqual(current tpbinding.RateLimiterTokenBucket, desired tokens.RateLimiterConfig) bool { return current.IsEnabled == desired.IsEnabled && current.Capacity.Cmp(desired.Capacity) == 0 && current.Rate.Cmp(desired.Rate) == 0 } -// tokensRateLimiterToConfig converts tokens.RateLimiterConfig to token_pool.Config. -func tokensRateLimiterToConfig(c tokens.RateLimiterConfig) token_pool.Config { - return token_pool.Config{ +// tokensRateLimiterToConfig converts tokens.RateLimiterConfig to on-chain RateLimiterConfig. +func tokensRateLimiterToConfig(c tokens.RateLimiterConfig) tpbinding.RateLimiterConfig { + return tpbinding.RateLimiterConfig{ IsEnabled: c.IsEnabled, Capacity: c.Capacity, Rate: c.Rate, } } -func applyTokenTransferFeeConfigIfNeeded(b cldf_ops.Bundle, chain evm.Chain, input ConfigureTokenPoolForRemoteChainInput, remoteChainSelector uint64) ([]evm_contract.WriteOutput, error) { - tokenTransferFeeConfigUpdates, err := makeTokenTransferFeeConfigUpdates(b, chain, input, remoteChainSelector) +func applyTokenTransferFeeConfigIfNeeded(b cldf_ops.Bundle, chain evm.Chain, tp tpbinding.TokenPoolInterface, input ConfigureTokenPoolForRemoteChainInput, remoteChainSelector uint64) ([]evm_contract.WriteOutput, error) { + tokenTransferFeeConfigUpdates, err := makeTokenTransferFeeConfigUpdates(b, chain, tp, input, remoteChainSelector) if err != nil { return nil, fmt.Errorf("failed to make token transfer fee config updates: %w", err) } if len(tokenTransferFeeConfigUpdates) == 0 { return nil, nil } - report, err := cldf_ops.ExecuteOperation(b, token_pool.ApplyTokenTransferFeeConfigUpdates, chain, evm_contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + report, err := cldf_ops.ExecuteOperation(b, token_pool.NewWriteApplyTokenTransferFeeConfigUpdates(tp), chain, ops2contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ Args: token_pool.ApplyTokenTransferFeeConfigUpdatesArgs{ TokenTransferFeeConfigArgs: tokenTransferFeeConfigUpdates, DisableTokenTransferFeeConfigs: nil, @@ -691,7 +681,7 @@ func applyTokenTransferFeeConfigIfNeeded(b cldf_ops.Bundle, chain evm.Chain, inp if err != nil { return nil, err } - return []evm_contract.WriteOutput{report.Output}, nil + return []evm_contract.WriteOutput{writeOutputOps2ToLegacy(report.Output)}, nil } // v150OnRampConfigToTokenTransferFeeConfig converts OnRamp 1.5.0 token transfer fee config to tokens.TokenTransferFeeConfig. @@ -708,7 +698,7 @@ func v150OnRampConfigToTokenTransferFeeConfig(cfg evm_2_evm_onramp.EVM2EVMOnRamp } // v163FeeQuoterConfigToTokenTransferFeeConfig converts FeeQuoter 1.6.3 token transfer fee config to tokens.TokenTransferFeeConfig. -func v163FeeQuoterConfigToTokenTransferFeeConfig(cfg fqops_v163.TokenTransferFeeConfig) *tokens.TokenTransferFeeConfig { +func v163FeeQuoterConfigToTokenTransferFeeConfig(cfg fq163bind.FeeQuoterTokenTransferFeeConfig) *tokens.TokenTransferFeeConfig { return &tokens.TokenTransferFeeConfig{ DestGasOverhead: cfg.DestGasOverhead, DestBytesOverhead: cfg.DestBytesOverhead, @@ -721,7 +711,7 @@ func v163FeeQuoterConfigToTokenTransferFeeConfig(cfg fqops_v163.TokenTransferFee } // v2FeeQuoterConfigToTokenTransferFeeConfig converts FeeQuoter 2.0 (2.0.0 onRamp path) token transfer fee config to tokens.TokenTransferFeeConfig. -func v2FeeQuoterConfigToTokenTransferFeeConfig(cfg fqops.TokenTransferFeeConfig) *tokens.TokenTransferFeeConfig { +func v2FeeQuoterConfigToTokenTransferFeeConfig(cfg fq2bind.FeeQuoterTokenTransferFeeConfig) *tokens.TokenTransferFeeConfig { return &tokens.TokenTransferFeeConfig{ DestGasOverhead: cfg.DestGasOverhead, DestBytesOverhead: cfg.DestBytesOverhead, @@ -753,9 +743,11 @@ func importTokenTransferFeeConfigFromFeeQuoter( feeQuoterVersion := feeQuoterTAVReport.Output.Version switch { case feeQuoterVersion.Major() == 1 && feeQuoterVersion.Minor() == 6: - tokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation(b, fqops_v163.GetTokenTransferFeeConfig, chain, evm_contract.FunctionInput[fqops_v163.GetTokenTransferFeeConfigArgs]{ - ChainSelector: chainSelector, - Address: feeQuoterAddr, + fq, err := fq163bind.NewFeeQuoter(feeQuoterAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind fee quoter at %s: %w", feeQuoterAddr.Hex(), err) + } + tokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation(b, fqops_v163.NewReadGetTokenTransferFeeConfig(fq), chain, ops2contract.FunctionInput[fqops_v163.GetTokenTransferFeeConfigArgs]{ Args: fqops_v163.GetTokenTransferFeeConfigArgs{ Token: tokenAddress, DestChainSelector: remoteChainSelector, @@ -767,9 +759,11 @@ func importTokenTransferFeeConfigFromFeeQuoter( } return v163FeeQuoterConfigToTokenTransferFeeConfig(tokenTransferFeeConfigReport.Output), nil case feeQuoterVersion.String() == fqops.Version.String(): - tokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation(b, fqops.GetTokenTransferFeeConfig, chain, evm_contract.FunctionInput[fqops.GetTokenTransferFeeConfigArgs]{ - ChainSelector: chainSelector, - Address: feeQuoterAddr, + fq, err := fq2bind.NewFeeQuoter(feeQuoterAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind fee quoter at %s: %w", feeQuoterAddr.Hex(), err) + } + tokenTransferFeeConfigReport, err := cldf_ops.ExecuteOperation(b, fqops.NewReadGetTokenTransferFeeConfig(fq), chain, ops2contract.FunctionInput[fqops.GetTokenTransferFeeConfigArgs]{ Args: fqops.GetTokenTransferFeeConfigArgs{ Token: tokenAddress, DestChainSelector: remoteChainSelector, @@ -788,10 +782,11 @@ func importTokenTransferFeeConfigFromFeeQuoter( func importTokenTransferFeeConfigFromActivePool(b cldf_ops.Bundle, chain evm.Chain, input ConfigureTokenPoolForRemoteChainInput) (*tokens.TokenTransferFeeConfig, error) { // get router from token - dCfgReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetDynamicConfig, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - }) + tp, err := bindTokenPool(input.TokenPoolAddress, chain) + if err != nil { + return nil, err + } + dCfgReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetDynamicConfig(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get token dynamic config for pool %s on chain %s: %w", input.TokenPoolAddress.Hex(), chain.String(), err) } @@ -840,11 +835,11 @@ func importTokenTransferFeeConfigFromActivePool(b cldf_ops.Bundle, chain evm.Cha return v150OnRampConfigToTokenTransferFeeConfig(tokenTransferFeeConfigReport.Output), nil case semver.MustParse("1.6.0").String(): // for onRamp versions 1.6.0 , import tokenTransferFeeConfig from FeeQuoter // get fee quoter from onRamp - dCfgOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops_v160.GetDynamicConfig, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: struct{}{}, - }) + onRampV160, err := orbind160.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind onRamp at %s: %w", onRampAddr.Hex(), err) + } + dCfgOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops_v160.NewReadGetDynamicConfig(onRampV160), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get dynamic config from onRamp %s on chain %s: %w", onRampAddr.Hex(), chain.String(), err) } @@ -855,11 +850,11 @@ func importTokenTransferFeeConfigFromActivePool(b cldf_ops.Bundle, chain evm.Cha return importTokenTransferFeeConfigFromFeeQuoter(b, chain, input.ChainSelector, feeQuoterAddr, input.TokenAddress, input.RemoteChainSelector) case onrampops.Version.String(): // get fee quoter from onRamp - dCfgOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.GetDynamicConfig, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: onRampAddr, - Args: struct{}{}, - }) + onRampV2, err := orbind.NewOnRamp(onRampAddr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind onRamp at %s: %w", onRampAddr.Hex(), err) + } + dCfgOnRamp, err := cldf_ops.ExecuteOperation(b, onrampops.NewReadGetDynamicConfig(onRampV2), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, fmt.Errorf("failed to get dynamic config from onRamp %s on chain %s: %w", onRampAddr.Hex(), chain.String(), err) } @@ -903,7 +898,7 @@ func mergeTokenTransferFeeConfig(desired, imported *tokens.TokenTransferFeeConfi return &merged } -func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, input ConfigureTokenPoolForRemoteChainInput, remoteChainSelector uint64) ([]token_pool.TokenTransferFeeConfigArgs, error) { +func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, tp tpbinding.TokenPoolInterface, input ConfigureTokenPoolForRemoteChainInput, remoteChainSelector uint64) ([]tpbinding.TokenPoolTokenTransferFeeConfigArgs, error) { desiredTokenTransferFeeConfig := input.RemoteChainConfig.TokenTransferFeeConfig importedConfig, err := importTokenTransferFeeConfigFromActivePool(b, chain, input) if err != nil { @@ -914,9 +909,7 @@ func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, input if !desiredTokenTransferFeeConfig.IsEnabled { return nil, nil } - report, err := cldf_ops.ExecuteOperation(b, token_pool.GetTokenTransferFeeConfig, chain, evm_contract.FunctionInput[token_pool.GetTokenTransferFeeConfigArgs]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, + report, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetTokenTransferFeeConfig(tp), chain, ops2contract.FunctionInput[token_pool.GetTokenTransferFeeConfigArgs]{ Args: token_pool.GetTokenTransferFeeConfigArgs{ Arg0: common.Address{}, DestChainSelector: remoteChainSelector, @@ -950,7 +943,7 @@ func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, input desiredTokenTransferFeeConfig.CustomFinalityTransferFeeBps = currentTokenTransferFeeConfig.FastFinalityTransferFeeBps } - updates := make([]token_pool.TokenTransferFeeConfigArgs, 0) + updates := make([]tpbinding.TokenPoolTokenTransferFeeConfigArgs, 0) if desiredTokenTransferFeeConfig.DestGasOverhead != currentTokenTransferFeeConfig.DestGasOverhead || desiredTokenTransferFeeConfig.DestBytesOverhead != currentTokenTransferFeeConfig.DestBytesOverhead || @@ -958,9 +951,9 @@ func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, input desiredTokenTransferFeeConfig.CustomFinalityFeeUSDCents != currentTokenTransferFeeConfig.FastFinalityFeeUSDCents || desiredTokenTransferFeeConfig.DefaultFinalityTransferFeeBps != currentTokenTransferFeeConfig.FinalityTransferFeeBps || desiredTokenTransferFeeConfig.CustomFinalityTransferFeeBps != currentTokenTransferFeeConfig.FastFinalityTransferFeeBps { - updates = append(updates, token_pool.TokenTransferFeeConfigArgs{ + updates = append(updates, tpbinding.TokenPoolTokenTransferFeeConfigArgs{ DestChainSelector: remoteChainSelector, - TokenTransferFeeConfig: token_pool.TokenTransferFeeConfig{ + TokenTransferFeeConfig: tpbinding.IPoolV2TokenTransferFeeConfig{ DestGasOverhead: desiredTokenTransferFeeConfig.DestGasOverhead, DestBytesOverhead: desiredTokenTransferFeeConfig.DestBytesOverhead, FinalityFeeUSDCents: desiredTokenTransferFeeConfig.DefaultFinalityFeeUSDCents, @@ -978,15 +971,16 @@ func makeTokenTransferFeeConfigUpdates(b cldf_ops.Bundle, chain evm.Chain, input // makeCCVUpdates returns the CCV config update to apply for the remote chain, or (nil, false, nil) if on-chain // state already matches desired. Uses GetRequiredCCVs(amount=0) for standard CCVs and GetRequiredCCVs(amount>threshold) // to derive threshold-only CCVs; if an input list is empty, the on-chain value is used for comparison. -func makeCCVUpdates(b cldf_ops.Bundle, chain evm.Chain, chainSelector uint64, advancedPoolHooksAddr common.Address, remoteChainSelector uint64, inboundCCVs, outboundCCVs, inboundCCVsToAddAboveThreshold, outboundCCVsToAddAboveThreshold []string) (arg *advanced_pool_hooks.CCVConfigArg, needUpdate bool, err error) { +func makeCCVUpdates(b cldf_ops.Bundle, chain evm.Chain, chainSelector uint64, advancedPoolHooksAddr common.Address, remoteChainSelector uint64, inboundCCVs, outboundCCVs, inboundCCVsToAddAboveThreshold, outboundCCVsToAddAboveThreshold []string) (arg *aphbind.AdvancedPoolHooksCCVConfigArg, needUpdate bool, err error) { // MessageDirection: Outbound = 0, Inbound = 1 (IPoolV2.MessageDirection) const directionInbound uint8 = 1 const directionOutbound uint8 = 0 - thresholdReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetThresholdAmount, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSelector, - Address: advancedPoolHooksAddr, - }) + aph, err := bindAdvancedPoolHooks(advancedPoolHooksAddr, chain) + if err != nil { + return nil, false, err + } + thresholdReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetThresholdAmount(aph), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return nil, false, fmt.Errorf("get threshold amount: %w", err) } @@ -994,9 +988,7 @@ func makeCCVUpdates(b cldf_ops.Bundle, chain evm.Chain, chainSelector uint64, ad amountAboveThreshold := new(big.Int).Add(threshold, big.NewInt(1)) getRequiredCCVs := func(amount *big.Int, direction uint8) ([]common.Address, error) { - report, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetRequiredCCVs, chain, evm_contract.FunctionInput[advanced_pool_hooks.GetRequiredCCVsArgs]{ - ChainSelector: chainSelector, - Address: advancedPoolHooksAddr, + report, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetRequiredCCVs(aph), chain, ops2contract.FunctionInput[advanced_pool_hooks.GetRequiredCCVsArgs]{ Args: advanced_pool_hooks.GetRequiredCCVsArgs{ RemoteChainSelector: remoteChainSelector, Amount: amount, @@ -1059,7 +1051,7 @@ func makeCCVUpdates(b cldf_ops.Bundle, chain evm.Chain, chainSelector uint64, ad v17seq.UnorderedSliceEqual(desiredThresholdOutbound, onChainThresholdOutbound, addrEq) { return nil, false, nil } - return &advanced_pool_hooks.CCVConfigArg{ + return &aphbind.AdvancedPoolHooksCCVConfigArg{ RemoteChainSelector: remoteChainSelector, OutboundCCVs: desiredOutbound, ThresholdOutboundCCVs: desiredThresholdOutbound, diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_internal_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_internal_test.go index eb6d3b839b..7676dc5c3c 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_internal_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_internal_test.go @@ -6,23 +6,22 @@ import ( "github.com/stretchr/testify/require" - token_pool_v161 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/token_pool" - fqops_v163 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_3/operations/fee_quoter" + tp161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/token_pool" + fq163bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + fq2bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" - - fqops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" ) func Test_tokenBucketToRateLimiterConfig(t *testing.T) { tests := []struct { name string - b token_pool_v161.TokenBucket + b tp161bind.RateLimiterTokenBucket want *tokens.RateLimiterConfig }{ { name: "enabled with capacity and rate", - b: token_pool_v161.TokenBucket{ + b: tp161bind.RateLimiterTokenBucket{ IsEnabled: true, Capacity: big.NewInt(1000), Rate: big.NewInt(100), @@ -35,7 +34,7 @@ func Test_tokenBucketToRateLimiterConfig(t *testing.T) { }, { name: "disabled", - b: token_pool_v161.TokenBucket{ + b: tp161bind.RateLimiterTokenBucket{ IsEnabled: false, Capacity: big.NewInt(0), Rate: big.NewInt(0), @@ -80,7 +79,7 @@ func Test_v150OnRampConfigToTokenTransferFeeConfig(t *testing.T) { } func Test_v163FeeQuoterConfigToTokenTransferFeeConfig(t *testing.T) { - cfg := fqops_v163.TokenTransferFeeConfig{ + cfg := fq163bind.FeeQuoterTokenTransferFeeConfig{ MinFeeUSDCents: 75, MaxFeeUSDCents: 750, DeciBps: 150, @@ -100,7 +99,7 @@ func Test_v163FeeQuoterConfigToTokenTransferFeeConfig(t *testing.T) { } func Test_v2FeeQuoterConfigToTokenTransferFeeConfig(t *testing.T) { - cfg := fqops.TokenTransferFeeConfig{ + cfg := fq2bind.FeeQuoterTokenTransferFeeConfig{ FeeUSDCents: 100, DestGasOverhead: 180_000, DestBytesOverhead: 48, diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_test.go index a2aabde022..256662fa17 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chain_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/deployment/finality" contract_utils "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" evm_datastore_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/datastore" @@ -706,13 +707,9 @@ func TestConfigureTokenPoolForRemoteChain_DynamicFinalityRateLimits(t *testing.T // ======================================== _, err = operations.ExecuteOperation( e.OperationsBundle, - token_pool.SetAllowedFinalityConfig, + token_pool.NewWriteSetAllowedFinalityConfig(tp), e.BlockChains.EVMChains()[chainSel], - contract_utils.FunctionInput[[4]byte]{ - ChainSelector: chainSel, - Address: tokenPoolAddress, - Args: finality.Config{BlockDepth: 12}.Raw(), - }, + ops2contract.FunctionInput[[4]byte]{Args: finality.Config{BlockDepth: 12}.Raw()}, ) require.NoError(t, err, "SetAllowedFinalityConfig should not error") diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chains.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chains.go index 987aba82e7..a5a89b1c8c 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chains.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_for_remote_chains.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/token_pool" evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -50,10 +51,11 @@ var ConfigureTokenPoolForRemoteChains = cldf_ops.NewSequence( } activePool := tokenConfigReport.Output.TokenPool if activePool != (common.Address{}) { - supportedChainsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetSupportedChains, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: activePool, - }) + activeTP, err := bindTokenPool(activePool, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + supportedChainsReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetSupportedChains(activeTP), chain, ops2contract.FunctionInput[struct{}]{}) if err == nil { // Validate that remoteChains includes all chains the active pool already supports (upgrade safety). supportedChains := supportedChainsReport.Output @@ -69,10 +71,11 @@ var ConfigureTokenPoolForRemoteChains = cldf_ops.NewSequence( } } ops := make([]mcms_types.BatchOperation, 0) - supportedChainsReport, err := cldf_ops.ExecuteOperation(b, token_pool.GetSupportedChains, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: input.TokenPoolAddress, - }) + tp, err := bindTokenPool(input.TokenPoolAddress, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + supportedChainsReport, err := cldf_ops.ExecuteOperation(b, token_pool.NewReadGetSupportedChains(tp), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get supported chains from pool: %w", err) } diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_test.go index 49622db62e..c430ead245 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/configure_token_pool_test.go @@ -6,8 +6,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -96,14 +96,14 @@ func TestConfigurePool(t *testing.T) { require.Len(t, configureReport.Output.Addresses, 0, "Expected 0 addresses in output") // Check dynamic config + evmChain := e.BlockChains.EVMChains()[chainSel] + tp, err := tokens.BindTokenPool(input.TokenPoolAddress, evmChain) + require.NoError(t, err, "BindTokenPool should not error") getDynamicConfigReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetDynamicConfig, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: input.TokenPoolAddress, - }, + token_pool.NewReadGetDynamicConfig(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.RouterAddress, getDynamicConfigReport.Output.Router, "Expected router address to be the same as the deployed router") diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool.go b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool.go index e617d0a196..f033cf4c30 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool.go @@ -8,7 +8,9 @@ import ( "github.com/ethereum/go-ethereum/common" evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -28,8 +30,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("invalid input: %w", err) } - hooksDeployReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.Deploy, chain, evm_contract.DeployInput[advanced_pool_hooks.ConstructorArgs]{ - ChainSelector: input.ChainSel, + hooksDeployRef, err := ops2contract.MaybeDeployContract(b, advanced_pool_hooks.Deploy, chain, ops2contract.DeployInput[advanced_pool_hooks.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks.ContractType, *advanced_pool_hooks.Version), Args: advanced_pool_hooks.ConstructorArgs{ Allowlist: input.AdvancedPoolHooksConfig.Allowlist, @@ -38,7 +39,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( AuthorizedCallers: input.AdvancedPoolHooksConfig.AuthorizedCallers, }, Qualifier: &input.TokenSymbol, - }) + }, nil) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to deploy advanced pool hooks to %s: %w", chain, err) } @@ -56,7 +57,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( }{ Token: input.ConstructorArgs.Token, LocalTokenDecimals: input.ConstructorArgs.Decimals, - AdvancedPoolHooks: common.HexToAddress(hooksDeployReport.Output.Address), + AdvancedPoolHooks: common.HexToAddress(hooksDeployRef.Address), RMNProxy: input.ConstructorArgs.RMNProxy, Router: input.ConstructorArgs.Router, } @@ -64,8 +65,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( var tpDeployReport *datastore.AddressRef switch deployment.ContractType(input.TokenPoolType) { case burn_mint_token_pool.ContractType: - report, deployErr := cldf_ops.ExecuteOperation(b, burn_mint_token_pool.Deploy, chain, evm_contract.DeployInput[burn_mint_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSel, + ref, deployErr := ops2contract.MaybeDeployContract(b, burn_mint_token_pool.Deploy, chain, ops2contract.DeployInput[burn_mint_token_pool.ConstructorArgs]{ TypeAndVersion: typeAndVersion, Args: burn_mint_token_pool.ConstructorArgs{ Token: constructorArgs.Token, @@ -75,11 +75,10 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( Router: constructorArgs.Router, }, Qualifier: &input.TokenSymbol, - }) - tpDeployReport, err = &report.Output, deployErr + }, nil) + tpDeployReport, err = &ref, deployErr case burn_from_mint_token_pool.ContractType: - report, deployErr := cldf_ops.ExecuteOperation(b, burn_from_mint_token_pool.Deploy, chain, evm_contract.DeployInput[burn_from_mint_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSel, + ref, deployErr := ops2contract.MaybeDeployContract(b, burn_from_mint_token_pool.Deploy, chain, ops2contract.DeployInput[burn_from_mint_token_pool.ConstructorArgs]{ TypeAndVersion: typeAndVersion, Args: burn_from_mint_token_pool.ConstructorArgs{ Token: constructorArgs.Token, @@ -89,11 +88,10 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( Router: constructorArgs.Router, }, Qualifier: &input.TokenSymbol, - }) - tpDeployReport, err = &report.Output, deployErr + }, nil) + tpDeployReport, err = &ref, deployErr case burn_with_from_mint_token_pool.ContractType: - report, deployErr := cldf_ops.ExecuteOperation(b, burn_with_from_mint_token_pool.Deploy, chain, evm_contract.DeployInput[burn_with_from_mint_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSel, + ref, deployErr := ops2contract.MaybeDeployContract(b, burn_with_from_mint_token_pool.Deploy, chain, ops2contract.DeployInput[burn_with_from_mint_token_pool.ConstructorArgs]{ TypeAndVersion: typeAndVersion, Args: burn_with_from_mint_token_pool.ConstructorArgs{ Token: constructorArgs.Token, @@ -103,8 +101,8 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( Router: constructorArgs.Router, }, Qualifier: &input.TokenSymbol, - }) - tpDeployReport, err = &report.Output, deployErr + }, nil) + tpDeployReport, err = &ref, deployErr default: return sequences.OnChainOutput{}, fmt.Errorf("unsupported burn mint token pool type %s", input.TokenPoolType) } @@ -116,7 +114,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( ChainSelector: input.ChainSel, TokenPoolAddress: common.HexToAddress(tpDeployReport.Address), RateLimitAdmin: input.RateLimitAdmin, - AdvancedPoolHooks: common.HexToAddress(hooksDeployReport.Output.Address), + AdvancedPoolHooks: common.HexToAddress(hooksDeployRef.Address), RouterAddress: input.ConstructorArgs.Router, ThresholdAmountForAdditionalCCVs: input.ThresholdAmountForAdditionalCCVs, FeeAggregator: input.FeeAggregator, @@ -128,21 +126,20 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( // Add the newly deployed token pool as an authorized caller on the hooks. { poolAddr := common.HexToAddress(tpDeployReport.Address) - hooksAddr := common.HexToAddress(hooksDeployReport.Output.Address) + hooksAddr := common.HexToAddress(hooksDeployRef.Address) + aph, err := bindAdvancedPoolHooks(hooksAddr, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } - getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetAllAuthorizedCallers, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSel, - Address: hooksAddr, - }) + getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetAllAuthorizedCallers(aph), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get authorized callers from advanced pool hooks %s on %s: %w", hooksAddr, chain, err) } if !slices.Contains(getAuthorizedCallersReport.Output, poolAddr) { - applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[advanced_pool_hooks.AuthorizedCallerArgs]{ - ChainSelector: input.ChainSel, - Address: hooksAddr, - Args: advanced_pool_hooks.AuthorizedCallerArgs{ + applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteApplyAuthorizedCallerUpdates(aph), chain, ops2contract.FunctionInput[aphbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: aphbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{poolAddr}, }, }) @@ -150,7 +147,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("failed to authorize token pool %s on advanced pool hooks with address %s on %s: %w", poolAddr, hooksAddr, chain, err) } - batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{applyAuthorizedCallerUpdatesReport.Output}) + batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{writeOutputOps2ToLegacy(applyAuthorizedCallerUpdatesReport.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } @@ -159,7 +156,7 @@ var DeployBurnMintTokenPool = cldf_ops.NewSequence( } return sequences.OnChainOutput{ - Addresses: []datastore.AddressRef{*tpDeployReport, hooksDeployReport.Output}, + Addresses: []datastore.AddressRef{*tpDeployReport, hooksDeployRef}, BatchOps: configureReport.Output.BatchOps, }, nil }, diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool_test.go index 81d936178b..f423eea2b5 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_burn_mint_token_pool_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" contract_utils "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/burn_mint_erc20_with_drip" @@ -280,16 +281,18 @@ func TestDeployTokenPool(t *testing.T) { poolAddress := poolReport.Output.Addresses[0].Address hooksAddress := poolReport.Output.Addresses[1].Address + evmChain := e.BlockChains.EVMChains()[chainSel] + tp, err := tokens.BindTokenPool(common.HexToAddress(poolAddress), evmChain) + require.NoError(t, err, "BindTokenPool should not error") + aph, err := tokens.BindAdvancedPoolHooks(common.HexToAddress(hooksAddress), evmChain) + require.NoError(t, err, "BindAdvancedPoolHooks should not error") // Check token getTokenReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetToken, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetToken(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.Token, getTokenReport.Output, "Expected token address to be the same as the deployed token") @@ -297,12 +300,9 @@ func TestDeployTokenPool(t *testing.T) { // Check dynamic config getDynamicConfigReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetDynamicConfig, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetDynamicConfig(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.Router, getDynamicConfigReport.Output.Router, "Expected router address to be the same as the deployed router") @@ -311,12 +311,9 @@ func TestDeployTokenPool(t *testing.T) { // Check rmn proxy getRmnProxyReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetRmnProxy, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetRmnProxy(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.RMNProxy, getRmnProxyReport.Output, "Expected rmn proxy address to be the same as the deployed rmn proxy") @@ -324,12 +321,9 @@ func TestDeployTokenPool(t *testing.T) { // Check threshold amount for additional ccvs getThresholdAmountReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetThresholdAmount, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetThresholdAmount(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ThresholdAmountForAdditionalCCVs, getThresholdAmountReport.Output, "Expected threshold amount for additional ccvs to be the same as the inputted threshold amount for additional ccvs") @@ -338,12 +332,9 @@ func TestDeployTokenPool(t *testing.T) { if input.AdvancedPoolHooksConfig.PolicyEngine != (common.Address{}) { getPolicyEngineReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetPolicyEngine, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetPolicyEngine(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.AdvancedPoolHooksConfig.PolicyEngine, getPolicyEngineReport.Output, "Expected policy engine address to be the same as the inputted policy engine address") @@ -352,12 +343,9 @@ func TestDeployTokenPool(t *testing.T) { // Verify the newly deployed token pool is authorized on the hooks. getAuthorizedCallersReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetAllAuthorizedCallers, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetAllAuthorizedCallers(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Contains(t, getAuthorizedCallersReport.Output, common.HexToAddress(poolAddress), "Expected token pool address to be in the on-chain authorized callers") diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool.go b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool.go index b961f7b0e4..a9b42b4cf8 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool.go @@ -9,8 +9,8 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" - mcms_types "github.com/smartcontractkit/mcms/types" evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -18,6 +18,8 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20_lock_box" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" ) var DeployLockReleaseTokenPool = cldf_ops.NewSequence( @@ -29,20 +31,18 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("invalid input: %w", err) } - lockBoxDeployReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.Deploy, chain, evm_contract.DeployInput[erc20_lock_box.ConstructorArgs]{ - ChainSelector: input.ChainSel, + lockBoxDeployRef, err := ops2contract.MaybeDeployContract(b, erc20_lock_box.Deploy, chain, ops2contract.DeployInput[erc20_lock_box.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(erc20_lock_box.ContractType, *erc20_lock_box.Version), Args: erc20_lock_box.ConstructorArgs{ Token: input.ConstructorArgs.Token, }, Qualifier: &input.TokenSymbol, - }) + }, nil) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to deploy ERC20 lock box to %s: %w", chain, err) } - hooksDeployReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.Deploy, chain, evm_contract.DeployInput[advanced_pool_hooks.ConstructorArgs]{ - ChainSelector: input.ChainSel, + hooksDeployRef, err := ops2contract.MaybeDeployContract(b, advanced_pool_hooks.Deploy, chain, ops2contract.DeployInput[advanced_pool_hooks.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(advanced_pool_hooks.ContractType, *advanced_pool_hooks.Version), Args: advanced_pool_hooks.ConstructorArgs{ Allowlist: input.AdvancedPoolHooksConfig.Allowlist, @@ -51,7 +51,7 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence( AuthorizedCallers: input.AdvancedPoolHooksConfig.AuthorizedCallers, }, Qualifier: &input.TokenSymbol, - }) + }, nil) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to deploy advanced pool hooks to %s: %w", chain, err) } @@ -60,53 +60,50 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence( deployment.ContractType(input.TokenPoolType), *input.TokenPoolVersion, ) - tpDeployReport, err := cldf_ops.ExecuteOperation(b, lock_release_token_pool.Deploy, chain, evm_contract.DeployInput[lock_release_token_pool.ConstructorArgs]{ - ChainSelector: input.ChainSel, + tpDeployRef, err := ops2contract.MaybeDeployContract(b, lock_release_token_pool.Deploy, chain, ops2contract.DeployInput[lock_release_token_pool.ConstructorArgs]{ TypeAndVersion: typeAndVersion, Args: lock_release_token_pool.ConstructorArgs{ Token: input.ConstructorArgs.Token, LocalTokenDecimals: input.ConstructorArgs.Decimals, - AdvancedPoolHooks: common.HexToAddress(hooksDeployReport.Output.Address), + AdvancedPoolHooks: common.HexToAddress(hooksDeployRef.Address), RmnProxy: input.ConstructorArgs.RMNProxy, Router: input.ConstructorArgs.Router, - LockBox: common.HexToAddress(lockBoxDeployReport.Output.Address), + LockBox: common.HexToAddress(lockBoxDeployRef.Address), }, Qualifier: &input.TokenSymbol, - }) + }, nil) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to deploy %s to %s: %w", typeAndVersion, chain, err) } configureReport, err := cldf_ops.ExecuteSequence(b, ConfigureTokenPool, chain, ConfigureTokenPoolInput{ ChainSelector: input.ChainSel, - TokenPoolAddress: common.HexToAddress(tpDeployReport.Output.Address), + TokenPoolAddress: common.HexToAddress(tpDeployRef.Address), RateLimitAdmin: input.RateLimitAdmin, - AdvancedPoolHooks: common.HexToAddress(hooksDeployReport.Output.Address), + AdvancedPoolHooks: common.HexToAddress(hooksDeployRef.Address), RouterAddress: input.ConstructorArgs.Router, ThresholdAmountForAdditionalCCVs: input.ThresholdAmountForAdditionalCCVs, }) if err != nil { - return sequences.OnChainOutput{}, fmt.Errorf("failed to configure token pool with address %s on %s: %w", tpDeployReport.Output.Address, chain, err) + return sequences.OnChainOutput{}, fmt.Errorf("failed to configure token pool with address %s on %s: %w", tpDeployRef.Address, chain, err) } - // Add the newly deployed token pool as an authorized caller on the hooks. { - poolAddr := common.HexToAddress(tpDeployReport.Output.Address) - hooksAddr := common.HexToAddress(hooksDeployReport.Output.Address) + poolAddr := common.HexToAddress(tpDeployRef.Address) + hooksAddr := common.HexToAddress(hooksDeployRef.Address) + aph, err := bindAdvancedPoolHooks(hooksAddr, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } - getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.GetAllAuthorizedCallers, chain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSel, - Address: hooksAddr, - }) + getAuthorizedCallersReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewReadGetAllAuthorizedCallers(aph), chain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get authorized callers from advanced pool hooks %s on %s: %w", hooksAddr, chain, err) } if !slices.Contains(getAuthorizedCallersReport.Output, poolAddr) { - applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[advanced_pool_hooks.AuthorizedCallerArgs]{ - ChainSelector: input.ChainSel, - Address: hooksAddr, - Args: advanced_pool_hooks.AuthorizedCallerArgs{ + applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, advanced_pool_hooks.NewWriteApplyAuthorizedCallerUpdates(aph), chain, ops2contract.FunctionInput[aphbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: aphbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{poolAddr}, }, }) @@ -114,38 +111,40 @@ var DeployLockReleaseTokenPool = cldf_ops.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("failed to authorize token pool %s on advanced pool hooks with address %s on %s: %w", poolAddr, hooksAddr, chain, err) } - batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{applyAuthorizedCallerUpdatesReport.Output}) + batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{writeOutputOps2ToLegacy(applyAuthorizedCallerUpdatesReport.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } - configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, []mcms_types.BatchOperation{batchOp}...) + configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, batchOp) } } - // Add lock release token pool to the authorized callers of the lock box. - applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.ApplyAuthorizedCallerUpdates, chain, evm_contract.FunctionInput[erc20_lock_box.AuthorizedCallerArgs]{ - ChainSelector: input.ChainSel, - Address: common.HexToAddress(lockBoxDeployReport.Output.Address), - Args: erc20_lock_box.AuthorizedCallerArgs{ + lockBoxAddr := common.HexToAddress(lockBoxDeployRef.Address) + lockBox, err := lockboxbind.NewERC20LockBox(lockBoxAddr, chain.Client) + if err != nil { + return sequences.OnChainOutput{}, fmt.Errorf("failed to bind lock box at %s: %w", lockBoxAddr.Hex(), err) + } + applyAuthorizedCallerUpdatesReport, err := cldf_ops.ExecuteOperation(b, erc20_lock_box.NewWriteApplyAuthorizedCallerUpdates(lockBox), chain, ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{ - common.HexToAddress(tpDeployReport.Output.Address), + common.HexToAddress(tpDeployRef.Address), }, }, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to apply authorized caller updates to lock box on %s: %w", chain, err) } - batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{applyAuthorizedCallerUpdatesReport.Output}) + batchOp, err := evm_contract.NewBatchOperationFromWrites([]evm_contract.WriteOutput{writeOutputOps2ToLegacy(applyAuthorizedCallerUpdatesReport.Output)}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to create batch operation from writes: %w", err) } - configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, []mcms_types.BatchOperation{batchOp}...) + configureReport.Output.BatchOps = append(configureReport.Output.BatchOps, batchOp) return sequences.OnChainOutput{ Addresses: []datastore.AddressRef{ - tpDeployReport.Output, - hooksDeployReport.Output, - lockBoxDeployReport.Output, + tpDeployRef, + hooksDeployRef, + lockBoxDeployRef, }, BatchOps: configureReport.Output.BatchOps, }, nil diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool_test.go index 1385fd2c76..d58ca90012 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/deploy_lock_release_token_pool_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/burn_mint_erc20_with_drip" @@ -22,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/create2_factory" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/advanced_pool_hooks" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20_lock_box" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" @@ -282,16 +284,18 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { poolAddress := poolReport.Output.Addresses[0].Address hooksAddress := poolReport.Output.Addresses[1].Address lockBoxAddress := poolReport.Output.Addresses[2].Address + evmChain := e.BlockChains.EVMChains()[chainSel] + tp, err := tokens.BindTokenPool(common.HexToAddress(poolAddress), evmChain) + require.NoError(t, err, "BindTokenPool should not error") + aph, err := tokens.BindAdvancedPoolHooks(common.HexToAddress(hooksAddress), evmChain) + require.NoError(t, err, "BindAdvancedPoolHooks should not error") // Check token getTokenReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetToken, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetToken(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.Token, getTokenReport.Output, "Expected token address to be the same as the deployed token") @@ -299,12 +303,9 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { // Check dynamic config getDynamicConfigReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetDynamicConfig, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetDynamicConfig(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.Router, getDynamicConfigReport.Output.Router, "Expected router address to be the same as the deployed router") @@ -313,12 +314,9 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { // Check rmn proxy getRmnProxyReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - token_pool.GetRmnProxy, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(poolAddress), - }, + token_pool.NewReadGetRmnProxy(tp), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ConstructorArgs.RMNProxy, getRmnProxyReport.Output, "Expected rmn proxy address to be the same as the deployed rmn proxy") @@ -326,12 +324,9 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { // Check threshold amount for additional ccvs getThresholdAmountReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetThresholdAmount, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetThresholdAmount(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.ThresholdAmountForAdditionalCCVs, getThresholdAmountReport.Output, "Expected threshold amount for additional ccvs to be the same as the inputted threshold amount for additional ccvs") @@ -340,12 +335,9 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { if input.AdvancedPoolHooksConfig.PolicyEngine != (common.Address{}) { getPolicyEngineReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetPolicyEngine, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetPolicyEngine(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Equal(t, input.AdvancedPoolHooksConfig.PolicyEngine, getPolicyEngineReport.Output, "Expected policy engine address to be the same as the inputted policy engine address") @@ -354,25 +346,21 @@ func TestDeployLockReleaseTokenPool(t *testing.T) { // Verify the newly deployed token pool is authorized on the hooks. getAuthorizedCallersReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - advanced_pool_hooks.GetAllAuthorizedCallers, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(hooksAddress), - }, + advanced_pool_hooks.NewReadGetAllAuthorizedCallers(aph), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Contains(t, getAuthorizedCallersReport.Output, common.HexToAddress(poolAddress), "Expected token pool address to be in the on-chain authorized callers") // Check authorized callers on lock box + lockBox, err := lockboxbind.NewERC20LockBox(common.HexToAddress(lockBoxAddress), evmChain.Client) + require.NoError(t, err, "BindLockBox should not error") getLockBoxCallersReport, err := operations.ExecuteOperation( testsetup.BundleWithFreshReporter(e.OperationsBundle), - erc20_lock_box.GetAllAuthorizedCallers, - e.BlockChains.EVMChains()[chainSel], - contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: common.HexToAddress(lockBoxAddress), - }, + erc20_lock_box.NewReadGetAllAuthorizedCallers(lockBox), + evmChain, + ops2contract.FunctionInput[struct{}]{}, ) require.NoError(t, err, "ExecuteOperation should not error") require.Len(t, getLockBoxCallersReport.Output, 1, "Expected 1 address in on-chain authorized callers") diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity.go b/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity.go index 7a52dfe0c2..760cb05af8 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity.go @@ -6,23 +6,26 @@ import ( "strings" "github.com/Masterminds/semver/v3" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" cldf_ops "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" erc20_ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20" lockbox_ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/erc20_lock_box" lrtp_ops_v170 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/lock_release_token_pool" - siloed_lrtp_ops_v170 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/siloed_lock_release_token_pool" token_pool_ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/token_pool" evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/type_and_version" tar_ops "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" lrtp_ops_v161 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool" siloed_ops_v161 "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + lrtp161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/lock_release_token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" ) @@ -54,10 +57,11 @@ var MigrateLockReleasePoolLiquidity = cldf_ops.NewSequence( } oldPoolType := string(tvReport.Output.Type) - tokenReport, err := cldf_ops.ExecuteOperation(b, token_pool_ops.GetToken, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: input.ChainSelector, - Address: newPoolAddr, - }) + newTP, err := bindTokenPool(newPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + tokenReport, err := cldf_ops.ExecuteOperation(b, token_pool_ops.NewReadGetToken(newTP), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get token address from new pool %s: %w", newPoolAddr, err) } @@ -121,19 +125,22 @@ func migrateUnsiloedPool( chainSel := input.ChainSelector var ops []evm_contract.WriteOutput - lockboxReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v170.GetLockBox, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: newPoolAddr, - }) + newLRTP, err := bindLRTP170(newPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + lockboxReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v170.NewReadGetLockBox(newLRTP), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get lockbox from new pool %s: %w", newPoolAddr, err) } lockboxAddr := lockboxReport.Output - balanceReport, err := cldf_ops.ExecuteOperation(b, erc20_ops.BalanceOf, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: tokenAddr, - Args: oldPoolAddr, + token, err := bindCrossChainToken(tokenAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + balanceReport, err := cldf_ops.ExecuteOperation(b, erc20_ops.NewReadBalanceOf(token), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: oldPoolAddr, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get balance of old pool %s: %w", oldPoolAddr, err) @@ -148,16 +155,17 @@ func migrateUnsiloedPool( return sequences.OnChainOutput{}, fmt.Errorf("migration amount %s exceeds old pool balance %s", amount, balance) } - rebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.GetRebalancer, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - }) + oldLRTP, err := bindLRTP161(oldPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + rebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.NewReadGetRebalancer(oldLRTP), evmChain, ops2contract.FunctionInput[struct{}]{}) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get rebalancer from old pool %s: %w", oldPoolAddr, err) } originalRebalancer := rebalancerReport.Output - ops, err = appendSetRebalancerAndWithdraw(b, evmChain, chainSel, oldPoolAddr, timelockAddr, amount, ops) + ops, err = appendSetRebalancerAndWithdraw(b, evmChain, oldLRTP, timelockAddr, amount, ops) if err != nil { return sequences.OnChainOutput{}, err } @@ -167,7 +175,7 @@ func migrateUnsiloedPool( return sequences.OnChainOutput{}, err } - ops, err = appendCleanup(b, evmChain, chainSel, lockboxAddr, oldPoolAddr, timelockAddr, originalRebalancer, ops) + ops, err = appendCleanup(b, evmChain, lockboxAddr, oldLRTP, timelockAddr, originalRebalancer, ops) if err != nil { return sequences.OnChainOutput{}, err } @@ -198,46 +206,43 @@ func migrateSiloedPool( chainSel := input.ChainSelector var ops []evm_contract.WriteOutput - chainsReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.GetSupportedChains, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - }) + oldSiloed, err := bindSiloedLRTP161(oldPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + newSiloed, err := bindSiloedLRTP170(newPoolAddr, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + + callOpts := &bind.CallOpts{Context: b.GetContext()} + supportedChains, err := oldSiloed.GetSupportedChains(callOpts) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get supported chains from old siloed pool %s: %w", oldPoolAddr, err) } - supportedChains := chainsReport.Output - lockboxConfigsReport, err := cldf_ops.ExecuteOperation(b, siloed_lrtp_ops_v170.GetAllLockBoxConfigs, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: newPoolAddr, - }) + lockboxConfigs, err := newSiloed.GetAllLockBoxConfigs(callOpts) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get lockbox configs from new pool %s: %w", newPoolAddr, err) } lockboxByChain := make(map[uint64]common.Address) - for _, config := range lockboxConfigsReport.Output { + for _, config := range lockboxConfigs { lockboxByChain[config.RemoteChainSelector] = config.LockBox } - rebalancerReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.GetRebalancer, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - }) + originalUnsiloedRebalancer, err := oldSiloed.GetRebalancer(callOpts) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get unsiloed rebalancer from old pool %s: %w", oldPoolAddr, err) } - originalUnsiloedRebalancer := rebalancerReport.Output - setRebalancerReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.SetRebalancer, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: timelockAddr, + setRebalancerReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteSetRebalancer(oldSiloed), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: timelockAddr, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set unsiloed rebalancer on old pool %s: %w", oldPoolAddr, err) } - ops = append(ops, setRebalancerReport.Output) + ops = appendWrite(ops, setRebalancerReport.Output) type chainRebalancerInfo struct { chainSelector uint64 @@ -247,28 +252,18 @@ func migrateSiloedPool( var siloInfos []chainRebalancerInfo for _, remoteChain := range supportedChains { - isSiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.IsSiloed, evmChain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: remoteChain, - }) + isSiloed, err := oldSiloed.IsSiloed(callOpts, remoteChain) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to check if chain %d is siloed on old pool %s: %w", remoteChain, oldPoolAddr, err) } - if isSiloedReport.Output { - chainRebalancerReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.GetChainRebalancer, evmChain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: remoteChain, - }) + if isSiloed { + chainRebalancer, err := oldSiloed.GetChainRebalancer(callOpts, remoteChain) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get chain rebalancer for chain %d: %w", remoteChain, err) } - setSiloReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.SetSiloRebalancer, evmChain, evm_contract.FunctionInput[siloed_ops_v161.SetSiloRebalancerArgs]{ - ChainSelector: chainSel, - Address: oldPoolAddr, + setSiloReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteSetSiloRebalancer(oldSiloed), evmChain, ops2contract.FunctionInput[siloed_ops_v161.SetSiloRebalancerArgs]{ Args: siloed_ops_v161.SetSiloRebalancerArgs{ RemoteChainSelector: remoteChain, NewRebalancer: timelockAddr, @@ -277,11 +272,11 @@ func migrateSiloedPool( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to set silo rebalancer for chain %d: %w", remoteChain, err) } - ops = append(ops, setSiloReport.Output) + ops = appendWrite(ops, setSiloReport.Output) siloInfos = append(siloInfos, chainRebalancerInfo{ chainSelector: remoteChain, - originalRebalancer: chainRebalancerReport.Output, + originalRebalancer: chainRebalancer, isSiloed: true, }) } else { @@ -307,24 +302,16 @@ func migrateSiloedPool( firstLockbox = lockbox } - availableReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.GetAvailableTokens, evmChain, evm_contract.FunctionInput[uint64]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: info.chainSelector, - }) + siloBalance, err := oldSiloed.GetAvailableTokens(callOpts, info.chainSelector) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get available tokens for chain %d: %w", info.chainSelector, err) } - - siloBalance := availableReport.Output siloAmount := computeAmount(siloBalance, input) if siloAmount.Sign() == 0 { continue } - withdrawReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.WithdrawSiloedLiquidity, evmChain, evm_contract.FunctionInput[siloed_ops_v161.WithdrawSiloedLiquidityArgs]{ - ChainSelector: chainSel, - Address: oldPoolAddr, + withdrawReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteWithdrawSiloedLiquidity(oldSiloed), evmChain, ops2contract.FunctionInput[siloed_ops_v161.WithdrawSiloedLiquidityArgs]{ Args: siloed_ops_v161.WithdrawSiloedLiquidityArgs{ RemoteChainSelector: info.chainSelector, Amount: siloAmount, @@ -333,7 +320,7 @@ func migrateSiloedPool( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to withdraw siloed liquidity for chain %d: %w", info.chainSelector, err) } - ops = append(ops, withdrawReport.Output) + ops = appendWrite(ops, withdrawReport.Output) ops, err = appendAuthApproveDeposit(b, evmChain, chainSel, lockbox, tokenAddr, timelockAddr, siloAmount, info.chainSelector, ops) if err != nil { @@ -342,14 +329,10 @@ func migrateSiloedPool( usedLockboxes[lockbox] = true } - unsiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.GetUnsiloedLiquidity, evmChain, evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - }) + unsiloedBalance, err := oldSiloed.GetUnsiloedLiquidity(callOpts) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to get unsiloed liquidity from old pool %s: %w", oldPoolAddr, err) } - unsiloedBalance := unsiloedReport.Output unsiloedAmount := computeAmount(unsiloedBalance, input) if unsiloedAmount.Sign() > 0 { @@ -364,15 +347,13 @@ func migrateSiloedPool( return sequences.OnChainOutput{}, fmt.Errorf("no lockbox available for unsiloed liquidity deposit") } - withdrawUnsiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.WithdrawLiquidity, evmChain, evm_contract.FunctionInput[*big.Int]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: unsiloedAmount, + withdrawUnsiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteWithdrawLiquidity(oldSiloed), evmChain, ops2contract.FunctionInput[*big.Int]{ + Args: unsiloedAmount, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to withdraw unsiloed liquidity: %w", err) } - ops = append(ops, withdrawUnsiloedReport.Output) + ops = appendWrite(ops, withdrawUnsiloedReport.Output) ops, err = appendAuthApproveDeposit(b, evmChain, chainSel, depositLockbox, tokenAddr, timelockAddr, unsiloedAmount, 0, ops) if err != nil { @@ -383,9 +364,7 @@ func migrateSiloedPool( for _, info := range siloInfos { if info.isSiloed { - restoreReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.SetSiloRebalancer, evmChain, evm_contract.FunctionInput[siloed_ops_v161.SetSiloRebalancerArgs]{ - ChainSelector: chainSel, - Address: oldPoolAddr, + restoreReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteSetSiloRebalancer(oldSiloed), evmChain, ops2contract.FunctionInput[siloed_ops_v161.SetSiloRebalancerArgs]{ Args: siloed_ops_v161.SetSiloRebalancerArgs{ RemoteChainSelector: info.chainSelector, NewRebalancer: info.originalRebalancer, @@ -394,25 +373,26 @@ func migrateSiloedPool( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to restore silo rebalancer for chain %d: %w", info.chainSelector, err) } - ops = append(ops, restoreReport.Output) + ops = appendWrite(ops, restoreReport.Output) } } - restoreUnsiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.SetRebalancer, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: originalUnsiloedRebalancer, + restoreUnsiloedReport, err := cldf_ops.ExecuteOperation(b, siloed_ops_v161.NewWriteSetRebalancer(oldSiloed), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: originalUnsiloedRebalancer, }) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to restore unsiloed rebalancer: %w", err) } - ops = append(ops, restoreUnsiloedReport.Output) + ops = appendWrite(ops, restoreUnsiloedReport.Output) for lb := range usedLockboxes { - removeAuthReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.ApplyAuthorizedCallerUpdates, evmChain, evm_contract.FunctionInput[lockbox_ops.AuthorizedCallerArgs]{ - ChainSelector: chainSel, - Address: lb, - Args: lockbox_ops.AuthorizedCallerArgs{ + lockBox, err := bindLockBox(lb, evmChain) + if err != nil { + return sequences.OnChainOutput{}, err + } + cleanupBundle := cldf_ops.NewBundle(b.GetContext, b.Logger, cldf_ops.NewMemoryReporter()) + removeAuthReport, err := cldf_ops.ExecuteOperation(cleanupBundle, lockbox_ops.NewWriteApplyAuthorizedCallerUpdates(lockBox), evmChain, ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{}, RemovedCallers: []common.Address{timelockAddr}, }, @@ -420,7 +400,7 @@ func migrateSiloedPool( if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to remove timelock from lockbox %s authorized callers: %w", lb, err) } - ops = append(ops, removeAuthReport.Output) + ops = appendWrite(ops, removeAuthReport.Output) } if input.SetPoolConfig != nil { @@ -443,30 +423,26 @@ func migrateSiloedPool( func appendSetRebalancerAndWithdraw( b cldf_ops.Bundle, evmChain evm.Chain, - chainSel uint64, - oldPoolAddr, timelockAddr common.Address, + oldLRTP lrtp161bind.LockReleaseTokenPoolInterface, + timelockAddr common.Address, amount *big.Int, ops []evm_contract.WriteOutput, ) ([]evm_contract.WriteOutput, error) { - setRebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.SetRebalancer, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: timelockAddr, + setRebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.NewWriteSetRebalancer(oldLRTP), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: timelockAddr, }) if err != nil { - return nil, fmt.Errorf("failed to set rebalancer on old pool %s: %w", oldPoolAddr, err) + return nil, fmt.Errorf("failed to set rebalancer on old pool: %w", err) } - ops = append(ops, setRebalancerReport.Output) + ops = appendWrite(ops, setRebalancerReport.Output) - withdrawReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.WithdrawLiquidity, evmChain, evm_contract.FunctionInput[*big.Int]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: amount, + withdrawReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.NewWriteWithdrawLiquidity(oldLRTP), evmChain, ops2contract.FunctionInput[*big.Int]{ + Args: amount, }) if err != nil { - return nil, fmt.Errorf("failed to withdraw liquidity from old pool %s: %w", oldPoolAddr, err) + return nil, fmt.Errorf("failed to withdraw liquidity from old pool: %w", err) } - ops = append(ops, withdrawReport.Output) + ops = appendWrite(ops, withdrawReport.Output) return ops, nil } @@ -480,10 +456,15 @@ func appendAuthApproveDeposit( remoteChainSelector uint64, ops []evm_contract.WriteOutput, ) ([]evm_contract.WriteOutput, error) { - addAuthReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.ApplyAuthorizedCallerUpdates, evmChain, evm_contract.FunctionInput[lockbox_ops.AuthorizedCallerArgs]{ - ChainSelector: chainSel, - Address: lockboxAddr, - Args: lockbox_ops.AuthorizedCallerArgs{ + // Fresh reporter per lockbox: identical authorized-caller/deposit args must not be deduped across lockboxes. + b = cldf_ops.NewBundle(b.GetContext, b.Logger, cldf_ops.NewMemoryReporter()) + + lockBox, err := bindLockBox(lockboxAddr, evmChain) + if err != nil { + return nil, err + } + addAuthReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.NewWriteApplyAuthorizedCallerUpdates(lockBox), evmChain, ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{timelockAddr}, RemovedCallers: []common.Address{}, }, @@ -491,11 +472,13 @@ func appendAuthApproveDeposit( if err != nil { return nil, fmt.Errorf("failed to add timelock as authorized caller on lockbox %s: %w", lockboxAddr, err) } - ops = append(ops, addAuthReport.Output) + ops = appendWrite(ops, addAuthReport.Output) - approveReport, err := cldf_ops.ExecuteOperation(b, erc20_ops.Approve, evmChain, evm_contract.FunctionInput[erc20_ops.ApproveArgs]{ - ChainSelector: chainSel, - Address: tokenAddr, + token, err := bindCrossChainToken(tokenAddr, evmChain) + if err != nil { + return nil, err + } + approveReport, err := cldf_ops.ExecuteOperation(b, erc20_ops.NewWriteApprove(token), evmChain, ops2contract.FunctionInput[erc20_ops.ApproveArgs]{ Args: erc20_ops.ApproveArgs{ Spender: lockboxAddr, Value: amount, @@ -504,11 +487,9 @@ func appendAuthApproveDeposit( if err != nil { return nil, fmt.Errorf("failed to approve lockbox %s to spend tokens: %w", lockboxAddr, err) } - ops = append(ops, approveReport.Output) + ops = appendWrite(ops, approveReport.Output) - depositReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.Deposit, evmChain, evm_contract.FunctionInput[lockbox_ops.DepositArgs]{ - ChainSelector: chainSel, - Address: lockboxAddr, + depositReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.NewWriteDeposit(lockBox), evmChain, ops2contract.FunctionInput[lockbox_ops.DepositArgs]{ Args: lockbox_ops.DepositArgs{ Token: tokenAddr, RemoteChainSelector: remoteChainSelector, @@ -518,7 +499,7 @@ func appendAuthApproveDeposit( if err != nil { return nil, fmt.Errorf("failed to deposit into lockbox %s: %w", lockboxAddr, err) } - ops = append(ops, depositReport.Output) + ops = appendWrite(ops, depositReport.Output) return ops, nil } @@ -526,14 +507,17 @@ func appendAuthApproveDeposit( func appendCleanup( b cldf_ops.Bundle, evmChain evm.Chain, - chainSel uint64, - lockboxAddr, oldPoolAddr, timelockAddr, originalRebalancer common.Address, + lockboxAddr common.Address, + oldLRTP lrtp161bind.LockReleaseTokenPoolInterface, + timelockAddr, originalRebalancer common.Address, ops []evm_contract.WriteOutput, ) ([]evm_contract.WriteOutput, error) { - removeAuthReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.ApplyAuthorizedCallerUpdates, evmChain, evm_contract.FunctionInput[lockbox_ops.AuthorizedCallerArgs]{ - ChainSelector: chainSel, - Address: lockboxAddr, - Args: lockbox_ops.AuthorizedCallerArgs{ + lockBox, err := bindLockBox(lockboxAddr, evmChain) + if err != nil { + return nil, err + } + removeAuthReport, err := cldf_ops.ExecuteOperation(b, lockbox_ops.NewWriteApplyAuthorizedCallerUpdates(lockBox), evmChain, ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{}, RemovedCallers: []common.Address{timelockAddr}, }, @@ -541,17 +525,15 @@ func appendCleanup( if err != nil { return nil, fmt.Errorf("failed to remove timelock as authorized caller on lockbox %s: %w", lockboxAddr, err) } - ops = append(ops, removeAuthReport.Output) + ops = appendWrite(ops, removeAuthReport.Output) - restoreRebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.SetRebalancer, evmChain, evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: oldPoolAddr, - Args: originalRebalancer, + restoreRebalancerReport, err := cldf_ops.ExecuteOperation(b, lrtp_ops_v161.NewWriteSetRebalancer(oldLRTP), evmChain, ops2contract.FunctionInput[common.Address]{ + Args: originalRebalancer, }) if err != nil { - return nil, fmt.Errorf("failed to restore rebalancer on old pool %s: %w", oldPoolAddr, err) + return nil, fmt.Errorf("failed to restore rebalancer on old pool: %w", err) } - ops = append(ops, restoreRebalancerReport.Output) + ops = appendWrite(ops, restoreRebalancerReport.Output) return ops, nil } diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity_test.go b/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity_test.go index c8e40df813..eddae528ca 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity_test.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/migrate_lock_release_pool_liquidity_test.go @@ -12,12 +12,18 @@ import ( "github.com/stretchr/testify/require" evm_contract "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/operations/contract" + cldfevm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + cctbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cross_chain_token" + lrtp161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/lock_release_token_pool" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_0_0/operations/rmn_proxy" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_2_0/operations/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/burn_mint_erc20_with_drip" tar "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_5_0/operations/token_admin_registry" old_lrtp "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/lock_release_token_pool" old_siloed "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v1_6_1/operations/siloed_lock_release_token_pool" + siloed161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/siloed_lock_release_token_pool" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" @@ -35,6 +41,33 @@ import ( tokens_core "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" ) +func readTokenBalance(t *testing.T, b operations.Bundle, chain cldfevm.Chain, tokenAddr, account common.Address) *big.Int { + t.Helper() + token, err := cctbind.NewCrossChainToken(tokenAddr, chain.Client) + require.NoError(t, err) + report, err := operations.ExecuteOperation(b, erc20.NewReadBalanceOf(token), chain, ops2contract.FunctionInput[common.Address]{Args: account}) + require.NoError(t, err) + return report.Output +} + +func readOldPoolRebalancer(t *testing.T, b operations.Bundle, chain cldfevm.Chain, oldPoolAddr common.Address) common.Address { + t.Helper() + oldPool, err := lrtp161bind.NewLockReleaseTokenPool(oldPoolAddr, chain.Client) + require.NoError(t, err) + report, err := operations.ExecuteOperation(b, old_lrtp.NewReadGetRebalancer(oldPool), chain, ops2contract.FunctionInput[struct{}]{}) + require.NoError(t, err) + return report.Output +} + +func readLockBoxAuthorizedCallers(t *testing.T, b operations.Bundle, chain cldfevm.Chain, lockBoxAddr common.Address) []common.Address { + t.Helper() + lockBox, err := lockboxbind.NewERC20LockBox(lockBoxAddr, chain.Client) + require.NoError(t, err) + report, err := operations.ExecuteOperation(b, erc20_lock_box.NewReadGetAllAuthorizedCallers(lockBox), chain, ops2contract.FunctionInput[struct{}]{}) + require.NoError(t, err) + return report.Output +} + func TestMigrateLockReleasePoolLiquidity_Validation(t *testing.T) { chainSel := uint64(5009297550715157269) e, err := environment.New(t.Context(), @@ -225,8 +258,7 @@ func setupMigrationTest(t *testing.T, chainSel uint64, liquidityAmount *big.Int) e.OperationsBundle, old_lrtp.Deploy, chain, - evm_contract.DeployInput[old_lrtp.ConstructorArgs]{ - ChainSelector: chainSel, + ops2contract.DeployInput[old_lrtp.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(old_lrtp.ContractType, *old_lrtp.Version), Args: old_lrtp.ConstructorArgs{ Token: tokenAddr, @@ -291,18 +323,8 @@ func setupMigrationTest(t *testing.T, chainSel uint64, liquidityAmount *big.Int) require.NoError(t, err) // Verify old pool holds the minted tokens - balReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(e.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: tokenAddr, - Args: oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, liquidityAmount.Cmp(balReport.Output), "Old pool should hold the minted tokens") + bal := readTokenBalance(t, testsetup.BundleWithFreshReporter(e.OperationsBundle), chain, tokenAddr, oldPoolAddr) + require.Equal(t, 0, liquidityAmount.Cmp(bal), "Old pool should hold the minted tokens") return migrationTestSetup{ env: e, @@ -342,58 +364,20 @@ func TestMigrateLockReleasePoolLiquidity_UnsiloedPartialBasisPoints(t *testing.T ) expectedRemaining := new(big.Int).Sub(totalLiquidity, expectedMigrated) - oldPoolBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, expectedRemaining.Cmp(oldPoolBal.Output), "Old pool should retain 20%% of liquidity") + oldPoolBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.oldPoolAddr) + require.Equal(t, 0, expectedRemaining.Cmp(oldPoolBal), "Old pool should retain 20%% of liquidity") - lockboxBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.lockBoxAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, expectedMigrated.Cmp(lockboxBal.Output), "Lockbox should hold 80%% of liquidity") + lockboxBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, expectedMigrated.Cmp(lockboxBal), "Lockbox should hold 80%% of liquidity") // Verify rebalancer was restored to original (zero address, since we didn't set one) - rebalancerReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - old_lrtp.GetRebalancer, - chain, - evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: s.oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, common.Address{}, rebalancerReport.Output, + rebalancer := readOldPoolRebalancer(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.oldPoolAddr) + require.Equal(t, common.Address{}, rebalancer, "Rebalancer should be restored to original value (zero address)") // Verify timelock was removed from lockbox authorized callers - authCallersReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20_lock_box.GetAllAuthorizedCallers, - chain, - evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: s.lockBoxAddr, - }, - ) - require.NoError(t, err) - require.NotContains(t, authCallersReport.Output, s.deployer, + authCallers := readLockBoxAuthorizedCallers(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.lockBoxAddr) + require.NotContains(t, authCallers, s.deployer, "Timelock should be removed from lockbox authorized callers after migration") } @@ -418,31 +402,11 @@ func TestMigrateLockReleasePoolLiquidity_UnsiloedFullBasisPoints(t *testing.T) { ) require.NoError(t, err) - oldPoolBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal.Output), "Old pool should be fully drained") + oldPoolBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.oldPoolAddr) + require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal), "Old pool should be fully drained") - lockboxBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.lockBoxAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal.Output), "Lockbox should hold all liquidity") + lockboxBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal), "Lockbox should hold all liquidity") } func TestMigrateLockReleasePoolLiquidity_ExactAmount(t *testing.T) { @@ -468,31 +432,11 @@ func TestMigrateLockReleasePoolLiquidity_ExactAmount(t *testing.T) { expectedRemaining := new(big.Int).Sub(totalLiquidity, exactAmount) - oldPoolBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, expectedRemaining.Cmp(oldPoolBal.Output), "Old pool should retain remaining tokens") + oldPoolBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.oldPoolAddr) + require.Equal(t, 0, expectedRemaining.Cmp(oldPoolBal), "Old pool should retain remaining tokens") - lockboxBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - erc20.BalanceOf, - chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.tokenAddr, - Args: s.lockBoxAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, 0, exactAmount.Cmp(lockboxBal.Output), "Lockbox should hold the exact migrated amount") + lockboxBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, exactAmount.Cmp(lockboxBal), "Lockbox should hold the exact migrated amount") } func TestMigrateLockReleasePoolLiquidity_RebalancerRestore(t *testing.T) { @@ -503,15 +447,13 @@ func TestMigrateLockReleasePoolLiquidity_RebalancerRestore(t *testing.T) { // Set a non-zero original rebalancer before migration originalRebalancer := common.HexToAddress("0x1111111111111111111111111111111111111111") - _, err := operations.ExecuteOperation( + oldPool, err := lrtp161bind.NewLockReleaseTokenPool(s.oldPoolAddr, chain.Client) + require.NoError(t, err) + _, err = operations.ExecuteOperation( s.env.OperationsBundle, - old_lrtp.SetRebalancer, + old_lrtp.NewWriteSetRebalancer(oldPool), chain, - evm_contract.FunctionInput[common.Address]{ - ChainSelector: chainSel, - Address: s.oldPoolAddr, - Args: originalRebalancer, - }, + ops2contract.FunctionInput[common.Address]{Args: originalRebalancer}, ) require.NoError(t, err) @@ -533,17 +475,8 @@ func TestMigrateLockReleasePoolLiquidity_RebalancerRestore(t *testing.T) { ) require.NoError(t, err) - rebalancerReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), - old_lrtp.GetRebalancer, - chain, - evm_contract.FunctionInput[struct{}]{ - ChainSelector: chainSel, - Address: s.oldPoolAddr, - }, - ) - require.NoError(t, err) - require.Equal(t, originalRebalancer, rebalancerReport.Output, + rebalancer := readOldPoolRebalancer(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.oldPoolAddr) + require.Equal(t, originalRebalancer, rebalancer, "Rebalancer should be restored to the original non-zero address") } @@ -643,8 +576,7 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { // Deploy old v1.6.1 siloed pool oldPoolReport, err := operations.ExecuteOperation( e.OperationsBundle, old_siloed.Deploy, chain, - evm_contract.DeployInput[old_siloed.ConstructorArgs]{ - ChainSelector: chainSel, + ops2contract.DeployInput[old_siloed.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(old_siloed.ContractType, *old_siloed.Version), Args: old_siloed.ConstructorArgs{ Token: tokenAddr, LocalTokenDecimals: 18, @@ -656,7 +588,7 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { oldPoolAddr := common.HexToAddress(oldPoolReport.Output.Address) // Configure chains on old pool via bound contract - parsed, err := abi.JSON(strings.NewReader(old_siloed.SiloedLockReleaseTokenPoolABI)) + parsed, err := abi.JSON(strings.NewReader(siloed161bind.SiloedLockReleaseTokenPoolMetaData.ABI)) require.NoError(t, err) oldPoolBound := bind.NewBoundContract(oldPoolAddr, parsed, chain.Client, chain.Client, chain.Client) @@ -698,8 +630,10 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { require.NoError(t, err) // Set deployer as the unsiloed rebalancer (for provideLiquidity) - _, err = operations.ExecuteOperation(e.OperationsBundle, old_siloed.SetRebalancer, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: oldPoolAddr, Args: deployer}) + oldSiloedPool, err := siloed161bind.NewSiloedLockReleaseTokenPool(oldPoolAddr, chain.Client) + require.NoError(t, err) + _, err = operations.ExecuteOperation(e.OperationsBundle, old_siloed.NewWriteSetRebalancer(oldSiloedPool), chain, + ops2contract.FunctionInput[common.Address]{Args: deployer}) require.NoError(t, err) // Mint tokens to deployer, approve old pool, then provide siloed + unsiloed liquidity @@ -714,9 +648,10 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { }) require.NoError(t, err) - _, err = operations.ExecuteOperation(e.OperationsBundle, erc20.Approve, chain, - evm_contract.FunctionInput[erc20.ApproveArgs]{ - ChainSelector: chainSel, Address: tokenAddr, + tokenContract, err := cctbind.NewCrossChainToken(tokenAddr, chain.Client) + require.NoError(t, err) + _, err = operations.ExecuteOperation(e.OperationsBundle, erc20.NewWriteApprove(tokenContract), chain, + ops2contract.FunctionInput[erc20.ApproveArgs]{ Args: erc20.ApproveArgs{Spender: oldPoolAddr, Value: totalMint}, }) require.NoError(t, err) @@ -768,8 +703,7 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { // Deploy per-chain lockboxes lockbox1Report, err := operations.ExecuteOperation(e.OperationsBundle, erc20_lock_box.Deploy, chain, - evm_contract.DeployInput[erc20_lock_box.ConstructorArgs]{ - ChainSelector: chainSel, + ops2contract.DeployInput[erc20_lock_box.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(erc20_lock_box.ContractType, *erc20_lock_box.Version), Args: erc20_lock_box.ConstructorArgs{Token: tokenAddr}, Qualifier: strPtr("chain1"), @@ -778,8 +712,7 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { lockbox1Addr := common.HexToAddress(lockbox1Report.Output.Address) lockbox2Report, err := operations.ExecuteOperation(e.OperationsBundle, erc20_lock_box.Deploy, chain, - evm_contract.DeployInput[erc20_lock_box.ConstructorArgs]{ - ChainSelector: chainSel, + ops2contract.DeployInput[erc20_lock_box.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(erc20_lock_box.ContractType, *erc20_lock_box.Version), Args: erc20_lock_box.ConstructorArgs{Token: tokenAddr}, Qualifier: strPtr("chain2"), @@ -814,28 +747,19 @@ func TestMigrateLockReleasePoolLiquidity_SiloedPool(t *testing.T) { require.NoError(t, err) // Verify old pool is drained - oldPoolBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(e.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: tokenAddr, Args: oldPoolAddr}) - require.NoError(t, err) - require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal.Output), "Old siloed pool should be fully drained") + oldPoolBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(e.OperationsBundle), chain, tokenAddr, oldPoolAddr) + require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal), "Old siloed pool should be fully drained") // Verify lockbox1 received silo1 amount - lb1Bal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(e.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: tokenAddr, Args: lockbox1Addr}) - require.NoError(t, err) - require.True(t, lb1Bal.Output.Sign() > 0, "Lockbox 1 should have received tokens") + lb1Bal := readTokenBalance(t, testsetup.BundleWithFreshReporter(e.OperationsBundle), chain, tokenAddr, lockbox1Addr) + require.True(t, lb1Bal.Sign() > 0, "Lockbox 1 should have received tokens") // Verify lockbox2 received silo2 amount - lb2Bal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(e.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: tokenAddr, Args: lockbox2Addr}) - require.NoError(t, err) - require.True(t, lb2Bal.Output.Sign() > 0, "Lockbox 2 should have received tokens") + lb2Bal := readTokenBalance(t, testsetup.BundleWithFreshReporter(e.OperationsBundle), chain, tokenAddr, lockbox2Addr) + require.True(t, lb2Bal.Sign() > 0, "Lockbox 2 should have received tokens") // Total across both lockboxes should equal total minted - totalInLockboxes := new(big.Int).Add(lb1Bal.Output, lb2Bal.Output) + totalInLockboxes := new(big.Int).Add(lb1Bal, lb2Bal) require.Equal(t, 0, totalMint.Cmp(totalInLockboxes), "Total lockbox balances should equal total original liquidity") } @@ -905,11 +829,8 @@ func TestMigrateLockReleasePoolLiquidity_WithSetPoolConfig(t *testing.T) { "TokenAdminRegistry should point to the new pool after migration") // Verify liquidity was also migrated - lockboxBal, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: s.tokenAddr, Args: s.lockBoxAddr}) - require.NoError(t, err) - require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal.Output), "Lockbox should hold all liquidity") + lockboxBal := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal), "Lockbox should hold all liquidity") } func TestMigrateLockReleasePoolLiquidity_AuthorizedCallerCleanup(t *testing.T) { @@ -920,11 +841,12 @@ func TestMigrateLockReleasePoolLiquidity_AuthorizedCallerCleanup(t *testing.T) { // Add a pre-existing authorized caller to the lockbox before migration preExistingCaller := common.HexToAddress("0x1234567890123456789012345678901234567890") - _, err := operations.ExecuteOperation( - s.env.OperationsBundle, erc20_lock_box.ApplyAuthorizedCallerUpdates, chain, - evm_contract.FunctionInput[erc20_lock_box.AuthorizedCallerArgs]{ - ChainSelector: chainSel, Address: s.lockBoxAddr, - Args: erc20_lock_box.AuthorizedCallerArgs{ + lockBox, err := lockboxbind.NewERC20LockBox(s.lockBoxAddr, chain.Client) + require.NoError(t, err) + _, err = operations.ExecuteOperation( + s.env.OperationsBundle, erc20_lock_box.NewWriteApplyAuthorizedCallerUpdates(lockBox), chain, + ops2contract.FunctionInput[lockboxbind.AuthorizedCallersAuthorizedCallerArgs]{ + Args: lockboxbind.AuthorizedCallersAuthorizedCallerArgs{ AddedCallers: []common.Address{preExistingCaller}, RemovedCallers: []common.Address{}, }, @@ -932,11 +854,8 @@ func TestMigrateLockReleasePoolLiquidity_AuthorizedCallerCleanup(t *testing.T) { require.NoError(t, err) // Verify pre-existing caller is present before migration - preCallersReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20_lock_box.GetAllAuthorizedCallers, chain, - evm_contract.FunctionInput[struct{}]{ChainSelector: chainSel, Address: s.lockBoxAddr}) - require.NoError(t, err) - require.Contains(t, preCallersReport.Output, preExistingCaller, + preCallers := readLockBoxAuthorizedCallers(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.lockBoxAddr) + require.Contains(t, preCallers, preExistingCaller, "Pre-existing caller should be present before migration") // Run migration @@ -956,15 +875,12 @@ func TestMigrateLockReleasePoolLiquidity_AuthorizedCallerCleanup(t *testing.T) { require.NoError(t, err) // Verify pre-existing caller is still present after migration - postCallersReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20_lock_box.GetAllAuthorizedCallers, chain, - evm_contract.FunctionInput[struct{}]{ChainSelector: chainSel, Address: s.lockBoxAddr}) - require.NoError(t, err) - require.Contains(t, postCallersReport.Output, preExistingCaller, + postCallers := readLockBoxAuthorizedCallers(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.lockBoxAddr) + require.Contains(t, postCallers, preExistingCaller, "Pre-existing authorized caller should be preserved after migration") // Verify timelock (deployer) was removed from authorized callers - require.NotContains(t, postCallersReport.Output, s.deployer, + require.NotContains(t, postCallers, s.deployer, "Timelock should be removed from lockbox authorized callers after migration") } @@ -991,17 +907,11 @@ func TestMigrateLockReleasePoolLiquidity_MultiplePartialMigrations(t *testing.T) require.NoError(t, err) // Verify 50% migrated - oldPoolBal1, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: s.tokenAddr, Args: s.oldPoolAddr}) - require.NoError(t, err) - require.Equal(t, 0, big.NewInt(5000).Cmp(oldPoolBal1.Output), "Old pool should retain 50%% after first migration") + oldPoolBal1 := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.oldPoolAddr) + require.Equal(t, 0, big.NewInt(5000).Cmp(oldPoolBal1), "Old pool should retain 50%% after first migration") - lockboxBal1, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: s.tokenAddr, Args: s.lockBoxAddr}) - require.NoError(t, err) - require.Equal(t, 0, big.NewInt(5000).Cmp(lockboxBal1.Output), "Lockbox should hold 50%% after first migration") + lockboxBal1 := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, big.NewInt(5000).Cmp(lockboxBal1), "Lockbox should hold 50%% after first migration") // Step 2: Migrate 100% of remaining basisPoints = uint16(10000) @@ -1020,24 +930,15 @@ func TestMigrateLockReleasePoolLiquidity_MultiplePartialMigrations(t *testing.T) require.NoError(t, err) // Verify all liquidity migrated - oldPoolBal2, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: s.tokenAddr, Args: s.oldPoolAddr}) - require.NoError(t, err) - require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal2.Output), "Old pool should be fully drained after second migration") + oldPoolBal2 := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.oldPoolAddr) + require.Equal(t, 0, big.NewInt(0).Cmp(oldPoolBal2), "Old pool should be fully drained after second migration") - lockboxBal2, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), erc20.BalanceOf, chain, - evm_contract.FunctionInput[common.Address]{ChainSelector: chainSel, Address: s.tokenAddr, Args: s.lockBoxAddr}) - require.NoError(t, err) - require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal2.Output), "Lockbox should hold all liquidity after second migration") + lockboxBal2 := readTokenBalance(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.tokenAddr, s.lockBoxAddr) + require.Equal(t, 0, totalLiquidity.Cmp(lockboxBal2), "Lockbox should hold all liquidity after second migration") // Verify rebalancer is restored (should be zero address since none was set) - rebalancerReport, err := operations.ExecuteOperation( - testsetup.BundleWithFreshReporter(s.env.OperationsBundle), old_lrtp.GetRebalancer, chain, - evm_contract.FunctionInput[struct{}]{ChainSelector: chainSel, Address: s.oldPoolAddr}) - require.NoError(t, err) - require.Equal(t, common.Address{}, rebalancerReport.Output, + rebalancer := readOldPoolRebalancer(t, testsetup.BundleWithFreshReporter(s.env.OperationsBundle), chain, s.oldPoolAddr) + require.Equal(t, common.Address{}, rebalancer, "Rebalancer should be restored after both migrations") } diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/ops2helpers.go b/chains/evm/deployment/v2_0_0/sequences/tokens/ops2helpers.go new file mode 100644 index 0000000000..3057ed2397 --- /dev/null +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/ops2helpers.go @@ -0,0 +1,115 @@ +package tokens + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + evm_contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" + + lrtp161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/lock_release_token_pool" + siloed161bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/siloed_lock_release_token_pool" + aphbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/advanced_pool_hooks" + cctbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/cross_chain_token" + lockboxbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/erc20_lock_box" + lrtp170bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/lock_release_token_pool" + siloed170bind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/siloed_lock_release_token_pool" + tpbinding "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/token_pool" +) + +func appendWrite(ops []evm_contract.WriteOutput, w ops2contract.WriteOutput) []evm_contract.WriteOutput { + return append(ops, writeOutputOps2ToLegacy(w)) +} + +func bindCrossChainToken(addr common.Address, chain evm.Chain) (cctbind.CrossChainTokenInterface, error) { + c, err := cctbind.NewCrossChainToken(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind CrossChainToken at %s: %w", addr.Hex(), err) + } + return c, nil +} + +func bindLRTP170(addr common.Address, chain evm.Chain) (lrtp170bind.LockReleaseTokenPoolInterface, error) { + p, err := lrtp170bind.NewLockReleaseTokenPool(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind LockReleaseTokenPool v2 at %s: %w", addr.Hex(), err) + } + return p, nil +} + +func bindLRTP161(addr common.Address, chain evm.Chain) (lrtp161bind.LockReleaseTokenPoolInterface, error) { + p, err := lrtp161bind.NewLockReleaseTokenPool(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind LockReleaseTokenPool v1.6.1 at %s: %w", addr.Hex(), err) + } + return p, nil +} + +func bindSiloedLRTP161(addr common.Address, chain evm.Chain) (siloed161bind.SiloedLockReleaseTokenPoolInterface, error) { + p, err := siloed161bind.NewSiloedLockReleaseTokenPool(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind SiloedLockReleaseTokenPool v1.6.1 at %s: %w", addr.Hex(), err) + } + return p, nil +} + +func bindSiloedLRTP170(addr common.Address, chain evm.Chain) (siloed170bind.SiloedLockReleaseTokenPoolInterface, error) { + p, err := siloed170bind.NewSiloedLockReleaseTokenPool(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind SiloedLockReleaseTokenPool v2 at %s: %w", addr.Hex(), err) + } + return p, nil +} + +func bindLockBox(addr common.Address, chain evm.Chain) (lockboxbind.ERC20LockBoxInterface, error) { + lb, err := lockboxbind.NewERC20LockBox(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind ERC20LockBox at %s: %w", addr.Hex(), err) + } + return lb, nil +} + +func writeOutputOps2ToLegacy(w ops2contract.WriteOutput) evm_contract.WriteOutput { + return WriteOutputOps2ToLegacy(w) +} + +// WriteOutputOps2ToLegacy converts ops2 write output to the legacy contract batch format. +func WriteOutputOps2ToLegacy(w ops2contract.WriteOutput) evm_contract.WriteOutput { + var ei *evm_contract.ExecInfo + if w.ExecInfo != nil { + ei = &evm_contract.ExecInfo{Hash: w.ExecInfo.Hash} + } + return evm_contract.WriteOutput{ + ChainSelector: w.ChainSelector, + Tx: w.Tx, + ExecInfo: ei, + } +} + +func bindTokenPool(addr common.Address, chain evm.Chain) (tpbinding.TokenPoolInterface, error) { + return BindTokenPool(addr, chain) +} + +// BindTokenPool binds a v2.0 TokenPool at the given address. +func BindTokenPool(addr common.Address, chain evm.Chain) (tpbinding.TokenPoolInterface, error) { + tp, err := tpbinding.NewTokenPool(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind TokenPool at %s: %w", addr.Hex(), err) + } + return tp, nil +} + +func bindAdvancedPoolHooks(addr common.Address, chain evm.Chain) (aphbind.AdvancedPoolHooksInterface, error) { + return BindAdvancedPoolHooks(addr, chain) +} + +// BindAdvancedPoolHooks binds AdvancedPoolHooks at the given address. +func BindAdvancedPoolHooks(addr common.Address, chain evm.Chain) (aphbind.AdvancedPoolHooksInterface, error) { + aph, err := aphbind.NewAdvancedPoolHooks(addr, chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to bind AdvancedPoolHooks at %s: %w", addr.Hex(), err) + } + return aph, nil +} diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/set_allowed_finality_config_for_token_pools.go b/chains/evm/deployment/v2_0_0/sequences/tokens/set_allowed_finality_config_for_token_pools.go index 244a2e89de..fd81b3e88a 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/set_allowed_finality_config_for_token_pools.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/set_allowed_finality_config_for_token_pools.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" @@ -41,19 +42,22 @@ var SetAllowedFinalityConfigForTokenPools = operations.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("pool address cannot be the zero address for src %d", src) } + tp, err := bindTokenPool(addr, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + report, err := operations.ExecuteOperation( - b, token_pool.SetAllowedFinalityConfig, chain, - contract.FunctionInput[[4]byte]{ - ChainSelector: src, - Address: addr, - Args: finalityConfig.Raw(), + b, token_pool.NewWriteSetAllowedFinalityConfig(tp), chain, + ops2contract.FunctionInput[[4]byte]{ + Args: finalityConfig.Raw(), }, ) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute token_pool.SetAllowedFinalityConfig for pool %s on src %d: %w", pool, src, err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToLegacy(report.Output)) } batch, err := contract.NewBatchOperationFromWrites(writes) diff --git a/chains/evm/deployment/v2_0_0/sequences/tokens/set_token_transfer_fee_config_for_token_pools.go b/chains/evm/deployment/v2_0_0/sequences/tokens/set_token_transfer_fee_config_for_token_pools.go index d25f4a5455..ff25051737 100644 --- a/chains/evm/deployment/v2_0_0/sequences/tokens/set_token_transfer_fee_config_for_token_pools.go +++ b/chains/evm/deployment/v2_0_0/sequences/tokens/set_token_transfer_fee_config_for_token_pools.go @@ -6,10 +6,12 @@ import ( "github.com/ethereum/go-ethereum/common" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations/contract" + ops2contract "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/operations2/contract" "github.com/smartcontractkit/chainlink-deployments-framework/operations" mcms_types "github.com/smartcontractkit/mcms/types" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/token_pool" + tpbinding "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/token_pool" "github.com/smartcontractkit/chainlink-ccip/deployment/tokens" "github.com/smartcontractkit/chainlink-ccip/deployment/utils" "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences" @@ -37,9 +39,14 @@ var SetTokenTransferFeeConfigForTokenPools = operations.NewSequence( return sequences.OnChainOutput{}, fmt.Errorf("pool address cannot be the zero address for src %d", src) } + tp, err := bindTokenPool(addr, chain) + if err != nil { + return sequences.OnChainOutput{}, err + } + args := token_pool.ApplyTokenTransferFeeConfigUpdatesArgs{ DisableTokenTransferFeeConfigs: []uint64{}, - TokenTransferFeeConfigArgs: []token_pool.TokenTransferFeeConfigArgs{}, + TokenTransferFeeConfigArgs: []tpbinding.TokenPoolTokenTransferFeeConfigArgs{}, } for dst, fee := range cfg { @@ -48,9 +55,9 @@ var SetTokenTransferFeeConfigForTokenPools = operations.NewSequence( } else { args.TokenTransferFeeConfigArgs = append( args.TokenTransferFeeConfigArgs, - token_pool.TokenTransferFeeConfigArgs{ + tpbinding.TokenPoolTokenTransferFeeConfigArgs{ DestChainSelector: dst, - TokenTransferFeeConfig: token_pool.TokenTransferFeeConfig{ + TokenTransferFeeConfig: tpbinding.IPoolV2TokenTransferFeeConfig{ FinalityTransferFeeBps: fee.DefaultFinalityTransferFeeBps, FastFinalityTransferFeeBps: fee.CustomFinalityTransferFeeBps, FinalityFeeUSDCents: fee.DefaultFinalityFeeUSDCents, @@ -66,18 +73,16 @@ var SetTokenTransferFeeConfigForTokenPools = operations.NewSequence( if len(args.DisableTokenTransferFeeConfigs) > 0 || len(args.TokenTransferFeeConfigArgs) > 0 { report, err := operations.ExecuteOperation( - b, token_pool.ApplyTokenTransferFeeConfigUpdates, chain, - contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ - ChainSelector: src, - Address: addr, - Args: args, + b, token_pool.NewWriteApplyTokenTransferFeeConfigUpdates(tp), chain, + ops2contract.FunctionInput[token_pool.ApplyTokenTransferFeeConfigUpdatesArgs]{ + Args: args, }, ) if err != nil { return sequences.OnChainOutput{}, fmt.Errorf("failed to execute token_pool.ApplyTokenTransferFeeConfigUpdates on %s: %w", chain.String(), err) } - writes = append(writes, report.Output) + writes = append(writes, writeOutputOps2ToLegacy(report.Output)) } } diff --git a/chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go b/chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go index 5b37ab99f7..d7ac437471 100644 --- a/chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go +++ b/chains/evm/deployment/v2_0_0/testadapter/test_adapter_test.go @@ -112,7 +112,8 @@ func boolPtr(v bool) *bool { return &v } func deployLaneContracts(t *testing.T, env *deployment.Environment, chain cldf_evm.Chain, chainSelector uint64) laneContracts { t.Helper() - create2FactoryRef, err := contract.MaybeDeployContract(env.OperationsBundle, create2_factory.Deploy, chain, contract.DeployInput[create2_factory.ConstructorArgs]{ + bundle := testsetup.BundleWithFreshReporter(env.OperationsBundle) + create2FactoryRef, err := contract.MaybeDeployContract(bundle, create2_factory.Deploy, chain, contract.DeployInput[create2_factory.ConstructorArgs]{ TypeAndVersion: deployment.NewTypeAndVersion(create2_factory.ContractType, *semver.MustParse("2.0.0")), ChainSelector: chainSelector, Args: create2_factory.ConstructorArgs{ @@ -122,7 +123,7 @@ func deployLaneContracts(t *testing.T, env *deployment.Environment, chain cldf_e require.NoError(t, err) deploymentReport, err := operations.ExecuteSequence( - env.OperationsBundle, + bundle, sequences.DeployChainContracts, chain, sequences.DeployChainContractsInput{ diff --git a/chains/evm/deployment/v2_0_0/testsetup/testsetup.go b/chains/evm/deployment/v2_0_0/testsetup/testsetup.go index 6c470df567..8ec17c4c08 100644 --- a/chains/evm/deployment/v2_0_0/testsetup/testsetup.go +++ b/chains/evm/deployment/v2_0_0/testsetup/testsetup.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/mock_receiver" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/onramp" + execbind "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v2_0_0/executor" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/operations/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/v2_0_0/sequences" @@ -158,7 +159,7 @@ func CreateBasicContractParams() sequences.ContractParams { { Version: executor.Version, MaxCCVsPerMsg: 10, - DynamicConfig: executor.DynamicConfig{ + DynamicConfig: execbind.ExecutorDynamicConfig{ FeeAggregator: common.HexToAddress("0x01"), AllowedFinalityConfig: finality.Config{BlockDepth: 1}.Raw(), CcvAllowlistEnabled: false, @@ -168,7 +169,7 @@ func CreateBasicContractParams() sequences.ContractParams { { Version: executor.Version, MaxCCVsPerMsg: 10, - DynamicConfig: executor.DynamicConfig{ + DynamicConfig: execbind.ExecutorDynamicConfig{ FeeAggregator: common.HexToAddress("0x01"), AllowedFinalityConfig: finality.Config{BlockDepth: 1}.Raw(), CcvAllowlistEnabled: false, diff --git a/deployment/lanes/connect_chains.go b/deployment/lanes/connect_chains.go index abfe1392fe..cb2057c2ff 100644 --- a/deployment/lanes/connect_chains.go +++ b/deployment/lanes/connect_chains.go @@ -176,7 +176,7 @@ func makeApply(laneRegistry *LaneAdapterRegistry, mcmsRegistry *changesets.MCMSR {src: chainA, dest: chainB, srcAdapter: chainAAdapter, destAdapter: chainBAdapter}, {src: chainB, dest: chainA, srcAdapter: chainBAdapter, destAdapter: chainAAdapter}, } { - configureLaneReport, err := cldf_ops.ExecuteSequence(e.OperationsBundle, pair.srcAdapter.ConfigureLaneLegAsSource(), e.BlockChains, UpdateLanesInput{ + configureLaneReport, err := cldf_ops.ExecuteSequence(changesets.BundleWithFreshReporter(e.OperationsBundle), pair.srcAdapter.ConfigureLaneLegAsSource(), e.BlockChains, UpdateLanesInput{ Source: pair.src, Dest: pair.dest, IsDisabled: lane.IsDisabled, @@ -198,7 +198,7 @@ func makeApply(laneRegistry *LaneAdapterRegistry, mcmsRegistry *changesets.MCMSR return cldf.ChangesetOutput{}, fmt.Errorf("failed to write metadata to datastore: %w", err) } - configureLaneReport, err = cldf_ops.ExecuteSequence(e.OperationsBundle, pair.destAdapter.ConfigureLaneLegAsDest(), e.BlockChains, UpdateLanesInput{ + configureLaneReport, err = cldf_ops.ExecuteSequence(changesets.BundleWithFreshReporter(e.OperationsBundle), pair.destAdapter.ConfigureLaneLegAsDest(), e.BlockChains, UpdateLanesInput{ Source: pair.src, Dest: pair.dest, IsDisabled: lane.IsDisabled, diff --git a/deployment/utils/changesets/changesets.go b/deployment/utils/changesets/changesets.go index 60fb82249d..42e8d08a36 100644 --- a/deployment/utils/changesets/changesets.go +++ b/deployment/utils/changesets/changesets.go @@ -26,6 +26,13 @@ type WithMCMS[CFG any] struct { Cfg CFG } +// BundleWithFreshReporter returns a bundle that does not share operation reports with b. +// Use when executing the same operation on multiple chains or contracts in one deployment flow, +// so reads and writes are not incorrectly deduplicated across targets. +func BundleWithFreshReporter(b operations.Bundle) operations.Bundle { + return operations.NewBundle(b.GetContext, b.Logger, operations.NewMemoryReporter()) +} + // NewFromOnChainSequence creates a Changeset from an operations.Sequence that deploys contracts on-chain and performs write operations. // It wraps sequence execution with DataStore and MCMS integration. The returned function takes an MCMSReaderRegistry and returns a Changeset. func NewFromOnChainSequence[IN any, DEP any, CFG any](params NewFromOnChainSequenceParams[IN, DEP, CFG]) func(mcmsRegistry *MCMSReaderRegistry) deployment.ChangeSetV2[WithMCMS[CFG]] { diff --git a/deployment/v2_0_0/changesets/deploy_cctp_chains.go b/deployment/v2_0_0/changesets/deploy_cctp_chains.go index 54fad288b1..3747a04403 100644 --- a/deployment/v2_0_0/changesets/deploy_cctp_chains.go +++ b/deployment/v2_0_0/changesets/deploy_cctp_chains.go @@ -152,7 +152,7 @@ func makeApplyDeployCCTPChains(cctpChainRegistry *adapters.CCTPChainRegistry, mc FeeAggregator: chainCfg.FeeAggregator, TokenDecimals: chainCfg.TokenDecimals, } - deployCCTPChainReport, err := cldf_ops.ExecuteSequence(e.OperationsBundle, adaptersByChain[chainSel].DeployCCTPChain(), dep, in) + deployCCTPChainReport, err := cldf_ops.ExecuteSequence(changesets.BundleWithFreshReporter(e.OperationsBundle), adaptersByChain[chainSel].DeployCCTPChain(), dep, in) if err != nil { return cldf.ChangesetOutput{}, fmt.Errorf("failed to deploy CCTP on chain with selector %d: %w", chainSel, err) } @@ -215,7 +215,7 @@ func makeApplyDeployCCTPChains(cctpChainRegistry *adapters.CCTPChainRegistry, mc RemoteRegisteredPoolRefs: remoteRegisteredPoolRefs, RemoteChains: remoteChainConfigs, } - configureCCTPChainForLanesReport, err := cldf_ops.ExecuteSequence(e.OperationsBundle, adaptersByChain[chainSel].ConfigureCCTPChainForLanes(), dep, in) + configureCCTPChainForLanesReport, err := cldf_ops.ExecuteSequence(changesets.BundleWithFreshReporter(e.OperationsBundle), adaptersByChain[chainSel].ConfigureCCTPChainForLanes(), dep, in) if err != nil { return cldf.ChangesetOutput{}, fmt.Errorf("failed to configure CCTP on chain with selector %d: %w", chainSel, err) } diff --git a/deployment/v2_0_0/changesets/deploy_chain_contracts.go b/deployment/v2_0_0/changesets/deploy_chain_contracts.go index 13a1ebf207..31c701d1a7 100644 --- a/deployment/v2_0_0/changesets/deploy_chain_contracts.go +++ b/deployment/v2_0_0/changesets/deploy_chain_contracts.go @@ -188,7 +188,7 @@ func DeployChainContracts(registry *adapters.DeployChainContractsRegistry) deplo "committees", len(committeeVerifiers), ) - report, err := operations.ExecuteSequence(e.OperationsBundle, adapter.DeployChainContracts(), e.BlockChains, input) + report, err := operations.ExecuteSequence(changesets.BundleWithFreshReporter(e.OperationsBundle), adapter.DeployChainContracts(), e.BlockChains, input) if err != nil { return deployment.ChangesetOutput{Reports: allReports}, fmt.Errorf("failed to deploy chain contracts on chain %d: %w", sel, err)