(Fix) Change the order of the upgrade methods lookup (#740)
* fix: change the order of the upgrade methods lookup The `isUpgradeTransaction` method was looking for the methods in an wrong order (#599). The proper order was set in #610, but `isUpgradeTransaction` wasn't updated. * fix: contract upgrade version lookup
This commit is contained in:
parent
0441ce2ec7
commit
e33d9fd9bb
|
@ -62,10 +62,10 @@ export const isTokenTransfer = (data: string, value: number): boolean =>
|
||||||
export const isMultisendTransaction = (data: string, value: number): boolean =>
|
export const isMultisendTransaction = (data: string, value: number): boolean =>
|
||||||
!!data && data.substring(0, 10) === '0x8d80ff0a' && value === 0
|
!!data && data.substring(0, 10) === '0x8d80ff0a' && value === 0
|
||||||
|
|
||||||
// f08a0323 - setFallbackHandler (308, 8)
|
// 7de7edef - changeMasterCopy (308, 8)
|
||||||
// 7de7edef - changeMasterCopy (550, 8)
|
// f08a0323 - setFallbackHandler (550, 8)
|
||||||
export const isUpgradeTransaction = (data: string) =>
|
export const isUpgradeTransaction = (data: string) =>
|
||||||
!!data && data.substr(308, 8) === 'f08a0323' && data.substr(550, 8) === '7de7edef'
|
!!data && data.substr(308, 8) === '7de7edef' && data.substr(550, 8) === 'f08a0323'
|
||||||
|
|
||||||
export const isERC721Contract = async (contractAddress: string): boolean => {
|
export const isERC721Contract = async (contractAddress: string): boolean => {
|
||||||
const ERC721Token = await getStandardTokenContract()
|
const ERC721Token = await getStandardTokenContract()
|
||||||
|
|
|
@ -18,7 +18,7 @@ type DecodedTxData = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getSafeVersion = (data: string) => {
|
const getSafeVersion = (data: string) => {
|
||||||
const contractAddress = data.substr(582, 40).toLowerCase()
|
const contractAddress = data.substr(340, 40).toLowerCase()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue