Skip to content

Instantly share code, notes, and snippets.

View wighawag's full-sized avatar

Ronan Sandford wighawag

View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Deployer} from "forge-deploy/Deployer.sol";
import {DefaultDeployerFunction, DeployOptions} from "forge-deploy/DefaultDeployerFunction.sol";
// --------------------------------------------------------------------------------------------
// GENERATED
// --------------------------------------------------------------------------------------------
{{#each this}}

0x14239926414769f216664efbcb5e5a12b17b7de99e32b2c9e2322652ebc7e5db

@wighawag
wighawag / rollup-typescript.md
Created September 3, 2020 09:10 — forked from aleclarson/rollup-typescript.md
The best Rollup config for TypeScript libraries

Please retweet if this helps you!

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

{
"language": "Solidity",
"sources": {
"src/AContract.sol": {
"content": "pragma solidity 0.6.5;\r\n\r\nimport \"./ALibrary.sol\";\r\n\r\ncontract AContract {\r\n using ALibrary for uint256;\r\n\r\n function times4(uint256 t) external pure returns (uint256) {\r\n return t.twice().twice();\r\n }\r\n}\r\n"
},
"src/ALibrary.sol": {
"content": "pragma solidity 0.6.5;\r\n\r\nlibrary ALibrary {\r\n function twice(uint256 t) external pure returns (uint256) {\r\n return t * 2;\r\n }\r\n}\r\n"
},
"src/diamon_test/ActionFacet.sol": {
{
"language": "Solidity",
"sources": {
"src/contracts_common/src/BaseWithStorage/Admin.sol": {
"content": "pragma solidity ^0.6.0;\n\n\ncontract Admin {\n address internal _admin;\n\n /// @dev emitted when the contract administrator is changed.\n /// @param oldAdmin address of the previous administrator.\n /// @param newAdmin address of the new administrator.\n event AdminChanged(address oldAdmin, address newAdmin);\n\n /// @dev gives the current administrator of this contract.\n /// @return the current administrator of this contract.\n function getAdmin() external view returns (address) {\n return _admin;\n }\n\n /// @dev change the administrator to be `newAdmin`.\n /// @param newAdmin address of the new administrator.\n function changeAdmin(address newAdmin) external {\n require(msg.sender == _admin, \"only admin can change admin\");\n emit AdminChanged(_admin, newAdmin);\n _admin = newAdmin;\n }\n\n modifier onlyAdmin() {\n
@wighawag
wighawag / machine.js
Last active June 22, 2020 22:32
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'planet',
initial: 'idle',
context: {
error: undefined
},
on: {
PROBE: {
target: '.probing',
in: 'idle',
@wighawag
wighawag / machine.js
Last active June 22, 2020 22:20
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'planet',
initial: 'unknown',
on :{
PROBE: {
target: '.probing',
in: 'unknown',
},
RETRY: {
target: '.probing',
@wighawag
wighawag / machine.js
Last active June 22, 2020 15:49
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
},
states: {
builtin: {
initial: 'unknown',
@wighawag
wighawag / machine.js
Created June 22, 2020 11:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wighawag
wighawag / machine.js
Last active June 21, 2020 09:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions