Skip to content

Instantly share code, notes, and snippets.

View marsrobertson's full-sized avatar
🦄
karma law still in play

Mars Robertson marsrobertson

🦄
karma law still in play
View GitHub Profile
@marsrobertson
marsrobertson / Code.sol
Created November 16, 2022 18:38
Does inheritance in Solidity cost gas?
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Base {
uint256 number = 69420;
function operation(uint256 addme) public view returns (uint256) {
return number + addme;
}
@marsrobertson
marsrobertson / RUG.md
Created October 13, 2021 11:21 — forked from 0xYYY/RUG.md
SaturnBeam Finance - A 10M USD RUG on Moonriver

A 10M USD RUG on Moonriver

Warning: The following analysis may contain incorrect information, please verify everything yourself before believing in these info.

Would be nice to have someone better in on-chain analysis to double check these.

Background

SatrunBeam Finance was a yield aggregator on Moonriver, a EVM-Compatible parachain on Kusama in the Polkadot ecosystem.

It attracted several millions of liquidity within a month. The team is anon and they claimed that the contracts are audited by BitRise whose domain name was only registered on 2022-08-22 (https://who.is/whois/bitriseaudits.com). And the contracts were never actually verified on the block explorer.

@marsrobertson
marsrobertson / simple.sol
Created January 31, 2020 11:01
Simple smart contract that creates another in constructor
pragma solidity 0.5.14;
contract Factory {
Contract[] newContracts;
constructor(bytes32 name) public {
createContract(name);
}
function createContract (bytes32 name) public {
@marsrobertson
marsrobertson / Arbitrable.sol
Created April 30, 2019 23:06
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&gist=
/**
* @title Arbitrable
* @author Clément Lesaege - <[email protected]>
* Bug Bounties: This code hasn't undertaken a bug bounty program yet.
*/
pragma solidity ^0.4.15;
import "./IArbitrable.sol";
<!--
REMEMBER TO UPDATE CORS USING "normal quotes"
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST", "OPTIONS"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
-->
<!DOCTYPE html>
<html>
@marsrobertson
marsrobertson / Arbitrable.sol
Created April 23, 2019 16:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
/**
* @title Arbitrable
* @author Clément Lesaege - <[email protected]>
* Bug Bounties: This code hasn't undertaken a bug bounty program yet.
*/
pragma solidity ^0.4.15;
import "./IArbitrable.sol";