This commit is contained in:
Tim Olson
2024-01-09 13:30:08 -04:00
parent 8007b29fcf
commit e617810870
5 changed files with 6 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ export class CacheObject {
const blockCaches = {
'31337': new CacheObject('31337|latest_block'),
'42161': new CacheObject('42161|latest_block'),
'53261': new CacheObject('53261|latest_block'),
'1337': new CacheObject('1337|latest_block'),
}
async function latestBlock(chain) {

View File

@@ -12,7 +12,7 @@ export const chainInfo = {}
const _chains = [
{id:42161, name:'Arbitrum'},
{id:31337, name:'Mockchain'},
{id:53261, name:'Dexorder Alpha'},
{id:1337, name:'Dexorder Alpha'},
]
function _setChainInfo(c, k, v) {
@@ -56,7 +56,7 @@ for (const chain of _chains) {
console.log('Factory', chain.factory)
console.log('QueryHelper', chain.helper)
if(chain.id === 31337 || chain.id === 53261) {
if(chain.id === 31337 || chain.id === 1337) {
const mockpath = `../contract/broadcast/DeployMock.sol/${chain.id}/run-${process.env['DEXORDER_DEPLOYMENT_' + chain.id]}.json`
try {
deployment = JSON.parse(fs.readFileSync(mockpath, 'utf8')) //null synchronous is ok we only do this once on init

View File

@@ -6,7 +6,7 @@ import {mockErc20Abi} from "./abi.js";
export async function faucet( chainId, owner, vault=null ) {
if( chainId === 31337 || chainId === 53261 ) {
if( chainId === 31337 || chainId === 1337 ) {
if( vault === null )
vault = vaultAddress(chainId, owner)
const provider = getProvider(chainId);

View File

@@ -18,7 +18,7 @@ io.on("connection", (socket) => {
socket.on('subPools', (chainId, addresses) => subPools(socket, chainId, addresses) )
socket.on('unsubPools', (chainId, addresses) => unsubPools(socket, chainId, addresses) )
socket.on('ensureVault', (chainId,owner,num) => ensureVault(socket, chainId, owner, num) )
if( 31337 in chainInfo && chainInfo[31337]?.mockenv || 53261 in chainInfo && chainInfo[53261]?.mockenv )
if( 31337 in chainInfo && chainInfo[31337]?.mockenv || 1337 in chainInfo && chainInfo[1337]?.mockenv )
socket.on('faucet', async (chainId, owner) => await faucet(chainId, owner))
socket.join('public')
});

View File

@@ -10,7 +10,7 @@ const std_arbitrum_tokens = {}
const tokens = {
42161: std_arbitrum_tokens,
31337: std_arbitrum_tokens,
53261: {},
1337: {},
}
export function erc20(chainId, addr, provider=null) {