diff --git a/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts b/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts index 92227e4948..7b0ac0e604 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts @@ -23,14 +23,14 @@ export default class blockTimestamp implements AnalyzerModule { warning: `Use of "now": "now" does not mean current time. "now" is an alias for "block.timestamp". "block.timestamp" can be influenced by miners to a certain degree, be careful.`, location: item.src, - more: 'http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#are-timestamps-now-block-timestamp-reliable' + more: 'https://solidity.readthedocs.io/en/develop/units-and-global-variables.html?highlight=block.timestamp#block-and-transaction-properties' } }).concat(this.warningblockTimestampNodes.map((item, i) => { return { warning: `Use of "block.timestamp": "block.timestamp" can be influenced by miners to a certain degree. That means that a miner can "choose" the block.timestamp, to a certain degree, to change the outcome of a transaction in the mined block.`, location: item.src, - more: 'http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#are-timestamps-now-block-timestamp-reliable' + more: 'https://solidity.readthedocs.io/en/develop/units-and-global-variables.html?highlight=block.timestamp#block-and-transaction-properties' } })) } diff --git a/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts b/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts index f86d14d211..965fc634ee 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts @@ -65,13 +65,13 @@ export default class constantFunctions implements AnalyzerModule { warnings.push({ warning: `${funcName} : Potentially should be constant/view/pure but is not. ${comments}`, location: func.node['src'], - more: 'http://solidity.readthedocs.io/en/develop/contracts.html#constant-functions' + more: 'https://solidity.readthedocs.io/en/develop/contracts.html#view-functions' }) } else { warnings.push({ warning: `${funcName} : Is constant but potentially should not be. ${comments}`, location: func.node['src'], - more: 'http://solidity.readthedocs.io/en/develop/contracts.html#constant-functions' + more: 'https://solidity.readthedocs.io/en/develop/contracts.html#view-functions' }) } } diff --git a/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts b/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts index dabb3bf3f4..01bf741e75 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts @@ -19,7 +19,7 @@ export default class deleteDynamicArrays implements AnalyzerModule { return { warning: `The "delete" operation when applied to a dynamically sized array in Solidity generates code to delete each of the elements contained. If the array is large, this operation can surpass the block gas limit and raise an OOG exception. Also nested dynamically sized objects can produce the same results.`, location: node.src, - more: 'http://solidity.readthedocs.io/en/latest/types.html?highlight=array#delete' + more: 'https://solidity.readthedocs.io/en/latest/types.html#delete' } }) } diff --git a/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts b/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts index 37b61ea98d..799862567c 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts @@ -19,7 +19,7 @@ export default class deleteFromDynamicArray implements AnalyzerModule { return { warning: `Using "delete" on an array leaves a gap. The length of the array remains the same. If you want to remove the empty position you need to shift items manually and update the "length" property.`, location: node.src, - more: 'https://github.com/miguelmota/solidity-idiosyncrasies' + more: 'https://github.com/miguelmota/solidity-idiosyncrasies#examples' } }) } diff --git a/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts b/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts index c269d15a4b..cb8a4c876c 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts @@ -34,7 +34,7 @@ export default class erc20Decimals implements AnalyzerModule { warnings.push({ warning: `ERC20 contract's "decimals" variable should be "uint8" type`, location: node.src, - more: ' https://eips.ethereum.org/EIPS/eip-20' + more: 'https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#decimals' }) } } else if (decimalsFun.length > 0) { @@ -42,7 +42,7 @@ export default class erc20Decimals implements AnalyzerModule { warnings.push({ warning: `ERC20 contract's "decimals" function should have "uint8" as return type`, location: fn.node.src, - more: ' https://eips.ethereum.org/EIPS/eip-20' + more: 'https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#decimals' }) } } diff --git a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts index ad494fcd43..0ed5120138 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts @@ -25,7 +25,7 @@ export default class forLoopIteratesOverDynamicArray implements AnalyzerModule { return { warning: `Loops that do not have a fixed number of iterations, for example, loops that depend on storage values, have to be used carefully. Due to the block gas limit, transactions can only consume a certain amount of gas. The number of iterations in a loop can grow beyond the block gas limit which can cause the complete contract to be stalled at a certain point. \n Additionally, using unbounded loops incurs in a lot of avoidable gas costs. Carefully test how many items at maximum you can pass to such functions to make it successful.`, location: node.src, - more: 'http://solidity.readthedocs.io/en/v0.4.24/security-considerations.html#gas-limit-and-loops' + more: 'http://solidity.readthedocs.io/en/latest/security-considerations.html#gas-limit-and-loops' } }) } diff --git a/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts b/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts index 827aa17f39..5f07534999 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts @@ -19,7 +19,7 @@ export default class inlineAssembly implements AnalyzerModule { warning: `The Contract uses inline assembly, this is only advised in rare cases. Additionally static analysis modules do not parse inline Assembly, this can lead to wrong analysis results.`, location: node.src, - more: 'http://solidity.readthedocs.io/en/develop/assembly.html#solidity-assembly' + more: 'http://solidity.readthedocs.io/en/develop/assembly.html' } }) } diff --git a/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts b/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts index 18280e4e6f..c8bd8c2677 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts @@ -43,7 +43,6 @@ export default class lowLevelCalls implements AnalyzerModule { It can lead to unexpected behavior if return value is not handled properly. Please use Direct Calls via specifying the called contract's interface.` morehref = 'http://solidity.readthedocs.io/en/develop/control-structures.html?#external-function-calls' - // http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html?#why-is-the-low-level-function-call-less-favorable-than-instantiating-a-contract-with-a-variable-contractb-b-and-executing-its-functions-b-dosomething break case lowLevelCallTypes.CALLCODE: text = `Use of "callcode": should be avoided whenever possible. diff --git a/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts b/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts index df1f901b63..d24b72425a 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts @@ -36,7 +36,7 @@ export default class selfdestruct implements AnalyzerModule { warnings.push({ warning: `Use of selfdestruct: No code after selfdestruct is executed. Selfdestruct is a terminal.`, location: node.src, - more: 'http://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html#self-destruct' + more: 'https://solidity.readthedocs.io/en/develop/introduction-to-smart-contracts.html#deactivate-and-self-destruct' }) hasSelf = false } diff --git a/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts b/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts index b99c676bab..ca7ed67486 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts @@ -22,7 +22,7 @@ export default class stringBytesLength implements AnalyzerModule { return [{ warning: `"bytes" and "string" lengths are not the same since strings are assumed to be UTF-8 encoded (according to the ABI defintion) therefore one character is not nessesarily encoded in one byte of data.`, location: this.bytesLengthChecks[0].src, - more: 'https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#argument-encoding' + more: 'https://solidity.readthedocs.io/en/develop/abi-spec.html#argument-encoding' }] } else { return [] diff --git a/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts b/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts index adcf5cb7dd..e570350033 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts @@ -20,7 +20,8 @@ export default class txOrigin implements AnalyzerModule { return { warning: `Use of tx.origin: "tx.origin" is useful only in very exceptional cases. If you use it for authentication, you usually want to replace it by "msg.sender", because otherwise any contract you call can act on your behalf.`, - location: item.src + location: item.src, + more: 'https://solidity.readthedocs.io/en/develop/security-considerations.html#tx-origin' } }) }