eip: 6860 title: Web3 URL to EVM Call Message Translation description: A translation of an HTTP-style Web3 URL to an EVM call message author: Qi Zhou (@qizhou), Chao Pi (@pichaoqkc), Sam Wilson (@SamWilsn) discussions-to: https://ethereum-magicians.org/t/eip-4804-web3-url-to-evm-call-message-translation/8300 status: Draft type: Standards Track category: ERC created: 2023-09-29
This file contains 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
--- | |
eip: 6860 | |
title: Web3 URL to EVM Call Message Translation | |
description: A translation of an HTTP-style Web3 URL to an EVM call message | |
author: Qi Zhou (@qizhou), Chao Pi (@pichaoqkc), Sam Wilson (@SamWilsn) | |
discussions-to: https://ethereum-magicians.org/t/eip-4804-web3-url-to-evm-call-message-translation/8300 | |
status: Draft | |
type: Standards Track | |
category: ERC | |
created: 2023-09-29 |
interface ITokenMetadata {
struct tokenOutput {
// text/html, image/svg+xml, image/png, ...
string mimeType;
bytes output;
};
function getTokenPreview(uint256 tokenId) external view returns (string memory);
This file contains 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
``` | |
interface ITokenMetadata { | |
struct tokenOutput { | |
// text/html, image/svg+xml, image/png, ... | |
string mimeType; | |
bytes output; | |
}; | |
function getTokenPreview(uint256 tokenId) external view returns (string memory); |
This file contains 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
function computeRemainingTime(ratio_updated) { | |
var averageBlockTime = 12; | |
var blockGasIncrease = (20-3)/2; // Gross average of gas increase | |
var requiredGasLimit = 21000; | |
var currentGasLimit = eth.getBlock("latest").gasLimit; | |
var GasLimitDelta = requiredGasLimit - currentGasLimit; | |
var increasingBlockRatio = (ratio_updated - (1 - ratio_updated)); | |
var necessaryBlocks = (GasLimitDelta / increasingBlockRatio) / blockGasIncrease; | |
var necessaryTime = necessaryBlocks * averageBlockTime; |
This file contains 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
<?php | |
// Config | |
$base_api_url = "https://www.betarigs.com/api/v1"; | |
$rig_id = 1; | |
$percent_above_market_price = 10; | |
$minimum_per_speed_unit_price = 0.001; | |
$api_key = 'XXX'; | |
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n"; |
This file contains 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
<?php | |
// Config | |
$base_api_url = "https://www.betarigs.com/api/v1"; | |
$rig_id = 1; | |
$percent_above_market_price = 10; | |
$minimum_per_speed_unit_price = 0.001; | |
$api_key = 'XXX'; | |
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n"; |
This file contains 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
<?php | |
// Config | |
$base_api_url = "https://www.betarigs.com/api/v1"; | |
$rig_id = 4737; | |
echo "[" . date('Y-m-d H:i:s') . "] Getting infos about rig $rig_id ...\n"; | |
$url = $base_api_url . '/rig/' . $rig_id; |
This file contains 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
<?php | |
// Config | |
$base_api_url = "https://www.betarigs.com/api/v1"; | |
$rig_id = 1; | |
$percent_above_market_price = 10; | |
$minimum_per_speed_unit_price = 0.001; | |
$api_key = 'XXX'; | |
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n"; |
This file contains 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
Test. Am I still broken? |
NewerOlder