⛓
> booting polygon rpc node...
> subscribing to block events
> loading petrogold contracts
> starting event stream
> sandbox ready
⛓
Live Chain Demo
Polygon PoS · 实时沙盒模拟器
#54,821,904
54,821,904
Block Height
287
TPS
32 Gwei
Base Gas
~2.1s
Finality
链上事件流
暂停
PetroGold Contract Events
LIVE
区块链可视化
最近区块
已出块 6
Gas 费实时监控
Polygon Gas Price
32
Gwei
Slow
28 Gwei
~60s
Standard
32 Gwei
~5s
Fast
38 Gwei
<2s
铸造算法演示
PETRO 铸造公式
Solidity Logic
// PetroGoldToken.sol — mint()
function calculateMintAmount(
uint256 fiatUSD,
uint256 goldPriceUSD_oz
) pure returns (uint256) {
// Convert to grams (18 decimals)
uint256 gramsRaw = fiatUSD
* 31_1035 // troy oz → grams ×1000
* 1e18
/ (goldPriceUSD_oz * 1000);
// Deduct mint fee (0.15%)
uint256 fee = gramsRaw * 15 / 10_000;
return gramsRaw - fee;
}
function calculateMintAmount(
uint256 fiatUSD,
uint256 goldPriceUSD_oz
) pure returns (uint256) {
// Convert to grams (18 decimals)
uint256 gramsRaw = fiatUSD
* 31_1035 // troy oz → grams ×1000
* 1e18
/ (goldPriceUSD_oz * 1000);
// Deduct mint fee (0.15%)
uint256 fee = gramsRaw * 15 / 10_000;
return gramsRaw - fee;
}
投入 USD
$10,000
$100
$500,000
原始克数 (gramsRaw)
93.15 g
= fiatUSD × 31.1035 / goldPrice
铸造手续费 (fee)
-0.1397 g
0.15% of gramsRaw
最终 PETRO
93.01 PETRO
gramsRaw − fee
链上 uint256
93013543...
×10¹⁸ (18 decimals)
法币入金
$10,000
→
Oracle 金价
$3,342/oz
→
克数换算
93.15g
→
扣除手续费
-0.14g
→
铸造 PETRO
93.01
交易模拟器
发起模拟交易
Sandbox
Mint
~85k gas
Burn
~72k gas
Stake
~94k gas
Borrow
~128k gas
Repay
~80k gas
Vote
~55k gas
Gas Priority
Standard · 32 Gwei
Slow
Fast
预计 Gas 费
$0.003
预计确认时间
~5s
网络健康度
节点在线率
99.2%
847 validators
链上确认率
100%
无孤块
Mempool 待处理
1,247
pending TXs
Oracle 延迟
1.8s
Chainlink feed
PETRO 24h 交易量
$4.2M
+12.4% vs 昨日
智能合约状态
正常
无暂停事件