Skip to content

Instantly share code, notes, and snippets.

William Morriss wjmelements

Block or report user

Report or block wjmelements

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wjmelements
wjmelements / gist:a949117a87305b17482d2f517aa1c6e7
Created Mar 10, 2018
[EVM] Sponsored, inefficient with push/pop
View gist:a949117a87305b17482d2f517aa1c6e7
pragma solidity^0.4.19;
// like a less-liquid GasToken
contract Sponsored {
uint256[] wastedSpace;
function sponsor() external {
wastedSpace.push(1);
wastedSpace.push(1);
wastedSpace.push(1);
wastedSpace.push(1);
wastedSpace.push(1);
@wjmelements
wjmelements / Sponsored v1
Last active Mar 10, 2018
Sponsored gas plugin
View Sponsored v1
pragma solidity^0.4.19;
// like a less-liquid GasToken
contract Sponsored {
uint256[] wastedSpace;
function sponsor() external {
uint256 len = wastedSpace.length;
wastedSpace.length = len + 5;
wastedSpace[len] = 1;
wastedSpace[len+1] = 1;
wastedSpace[len+2] = 1;
You can’t perform that action at this time.