#应用名称
appname = explorer-api
#应用监听端口，默认为 8080
httpport = 12011
#应用的运行模式，可选值为 prod, dev 或者 test. 默认是 dev, 为开发模式
runmode = dev
#是否模板自动渲染，默认值为true
autorender = false
#是否允许在 HTTP 请求时，返回原始请求体数据字节，默认为 false （GET or HEAD or 上传文件请求除外）
copyrequestbody = true
#是否开启文档内置功能，默认是false
EnableDocs = true
#是否异常恢复，默认值为 true，即当应用出现异常的情况，通过 recover 恢复回来，而不会导致应用异常退出
RecoverPanic = true
#分页默认显示记录数
PageSize = 10
#日志目录
logPath = ./logs/explorer-api.log
#日志文件最多保存多少天，默认保存 7 天
logMaxDays = 3
#请求地址
domain = "https://cmp20.bitheart.org"

recaptchaSecret = "6Ld91-YkAAAAAPCe3ErpenCAkhlR_Pqzjc1aR_gE"

#=====================
# nft 模块地址,最后不用带"/"
nftUrl = http://172.17.0.1:10256
#=====================

#====================================================================================
# 节点访问地址
chainUrl = "{{CHAINURL}}"

#>>>>>>>>>>>>>>>开始分页配置>>>>>>>>>>>>>>>>>>>>>>>>>>>
[pagination]
#当前页
page = 0
#每页限制多少条
length = 10
#>>>>>>>>>>>>>>>结束分页配置>>>>>>>>>>>>>>>>>>>>>>>>>>>


#区块链配置
[Block]
#同步标志 1为打开同步 0为关闭同步
blockSyncFlag = 1
#内部交易同步标志 1为打开同步 0为关闭同步
internalSyncFlag = 1
#验证者同步标志 1为打开同步 0为关闭同步
validatorSyncFlag = 0
#验证者同步开启是检查验证者状态标志 1为打开 0为关闭 //validatorSyncFlag 为1时才生效，在同步时可关闭
validatorCheckFlag = 0
#余额同步标志 1为打开同步 0为关闭同步
balanceSyncFlag = 1
#账户同步标志 1为打开同步 0为关闭同步
accountSyncFlag = 1
#pending交易处理 1为打开同步 0为关闭同步
pendingTxnFlag = 0
#chainReport标志 1为打开同步 0为关闭同步
chainReportFlag = 1
contractSync = 0

#手动同步标志
[Manual]
# 手动查询并同步合约name和symbol标志 1为打开同步 0为关闭同步
contractNameSyncFlag = 0
# 查询无收据交易标志
ReceiptInfoSyncFlag = 0
# 查询待确定合约类型
contractTypeSyncFlag = 1

#市场价配置
[Market]
#同步标志 1为打开同步 0为关闭同步
MarketPriceSyncFlag = 0

#====================================================================================
#数据库
[mysql]
#主机
dbhost = expmysql
#端口
dbport = 3306
#用户名
dbuser = "root"
#密码
dbpassword = "{{MYSQLPASS}}"
#数据库名称
dbname = "tidb_block_browser"

# 用户模块数据库
userdbhost = expmysql
userdbport = 3306
userdbuser = "root"
userdbpassword = "{{MYSQLPASS}}"
userdbname = "tidb_block_browser_user"

[Redis]
ip = expredis
port = 6379
password = "{{REDISPASSWORD}}"

#====================================================================================
[jwt]
#有效时间s,默认为7天
expiretime = 604800
appexpiretime = 300
#业务配置

[email]
#邮件服务器
host = "mail.bitheart.io"
#服务端口
port = 465
#发件人昵称
senderName = "noreply"
#发件人用户名
user = "scan@bitheart.io"
#发件人密码
password = "TestPassword2024"
#邮箱验证码有效时间（s）
#expireTime = 600
#邮件发送频率间隔（s）
#interval = 120
#邮件验证失败次数
#failures = 5


#生产环境
[exchangeProd]
#总量地址
supplyUrl = "https://api.hecoinfo.com"
#火币API地址
huoBiUrl  = "https://api.huobi.li"
#抹茶API地址
mexcUrl  = "https://api.mexc.com"
#CMC API地址
cmcUrl  = "https://pro-api.coinmarketcap.com"
cmcApiKey  = "2a074c47-d73e-4f40-8043-b0fa23560db1"

#测试环境
[exchangeDev]
#总量地址
supplyUrl = "https://api.hecoinfo.com"
#火币API地址
huoBiUrl  = "https://api.huobi.li"
#抹茶API地址
mexcUrl  = "https://api.mexc.com"

#上传文件
[uploadFile]
#用户上传文件大小(字节)
UserSize = "20971520"
#用户存储目录(临时)
UserDir = "static/upload/temporary/user"
#用户存储目录(正式)
UserDirFormal = "static/upload/formal/user"

[Account]
# 合约地址
contractAccount = ""

[Verify]
# 用户模块验证地址签名信息模板
# [cmpscan.io 09/12/2022 06:58:02] I, hereby verify that I am the owner/creator of the address [0x0000000000000000000000000000000000001000]
messageTemp = "[cmpscan.io %s] I, hereby verify that I am the owner/creator of the address [%s]"

[WatchEmail]
# 地址监控邮件模板
cmpReceived = "Hi %s,<br/><br/>The address %s received %s CMP FROM the address %s<br/><br/>This transaction was processed at block index %d (TxHash %s/tx/%s) on %s (UTC)<br/><br/>Please see %s/address/%s for additional information.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
cmpSent = "Hi %s,<br/><br/>%s CMP was sent FROM the address %s TO the address %s<br/><br/>This transaction was processed at block index %d (TxHash %s/tx/%s) on %s (UTC)<br/><br/>Please see %s/address/%s for additional information.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
tokenReceived = "Hi %s,<br/><br/>The address %s received %s (%s) FROM the address %s<br/><br/>Token Contract: %s<br/>Token Name: %s<br/>Token Symbol: %s<br/>Token Decimals: %d<br/><br/>This transaction was processed at block index %d (TxHash %s/tx/%s) on %s (UTC)<br/><br/>Please see %s/token/%s?a=%s for additional information.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
tokenSent = "Hi %s,<br/><br/>%s (%s) was sent FROM the address %s TO the address %s<br/><br/>Token Contract: %s<br/>Token Name: %s<br/>Token Symbol: %s<br/>Token Decimals: %d<br/><br/>This transaction was processed at block index %d (TxHash %s/tx/%s) on %s (UTC)<br/><br/>Please see %s/token/%s?a=%s for additional information.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"

[AuditRejectEmail]
# tokenInfo和addressTag审核失败邮件模板
tokenInfo = "Hi %s,<br/><br/>The Address: %s<br/><br/>Sorry! We can't pass your application for [Update Token Information]. Please see the reason and resubmission.<br/><br/>Reason: %s<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
addressTag = "Hi %s,<br/><br/>The Address(es): %s<br/><br/>Sorry! We can't pass your application for [Name Address Tag]. Please see the reason and resubmission.<br/><br/>Reason: %s<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"

[ActivateEmail]
# 注册后激活邮件模板
temp = "Hi %s,<br/><br/>Welcome to CMPScan!<br/><br/>Please click the link below to activate your account:<br/><br/>%s<br/><br/>This link will expire in 15 minutes.<br/><br/>If you did not register for an account, please ignore this email.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
# 邮件15分钟内有效
expire = 900

[ChangeEmail]
# 个人资料修改邮箱邮件模板
temp = "Hi %s,<br/><br/>Welcome to CMPScan!<br/><br/>Please click the link below to change your email address from %s to %s:<br/><br/>%s<br/><br/>This link will expire in 15 minutes.<br/><br/>If you did not register for an account, please ignore this email.<br/><br/><br/>Best Regards,<br/><br/>Caduceus Lab Team"
# 邮件15分钟内有效
expire = 900

[DeleteUserEmail]
temp = "Hi %s,<br/><br/>An account deletion request was recently made at cmpscan.io.<br/><br/>Please confirm your account deletion request by clicking on the "confirmation" link below.<br/><br/>Confirmation Link : %s<br/><br/>NOTE: The above link will expire within 1 hour. If this link is expired, kindly resend the request again from your user dashboard.<br/><br/>*** If for any reason the above link is not clickable, please copy the link and paste in your choice of browser.<br/><br/>Best regards,<br/><br/>Caduceus Lab Team"
expire = 3600

[Monitor]
# 节点高度监控模块
enable = false
host = "mail.bitheart.io"
port = 465
user = "scan@bitheart.io"
password = "TestPassword2024"
# 发送统计邮件间隔, 单位分钟
statisticalInterval = 30
# 高度阈值, 某节点高度与最高节点相差heightThreshold时发送邮件
heightThreshold = 20
# 收件人,可多个,使用分号分割,必须写在一行 "a@qq.com;b@qq.com"
receivers = "west.side@qq.com"
# 监控的节点,使用分号分割,必须写在一行 "http://a.eth;http://b.eth"
nodes = "{{CHAINURL}}"
