Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNB hot fix #1648

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion npms/skale-observer/observer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ const gArrChainIdsSupportedByMulticall = [
];

async function isMulticallAvailable( mn ) {
// return true;
if( mn && mn.ethersProvider ) {
const { chainId } = await mn.ethersProvider.getNetwork();
const bnChainId = owaspUtils.toBN( chainId );
Expand Down Expand Up @@ -196,6 +197,7 @@ export async function loadSChainParts( joSChain, opts ) {
const multicall = new EMC.Multicall( {
ethersProvider: opts.imaState.chainProperties.mn.ethersProvider,
tryAggregate: true
//, multicallCustomContractAddress: "0xcA11bde05977b3631167028862bE2a173976CA11"
} );
const strRef0 = "Nodes-nodes";
const strRef1 = "Nodes-getNodeDomainName";
Expand Down Expand Up @@ -425,6 +427,7 @@ export async function loadSChainsWithEMC( opts ) {
const multicall = new EMC.Multicall( {
ethersProvider: opts.imaState.chainProperties.mn.ethersProvider,
tryAggregate: true
//, multicallCustomContractAddress: "0xcA11bde05977b3631167028862bE2a173976CA11"
} );
const cntGroupMax = 30, cntLastExtraGroup = cntSChains % cntGroupMax;
const bHaveExtraGroup = ( cntLastExtraGroup > 0 ) ? true : false;
Expand Down Expand Up @@ -652,6 +655,7 @@ export async function getAllSchainNames( arrSChainHashes, opts ) {
const multicall = new EMC.Multicall( {
ethersProvider: opts.imaState.chainProperties.mn.ethersProvider,
tryAggregate: true
//, multicallCustomContractAddress: "0xcA11bde05977b3631167028862bE2a173976CA11"
} );
const strRef3 = "SchainsInternal-getSchainName";
const contractCallContext = [ {
Expand All @@ -675,6 +679,7 @@ export async function getAllSchainNames( arrSChainHashes, opts ) {
for( let idxSChain = 0; idxSChain < cntSChains; ++ idxSChain ) {
if( opts && opts.bStopNeeded )
break;
const strSChainHash = arrSChainHashes[idxSChain];
const strSChainName =
rawResults.results[strRef3].callsReturnContext[idxResult].returnValues[0];
arrSChainNames.push( strSChainName );
Expand Down Expand Up @@ -1295,7 +1300,8 @@ export async function ensureHaveWorker( opts ) {
opts.imaState.joSChainDiscovery.repeatIntervalMilliseconds,
"periodicDiscoveryInterval":
opts.imaState.joSChainDiscovery.periodicDiscoveryInterval
}
},
"isEnabledMultiCall": opts.imaState.isEnabledMultiCall
}
},
"cc": {
Expand Down
Loading