- 新增 ARB Sepolia + BNB Testnet 多链支持 - 添加 LendingPanel 借贷系统组件 - 添加 LendingAdminPanel 管理面板 - 添加 USDCPanel USDC 操作组件 - 添加 HoldersPanel 持有人信息组件 - 添加 AutoTestPanel 自动化测试组件 - 重构 LP 组件为模块化结构 (LP/) - 添加多个调试和测试脚本 - 修复 USDC 精度动态配置 - 优化合约配置支持多链切换 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
import { createPublicClient, http } from 'viem'
|
|
import { arbitrumSepolia } from 'viem/chains'
|
|
|
|
const client = createPublicClient({
|
|
chain: arbitrumSepolia,
|
|
transport: http('https://api.zan.top/node/v1/arb/sepolia/baf84c429d284bb5b676cb8c9ca21c07')
|
|
})
|
|
|
|
const CONFIGURATOR = '0x488409CE9A3Fcd8EbD373dCb7e025cF8AB96fcdc'
|
|
const LENDING_PROXY = '0xCb4E7B1069F6C26A1c27523ce4c8dfD884552d1D'
|
|
|
|
const OWNER_ABI = [
|
|
{
|
|
inputs: [],
|
|
name: 'owner',
|
|
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
stateMutability: 'view',
|
|
type: 'function'
|
|
}
|
|
]
|
|
|
|
async function main() {
|
|
console.log('🔍 检查合约 owner...\n')
|
|
|
|
try {
|
|
const configuratorOwner = await client.readContract({
|
|
address: CONFIGURATOR,
|
|
abi: OWNER_ABI,
|
|
functionName: 'owner'
|
|
})
|
|
|
|
const lendingOwner = await client.readContract({
|
|
address: LENDING_PROXY,
|
|
abi: OWNER_ABI,
|
|
functionName: 'owner'
|
|
})
|
|
|
|
console.log('Configurator Owner:', configuratorOwner)
|
|
console.log('Lending Proxy Owner:', lendingOwner)
|
|
|
|
} catch (error) {
|
|
console.error('❌ 读取 owner 失败:', error.message)
|
|
}
|
|
}
|
|
|
|
main()
|