mirror of
https://github.com/lux-apps/game.git
synced 2026-10-30 18:15:14 +00:00
* make it build * remove ganache and use hardhat clean * add some code splitting to reduce bundle sizes * update readme * fix typo and warnings * remove sha3 * switch to yarn * yarn workspaces && "require" -> "import" changes * remove useless type * fix netlify * improve netflify * css and fixes * fix navbar padding * add custom highlight.js with solidity only * fix highlight.js setup * fix highlight.js setup (further) * fix layout * use lazy loading for subpages only * fix footer and sidebar * fix metamask on local network * change lyfecycle functions * remove unused json-loader * fix use of componentDidUpdate * move hljs to deps * fix navigation and remove react-highlight * improve descriptions * redirect to rinkeby * use local highlight.js in Code * add back highlight.js theme import * use localized syntax highlighting * remove lazy loading * initial sentry integration * trigger deploy * fix constants * add back bundle splitting but without lazy loading * try to trigger sentry * try to trigger not sandboxed error * fix equality * force trigger * fix inequality * reorg env * debug * debug * debug * debug * remove noob error * fix sentry setup * delete contracts from client folder * update with missing master changes * update tests and mute console logs * try sentry on netlify * restore dummy code * update readme * Reduce compiler warnings * Add PR128 - double click prevention * PR108 * update remix link PR102 * add multilanguage spanish * fix string * temporarly remove stats * add missing translations * add new language guide and changelog * catch missing addresses or provider * fix readme * Update README.md * remove formatting from internationalized strings * fix bad strings.json keys * add message to contribute in translations * reword * update changelog * update changelog * fix positioning of version * log mined transactions * increase sidebar width * filter out repeated logs * fix conditional * add changelog * simplify conditional * debug * fix use of Map Co-authored-by: Dario <[email protected]> Co-authored-by: Francisco Giordano <[email protected]>
887 B
887 B
While this example may be simple, confusing tx.origin with msg.sender can lead to phishing-style attacks, such as this.
An example of a possible attack is outlined below.
- Use
tx.originto determine whose tokens to transfer, e.g.
function transfer(address _to, uint _value) {
tokens[tx.origin] -= _value;
tokens[_to] += _value;
}
- Attacker gets victim to send funds to a malicious contract that calls the transfer function of the token contract, e.g.
function () payable {
token.transfer(attackerAddress, 10000);
}
- In this scenario,
tx.originwill be the victim's address (whilemsg.senderwill be the malicious contract's address), resulting in the funds being transferred from the victim to the attacker.