See this link
Last active
October 13, 2021 08:16
-
-
Save dornfeder/42614ba6025acd0fb2f1c63376f65a65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let valid = true; | |
const creators = [ | |
'FvTog3nBSyoDZZghBe8dcDZ7cary16yQyGPptc9u6rep', | |
'AmivaqHeZBgUZkzEZ44Mi9zQJruExZMP4PVRYduFVkaS', | |
'44kiGWWsSgdqPMvmqYgTS78Mx2BKCWzduATkfY4biU97' | |
]; | |
const updateAuthority = creators[0]; | |
const errorStyle = 'background: #f94144;'; | |
const successStyle = 'background: #90be6d;'; | |
const successBody = 'background: #BFD9AB'; | |
const errorBody = 'background: #FB888A'; | |
console.log('~~~ Shark Tooth Verifier Start ~~~'); | |
creators.forEach((creator, index) => { | |
const el = document.querySelectorAll('.creator-dropdown-entry-address')[index]; | |
if (el) { | |
const givenCreator = el.text; | |
if (givenCreator === creator) { | |
el.parentElement.style = successStyle; | |
console.info(`Creator ${index} seems valid! expected: ${creator} - found: ${givenCreator}`); | |
} else { | |
valid = false; | |
console.warn(`ATTENTION: Creator ${index} seems invalid! expected: ${creator} - found: ${givenCreator} `); | |
el.parentElement.style = errorStyle; | |
} | |
} | |
else { | |
valid = false; | |
} | |
}); | |
if (valid) { | |
document.querySelector('.header-body .btn-group button').style = successStyle; | |
} | |
else { | |
document.querySelector('.header-body .btn-group button').style = errorStyle; | |
} | |
const rows = document.querySelectorAll('.card')[0].querySelectorAll('tr') | |
rows.forEach(row => { | |
if (row.querySelectorAll('td')[0].textContent === 'Update Authority') { | |
const givenUpdateAuthority = row.querySelectorAll('.text-monospace > a')[0].text; | |
if (givenUpdateAuthority === updateAuthority) { | |
console.info(`Update Authority seems valid! expected: ${updateAuthority} - found: ${givenUpdateAuthority}`); | |
row.style = successStyle; | |
} else { | |
valid = false; | |
console.warn(`ATTENTION: Update Authority seems invalid! expected: ${updateAuthority} - found: ${givenUpdateAuthority}`); | |
row.style = errorStyle; | |
} | |
} | |
}); | |
const badge = document.querySelectorAll('.header-body')[0].querySelectorAll('.badge')[2]; | |
if (badge.innerText === 'Immutable') { | |
console.info(`Token seems immutable`); | |
badge.style = successStyle; | |
} else { | |
valid = false; | |
console.warn(`ATTENTION: Token seems mutable`); | |
badge.style = errorStyle; | |
} | |
const body = document.querySelector('body'); | |
if (valid) { | |
console.info(`END RESULT: Tooth seems legit!`); | |
body.style = successBody; | |
} | |
else { | |
console.warn(`END RESULT: Tooth seems NOT legit! Might be a Scam!`); | |
body.style = errorBody; | |
} | |
console.log('~~~ Shark Tooth Verifier End ~~~'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment