Swap page: the chain id read from eth_chainId at load (4464 from the class v5 floor at DAA 68,400, 4463 before it), never fixed in the page; devnet-3.json notes both

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 12:30:51 +00:00
parent dd3a1b3b3c
commit 319d63f4d9
2 changed files with 55 additions and 14 deletions

View file

@ -1,24 +1,61 @@
{
"network": "igneum-devnet-3",
"chain_id": 4463,
"chain_id_hex": "0x116f",
"chain_id": 4464,
"chain_id_hex": "0x1170",
"note": "Devnet 3, test tokens, no value. The chain may reset; these addresses go with it.",
"rpc": "https://rpc.devnet.igneum.network",
"deployed_at": "2026-10-08T10:50:00Z",
"deployer": "0x07DD4DBca5c1a66755AF28BACCA1D901a2D209aA",
"source": "contracts/dex (Foundry, solc 0.8.28, evm_version paris, optimizer 200 runs)",
"contracts": {
"WIGN": { "address": "0x47447783D00e1760Eb815a34707b611D53f2A51e", "tx": "0x9fc48e0e3aa6ccdc41ff72381e1986d617722e22cd2b5f0f9f1e988eef60b2d6", "block": 26917 },
"TTA": { "address": "0x9ad4F0435f9172A89C6765eE8631CAB2Db3B5052", "tx": "0xa16b6a6501d2705b7c7dc4cf01f8b65b87270e5f1f90b4638b19f120b4830dc0", "block": 26919, "name": "Test Token A", "faucet": "drip() mints 1,000 TTA to the caller once an hour" },
"TTB": { "address": "0x996e3042089E80029348d7836472DB34C21841c1", "tx": "0x63eca8238d7f2c29e67c5aad33b0f1cb341d233f2ae0922621e4ba09d94eca61", "block": 26921, "name": "Test Token B", "faucet": "drip() mints 1,000 TTB to the caller once an hour" },
"IgneumFactory": { "address": "0x09FF42dbb20448ddB673fD34F973a7D93E7139A8", "tx": "0xd25223b5f1adcba415e51a0936c1ba3e9ae1dcbb1299ec5c4a91293e41ace3bb", "block": 26923 },
"IgneumRouter": { "address": "0x9a6fA842C4e58A87AEF1F3aD15233d99283002B7", "tx": "0xabce2fcac81f87fdca02ac4528d4029ebbe1e6d49304dbe6427e1320f2e17b27", "block": 26924 }
"WIGN": {
"address": "0x47447783D00e1760Eb815a34707b611D53f2A51e",
"tx": "0x9fc48e0e3aa6ccdc41ff72381e1986d617722e22cd2b5f0f9f1e988eef60b2d6",
"block": 26917
},
"TTA": {
"address": "0x9ad4F0435f9172A89C6765eE8631CAB2Db3B5052",
"tx": "0xa16b6a6501d2705b7c7dc4cf01f8b65b87270e5f1f90b4638b19f120b4830dc0",
"block": 26919,
"name": "Test Token A",
"faucet": "drip() mints 1,000 TTA to the caller once an hour"
},
"TTB": {
"address": "0x996e3042089E80029348d7836472DB34C21841c1",
"tx": "0x63eca8238d7f2c29e67c5aad33b0f1cb341d233f2ae0922621e4ba09d94eca61",
"block": 26921,
"name": "Test Token B",
"faucet": "drip() mints 1,000 TTB to the caller once an hour"
},
"IgneumFactory": {
"address": "0x09FF42dbb20448ddB673fD34F973a7D93E7139A8",
"tx": "0xd25223b5f1adcba415e51a0936c1ba3e9ae1dcbb1299ec5c4a91293e41ace3bb",
"block": 26923
},
"IgneumRouter": {
"address": "0x9a6fA842C4e58A87AEF1F3aD15233d99283002B7",
"tx": "0xabce2fcac81f87fdca02ac4528d4029ebbe1e6d49304dbe6427e1320f2e17b27",
"block": 26924
}
},
"pairs": {
"TTA_WIGN": { "address": "0x5352Fc2723014Bb45A5b1767Df549DA755773A2B", "seeded": "500 TTA beside 100 IGN", "block": 26969 },
"TTB_WIGN": { "address": "0x93Db70744e200D647f783C3953dF35d7394EdBC5", "seeded": "500 TTB beside 100 IGN", "block": 26970 },
"TTA_TTB": { "address": "0xF35775db56dE4f1Cd8Ed7ea7CAb8D017d584a96F", "seeded": "500 TTA beside 500 TTB", "block": 26972 }
"TTA_WIGN": {
"address": "0x5352Fc2723014Bb45A5b1767Df549DA755773A2B",
"seeded": "500 TTA beside 100 IGN",
"block": 26969
},
"TTB_WIGN": {
"address": "0x93Db70744e200D647f783C3953dF35d7394EdBC5",
"seeded": "500 TTB beside 100 IGN",
"block": 26970
},
"TTA_TTB": {
"address": "0xF35775db56dE4f1Cd8Ed7ea7CAb8D017d584a96F",
"seeded": "500 TTA beside 500 TTB",
"block": 26972
}
},
"fee": "0.3 percent per swap, kept in the pool",
"gas_note": "Devnet 3 charges the proving dimension inside the execution gas: a local EVM estimate runs out (drip() failed at 133,603 gas in block 26925; the node's eth_estimateGas said 685,513). Send with the node's own estimate (forge script --skip-simulation, or eth_estimateGas before every send)."
"gas_note": "Devnet 3 charges the proving dimension inside the execution gas: a local EVM estimate runs out (drip() failed at 133,603 gas in block 26925; the node's eth_estimateGas said 685,513). Send with the node's own estimate (forge script --skip-simulation, or eth_estimateGas before every send).",
"chain_id_note": "4463 (0x116f) below the class v5 floor; 4464 (0x1170) from DAA 68,400 (crossed 8 October 2026, read 13:27 BST); the AMM was deployed under 4463 and the contracts are unchanged by the floor; read eth_chainId, never fix it"
}

View file

@ -232,7 +232,7 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
<h2 id="swap-h">Swap</h2>
<div class="wallet-row">
<button class="btn" id="connect" type="button">Connect wallet</button>
<span class="status" id="wallet" role="status" aria-live="polite">No wallet connected. The Igneum Wallet open on this machine, or MetaMask, on chain id 4463.</span>
<span class="status" id="wallet" role="status" aria-live="polite">No wallet connected. The Igneum Wallet open on this machine, or MetaMask, on the Devnet 3 chain id shown under Pools.</span>
</div>
<form id="swap-form" novalidate>
<label for="amount-in">You send</label>
@ -282,7 +282,7 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
<div class="status" id="lp-status" role="status" aria-live="polite"></div>
</form>
<dl>
<dt>Chain</dt><dd>igneum-devnet-3, chain id 4463 (0x116f)</dd>
<dt>Chain</dt><dd>igneum-devnet-3, chain id <span id="chain-id">reading…</span></dd>
<dt>RPC</dt><dd><code>https://rpc.devnet.igneum.network</code></dd>
<dt>Router</dt><dd><code class="addr" data-addr="router"></code></dd>
<dt>Factory</dt><dd><code class="addr" data-addr="factory"></code></dd>
@ -372,7 +372,8 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
// extension injects one, window.igneum beside MetaMask, announced through EIP-6963. Reads go to the public RPC; sends go
// through the connected wallet (EIP-1193: MetaMask and any wallet that injects window.ethereum), which asks the node
// for the gas limit itself (Devnet 3 charges proving gas inside execution gas, so a local estimate runs out).
var RPC='https://rpc.devnet.igneum.network', CHAIN_ID=4463, CHAIN_HEX='0x116f';
// the chain id is read from the RPC at load (4463 below the class v5 floor, 4464 from DAA 68,400 on 8 October 2026), never fixed here
var RPC='https://rpc.devnet.igneum.network', CHAIN_ID=null, CHAIN_HEX=null;
var A={router:'0x9a6fA842C4e58A87AEF1F3aD15233d99283002B7',factory:'0x09FF42dbb20448ddB673fD34F973a7D93E7139A8',wign:'0x47447783D00e1760Eb815a34707b611D53f2A51e',tta:'0x9ad4F0435f9172A89C6765eE8631CAB2Db3B5052',ttb:'0x996e3042089E80029348d7836472DB34C21841c1'};
var TOKENS=[{key:'ign',sym:'IGN',name:'IGN (the coin, wrapped on the way in)',addr:A.wign,native:true},{key:'tta',sym:'TTA',name:'Test Token A',addr:A.tta},{key:'ttb',sym:'TTB',name:'Test Token B',addr:A.ttb}];
var POOLS=[{name:'TTA / IGN',a:A.tta,b:A.wign,sa:'TTA',sb:'IGN'},{name:'TTB / IGN',a:A.ttb,b:A.wign,sa:'TTB',sb:'IGN'},{name:'TTA / TTB',a:A.tta,b:A.ttb,sa:'TTA',sb:'TTB'}];
@ -398,6 +399,7 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
// ---- the wallet ----
function connect(){
var eth=window.ethereum;
if(!CHAIN_ID){say($('wallet'),'The chain id is not read yet (the public RPC did not answer). Try again in a moment.','bad');return;}
if(!eth){say($('wallet'),'No wallet found. Open the Igneum Wallet on this machine (0.1.6 or later; the page finds it by itself) or install MetaMask, then tap Connect again.','bad');return;}
eth.request({method:'eth_requestAccounts'}).then(function(acc){
account=acc[0];provider=eth;
@ -527,6 +529,8 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
POOLS.forEach(function(p,i){$('lp-pool').add(new Option(p.name,String(i)));});
document.querySelectorAll('.addr').forEach(function(el){el.textContent=A[el.getAttribute('data-addr')];});
}
function readChainId(){return rpc('eth_chainId',[]).then(function(h){CHAIN_ID=parseInt(h,16);CHAIN_HEX='0x'+CHAIN_ID.toString(16);$('chain-id').textContent=CHAIN_ID+' ('+CHAIN_HEX+')';}).catch(function(){$('chain-id').textContent='unread (the RPC did not answer)';});}
readChainId();setInterval(readChainId,60000);
fillSelects();refreshPools();setInterval(refreshPools,30000);
// a wallet picker when both are present: the Igneum Wallet by EIP-6963, else whatever window.ethereum is
var igneumProvider=null;