config

package
v0.0.0-...-efbd42f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Method names for wormhole token bridge contract.
	MethodCompleteTransfer     = "completeTransfer"
	MethodWrapAndTransfer      = "wrapAndTransfer"
	MethodTransferTokens       = "transferTokens"
	MethodAttestToken          = "attestToken"
	MethodCompleteAndUnwrapETH = "completeAndUnwrapETH"
	MethodCreateWrapped        = "createWrapped"
	MethodUpdateWrapped        = "updateWrapped"
	MethodUnkown               = "unknown"
	//Method name for wormhole connect wrapped contract.
	MetehodCompleteTransferWithRelay = "completeTransferWithRelay"

	//Method name for wormhole tBTC gateway
	MethodReceiveTbtc = "receiveTbtc"

	//Method ids for wormhole token bridge contract
	MethodIDCompleteTransfer     = "0xc6878519"
	MethodIDWrapAndTransfer      = "0x9981509f"
	MethodIDTransferTokens       = "0x0f5287b0"
	MethodIDAttestToken          = "0xc48fa115"
	MethodIDCompleteAndUnwrapETH = "0xff200cde"
	MethodIDCreateWrapped        = "0xe8059810"
	MethodIDUpdateWrapped        = "0xf768441f"
	//Method id for wormhole connect wrapped contract.
	MetehodIDCompleteTransferWithRelay = "0x2f25e25f"

	//Method id for wormhole tBTC gateway
	MethodIDReceiveTbtc = "0x5d21a596"
)

Variables

View Source
var APTOS_MAINNET = WatcherBlockchain{
	ChainID:      vaa.ChainIDAptos,
	Name:         "aptos",
	Address:      "0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 1094430,
}
View Source
var APTOS_TESTNET = WatcherBlockchain{
	ChainID:      vaa.ChainIDAptos,
	Name:         "aptos",
	Address:      "0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 21522262,
}
View Source
var ARBITRUM_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDArbitrum,
	Name:         "arbitrum",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 75_577_070,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x1293a54e160D1cd7075487898d65266081A15458"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var ARBITRUM_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDArbitrum,
	Name:         "arbitrum_goerli",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 15_470_418,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var AVALANCHE_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDAvalanche,
	Name:         "avalanche",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 8237181,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x0e082F06FF657D94310cB8cE8B0D9a04541d8052"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var AVALANCHE_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDAvalanche,
	Name:         "avalanche_fuji",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 11014526,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x61E44E506Ca5659E6c0bba9b678586fA2d729756"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var BASE_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDBase,
	Name:         "base",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 1_422_314,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x8d2de8d2f73F1F4cAB472AC9A881C9b123C79627"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var BASE_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDBase,
	Name:         "base_goerli",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 902_385,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xA31aa3FDb7aF7Db93d18DDA4e19F811342EDF780"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var BSC_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDBSC,
	Name:         "bsc",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 26436320,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xC891aBa0b42818fb4c975Bf6461033c62BCE75ff"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
	},
}
View Source
var BSC_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDBSC,
	Name:         "bsc_testnet_chapel",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 28071327,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x9dcF9D205C9De35334D646BeE44b2D2859712A09"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var CELO_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDCelo,
	Name:         "celo",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 12947239,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x796Dff6D74F3E27060B71255Fe517BFb23C93eed"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var CELO_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDCelo,
	Name:         "celo",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 10625129,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x05ca6037eC51F8b712eD2E6Fa72219FEaE74E153"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var ETHEREUM_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDEthereum,
	Name:         "eth",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 16820790,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x3ee18B2214AFF97000D974cf647E7C347E8fa585"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var ETHEREUM_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDEthereum,
	Name:         "eth_goerli",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 8660321,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xF890982f9310df57d00f659cf4fd87e65adEd8d7"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var FANTOM_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDFantom,
	Name:         "fantom",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 57525624,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x7C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var FANTOM_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDFantom,
	Name:         "fantom_testnet",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 14524466,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x599CEa2204B4FaECd584Ab1F2b6aCA137a0afbE8"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var MOONBEAM_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDMoonbeam,
	Name:         "moonbeam",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 1853330,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xb1731c586ca89a23809861c6103f0b96b3f57d92"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var MOONBEAM_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDMoonbeam,
	Name:         "moonbeam",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 2097310,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xbc976D4b9D57E57c3cA52e1Fd136C45FF7955A96"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
	},
}
View Source
var OASIS_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDOasis,
	Name:         "oasis",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 1762,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x5848C791e09901b40A9Ef749f2a6735b418d7564"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
	},
}
View Source
var OASIS_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDOasis,
	Name:         "oasis",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 130400,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x88d8004A9BdbfD9D28090A02010C19897a29605c"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
	},
}
View Source
var OPTIMISM_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDOptimism,
	Name:         "optimism",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 89_900_107,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x1293a54e160D1cd7075487898d65266081A15458"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var OPTIMISM_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDOptimism,
	Name:         "optimism_goerli",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 7_973_025,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0xc3D46e0266d95215589DE639cC4E93b79f88fc6C"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var PLANQ_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDPlanq,
	Name:         "planq",
	SizeBlocks:   100,
	WaitSeconds:  5,
	InitialBlock: 6212657,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x4FD8625cfE4B0034642140005b78291D26183df1"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
	},
}
View Source
var POLYGON_MAINNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDPolygon,
	Name:         "polygon",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 40307020,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x5a58505a96D1dbf8dF91cB21B54419FC36e93fdE"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0xcafd2f0a35a4459fa40c0517e17e6fa2939441ca"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
		strings.ToLower("0x09959798B95d00a3183d20FaC298E4594E599eab"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var POLYGON_TESTNET = WatcherBlockchainAddresses{
	ChainID:      vaa.ChainIDPolygon,
	Name:         "polygon_mumbai",
	SizeBlocks:   100,
	WaitSeconds:  10,
	InitialBlock: 33151522,
	MethodsByAddress: map[string][]BlockchainMethod{
		strings.ToLower("0x377D55a7928c046E18eEbb61977e714d2a76472a"): {
			{
				ID:   MethodIDCompleteTransfer,
				Name: MethodCompleteTransfer,
			},
			{
				ID:   MethodIDCompleteAndUnwrapETH,
				Name: MethodCompleteAndUnwrapETH,
			},
			{
				ID:   MethodIDCreateWrapped,
				Name: MethodCreateWrapped,
			},
			{
				ID:   MethodIDUpdateWrapped,
				Name: MethodUpdateWrapped,
			},
		},
		strings.ToLower("0x9563a59C15842a6f322B10f69d1dD88b41f2E97B"): {
			{
				ID:   MetehodIDCompleteTransferWithRelay,
				Name: MetehodCompleteTransferWithRelay,
			},
		},
		strings.ToLower("0xc3D46e0266d95215589DE639cC4E93b79f88fc6C"): {
			{
				ID:   MethodIDReceiveTbtc,
				Name: MethodReceiveTbtc,
			},
		},
	},
}
View Source
var SOLANA_MAINNET = WatcherBlockchain{
	ChainID:      vaa.ChainIDSolana,
	Name:         "solana",
	Address:      "wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb",
	SizeBlocks:   50,
	WaitSeconds:  10,
	InitialBlock: 183675278,
}
View Source
var SOLANA_TESTNET = WatcherBlockchain{
	ChainID:      vaa.ChainIDSolana,
	Name:         "solana",
	Address:      "DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe",
	SizeBlocks:   10,
	WaitSeconds:  10,
	InitialBlock: 16820790,
}
View Source
var TERRA_MAINNET = WatcherBlockchain{
	ChainID:      vaa.ChainIDTerra,
	Name:         "terra",
	Address:      "terra10nmmwe8r3g99a9newtqa7a75xfgs2e8z87r2sf",
	SizeBlocks:   0,
	WaitSeconds:  10,
	InitialBlock: 3911168,
}

Functions

This section is empty.

Types

type BackfillerConfiguration

type BackfillerConfiguration struct {
	LogLevel           string `env:"LOG_LEVEL,default=INFO"`
	MongoURI           string `env:"MONGODB_URI,required"`
	MongoDatabase      string `env:"MONGODB_DATABASE,required"`
	ChainName          string `env:"CHAIN_NAME,required"`
	ChainUrl           string `env:"CHAIN_URL,required"`
	FromBlock          uint64 `env:"FROM_BLOCK,required"`
	ToBlock            uint64 `env:"TO_BLOCK,required"`
	Network            string `env:"NETWORK,required"`
	RateLimitPerSecond int    `env:"RATE_LIMIT_PER_SECOND,default=10"`
	PageSize           uint64 `env:"PAGE_SIZE,default=100"`
	PersistBlock       bool   `env:"PERSIST_BLOCK,default=false"`
}

BackfillerConfiguration represents the application configuration when running as backfiller.

type BlockchainMethod

type BlockchainMethod struct {
	ID   string
	Name string
}

type ServiceConfiguration

type ServiceConfiguration struct {
	Environment   string `env:"ENVIRONMENT,required"`
	LogLevel      string `env:"LOG_LEVEL,default=INFO"`
	Port          string `env:"PORT,default=8000"`
	MongoURI      string `env:"MONGODB_URI,required"`
	MongoDatabase string `env:"MONGODB_DATABASE,required"`
	PprofEnabled  bool   `env:"PPROF_ENABLED,default=false"`
	P2pNetwork    string `env:"P2P_NETWORK,required"`
	AlertEnabled  bool   `env:"ALERT_ENABLED,required"`
	AlertApiKey   string `env:"ALERT_API_KEY"`

	AnkrUrl                    string `env:"ANKR_URL,required"`
	AnkrRequestsPerSecond      int    `env:"ANKR_REQUESTS_PER_SECOND,required"`
	AptosUrl                   string `env:"APTOS_URL,required"`
	AptosRequestsPerSecond     int    `env:"APTOS_REQUESTS_PER_SECOND,required"`
	ArbitrumUrl                string `env:"ARBITRUM_URL,required"`
	ArbitrumRequestsPerSecond  int    `env:"ARBITRUM_REQUESTS_PER_SECOND,required"`
	AvalancheUrl               string `env:"AVALANCHE_URL,required"`
	AvalancheRequestsPerSecond int    `env:"AVALANCHE_REQUESTS_PER_SECOND,required"`
	BaseUrl                    string `env:"BASE_URL,required"`
	BaseRequestsPerSecond      int    `env:"BASE_REQUESTS_PER_SECOND,required"`
	BscUrl                     string `env:"BSC_URL,required"`
	BscRequestsPerSecond       int    `env:"BSC_REQUESTS_PER_SECOND,required"`
	CeloUrl                    string `env:"CELO_URL,required"`
	CeloRequestsPerSecond      int    `env:"CELO_REQUESTS_PER_SECOND,required"`
	EthereumUrl                string `env:"ETHEREUM_URL,required"`
	EthereumRequestsPerSecond  int    `env:"ETHEREUM_REQUESTS_PER_SECOND,required"`
	MoonbeamUrl                string `env:"MOONBEAM_URL,required"`
	MoonbeamRequestsPerSecond  int    `env:"MOONBEAM_REQUESTS_PER_SECOND,required"`
	OptimismUrl                string `env:"OPTIMISM_URL,required"`
	OptimismRequestsPerSecond  int    `env:"OPTIMISM_REQUESTS_PER_SECOND,required"`
	OasisUrl                   string `env:"OASIS_URL,required"`
	OasisRequestsPerSecond     int    `env:"OASIS_REQUESTS_PER_SECOND,required"`
	PlanqUrl                   string `env:"PLANQ_URL,required"`
	PlanqRequestsPerSecond     int    `env:"PLANQ_REQUESTS_PER_SECOND,required"`
	PolygonUrl                 string `env:"POLYGON_URL,required"`
	PolygonRequestsPerSecond   int    `env:"POLYGON_REQUESTS_PER_SECOND,required"`
	SolanaUrl                  string `env:"SOLANA_URL,required"`
	SolanaRequestsPerSecond    int    `env:"SOLANA_REQUESTS_PER_SECOND,required"`
	TerraUrl                   string `env:"TERRA_URL,required"`
	TerraRequestsPerSecond     int    `env:"TERRA_REQUESTS_PER_SECOND,required"`
}

ServiceConfiguration represents the application configuration when running as service with the default values.

func New

New creates a configuration with the values from .env file and environment variables.

type WatcherBlockchain

type WatcherBlockchain struct {
	ChainID      vaa.ChainID
	Name         string
	Address      string
	SizeBlocks   uint8
	WaitSeconds  uint16
	InitialBlock int64
}

type WatcherBlockchainAddresses

type WatcherBlockchainAddresses struct {
	ChainID     vaa.ChainID
	Name        string
	SizeBlocks  uint8
	WaitSeconds uint16
	// Initial block indicates for the supported contracts, the oldest block from which to start processing.
	InitialBlock     int64
	MethodsByAddress map[string][]BlockchainMethod
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL