From 2fbb37e4fe897e9707809d3dd84482567252a061 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 7 Jul 2022 11:10:30 +0200 Subject: [PATCH] feat: add Polygon mainnet OAR --- lib-experimental/oraclizeAPI_lib.sol | 3 +++ oraclizeAPI_0.4.25.sol | 5 +++++ oraclizeAPI_0.4.sol | 5 +++++ oraclizeAPI_0.5.sol | 5 +++++ oraclizeAPI_pre0.4.sol | 4 ++++ provableAPI_0.4.25.sol | 5 +++++ provableAPI_0.5.sol | 5 +++++ provableAPI_0.6.sol | 5 +++++ 8 files changed, 37 insertions(+) diff --git a/lib-experimental/oraclizeAPI_lib.sol b/lib-experimental/oraclizeAPI_lib.sol index c97a636..3e80d2c 100644 --- a/lib-experimental/oraclizeAPI_lib.sol +++ b/lib-experimental/oraclizeAPI_lib.sol @@ -360,6 +360,9 @@ library oraclizeLib { if (getCodeSize(0x90A0F94702c9630036FB9846B52bf31A1C991a84)>0){ //bsc mainnet return OraclizeAddrResolverI(0x90A0F94702c9630036FB9846B52bf31A1C991a84); } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609)>0){ //polygon mainnet + return OraclizeAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge return OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); } diff --git a/oraclizeAPI_0.4.25.sol b/oraclizeAPI_0.4.25.sol index a9a338f..ffaa41a 100644 --- a/oraclizeAPI_0.4.25.sol +++ b/oraclizeAPI_0.4.25.sol @@ -352,6 +352,11 @@ contract usingOraclize { oraclize_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609)>0){ //polygon mainnet + OAR = OraclizeAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + oraclize_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; diff --git a/oraclizeAPI_0.4.sol b/oraclizeAPI_0.4.sol index dcb5d93..6c96016 100644 --- a/oraclizeAPI_0.4.sol +++ b/oraclizeAPI_0.4.sol @@ -352,6 +352,11 @@ contract usingOraclize { oraclize_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609)>0){ //polygon mainnet + OAR = OraclizeAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + oraclize_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; diff --git a/oraclizeAPI_0.5.sol b/oraclizeAPI_0.5.sol index fd84a4c..b354d84 100644 --- a/oraclizeAPI_0.5.sol +++ b/oraclizeAPI_0.5.sol @@ -359,6 +359,11 @@ contract usingOraclize { oraclize_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609) > 0){ //polygon mainnet + OAR = OraclizeAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + oraclize_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475) > 0) { //ethereum-bridge OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; diff --git a/oraclizeAPI_pre0.4.sol b/oraclizeAPI_pre0.4.sol index cc2e711..319282e 100644 --- a/oraclizeAPI_pre0.4.sol +++ b/oraclizeAPI_pre0.4.sol @@ -91,6 +91,10 @@ contract usingOraclize { OAR = OraclizeAddrResolverI(0x90A0F94702c9630036FB9846B52bf31A1C991a84); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609)>0){ //polygon mainnet + OAR = OraclizeAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + return true; + } if (getCodeSize(0x51efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa)>0){ //browser-solidity OAR = OraclizeAddrResolverI(0x51efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa); return true; diff --git a/provableAPI_0.4.25.sol b/provableAPI_0.4.25.sol index 108d79e..d0d65c7 100644 --- a/provableAPI_0.4.25.sol +++ b/provableAPI_0.4.25.sol @@ -352,6 +352,11 @@ contract usingProvable { provable_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609)>0){ //polygon mainnet + OAR = OracleAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + provable_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge OAR = OracleAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; diff --git a/provableAPI_0.5.sol b/provableAPI_0.5.sol index cc2bf6a..6c366f1 100644 --- a/provableAPI_0.5.sol +++ b/provableAPI_0.5.sol @@ -360,6 +360,11 @@ contract usingProvable { provable_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609) > 0){ //polygon mainnet + OAR = OracleAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + provable_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475) > 0) { //ethereum-bridge OAR = OracleAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; diff --git a/provableAPI_0.6.sol b/provableAPI_0.6.sol index e661364..b8f9dbb 100644 --- a/provableAPI_0.6.sol +++ b/provableAPI_0.6.sol @@ -342,6 +342,11 @@ contract usingProvable { provable_setNetworkName("bsc_mainnet"); return true; } + if (getCodeSize(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609) > 0){ //polygon mainnet + OAR = OracleAddrResolverI(0x816ec2AF1b56183F82f8C05759E99FEc3c3De609); + provable_setNetworkName("polygon_mainnet"); + return true; + } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475) > 0) { //ethereum-bridge OAR = OracleAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true;