This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts a SeaportValidator error/warning code to a human readable string | |
* @param code number indicating the error/warning code | |
* @returns readable string | |
*/ | |
export function getErrorMessage(code: number): string { | |
switch (code) { | |
case 100: | |
return "Invalid order format. Ensure offer/consideration follow requirements"; | |
case 200: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity >=0.8.4; | |
import { Script } from "forge-std/Script.sol"; | |
import { console2 } from "forge-std/console2.sol"; | |
import { stdJson } from "forge-std/StdJson.sol"; | |
contract FileUtils is Script { | |
using stdJson for string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ℹ This is the configuration for your development deployment: | |
Ethereum Node: ws://localhost:8545 | |
ENS registry: 0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1 | |
APM registry: aragonpm.eth | |
DAO address: 0xE9866fE6dF20F032E62Cc3094EdDe9748fE51753 | |
Opening http://localhost:3000/#/0xE9866fE6dF20F032E62Cc3094EdDe9748fE51753 to view your DAO | |
(node:12216) UnhandledPromiseRejectionWarning: Error: Error: Command failed: npm run start:local | |
sh: 1: copy-aragon-ui-assets: not found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://ethereum.stackexchange.com/a/10432/24989 | |
// Approximate solution using the binomial expansion | |
// The following is a decent, low-cost approximation: | |
// Computes `k * (1+1/q) ^ N`, with precision `p`. The higher | |
// the precision, the higher the gas cost. It should be | |
// something around the log of `n`. When `p == n`, the | |
// precision is absolute (sans possible integer overflows). <edit: NOT true, see comments> | |
// Much smaller values are sufficient to get a great approximation. | |
function fracExp(uint k, uint q, uint n, uint p) returns (uint) { |