| title | tags |
|---|---|
有關上海升級,你需要知道的事 (test gist) |
imToken, Staking Withdraw, envTest |
以太坊上海升級即將來臨,對於生態系裡的不同角色,針對此升級要做的事也有所不同。此篇文章我們帶領大家導覽上海升級與你的關係,並且該做什麼事來應對。
| { | |
| "title": "LR_Shift to Ctrl+Space", | |
| "rules": [ | |
| { | |
| "description": "Change L_Shift to switch EN/ZH condition", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "conditions": [ | |
| { |
| import hashlib | |
| import string | |
| ##### Helper function ##### | |
| ssz_byteorder = "little" # https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md | |
| # https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md#aliases | |
| def isBytesN(input_): | |
| # BytesN := Vector[uint8, N] | |
| assert isinstance(input_, list) |
| tags |
|---|
cowork guideline, 開源協作手冊, g0v |
:::success < 回到開源協作手冊 :::
假設您已從 ens.domains 獲得了一組 ENS(在這裡我們以 token.eth 為例),並且在這之前我們已架設完成了一個 off-chain gateway server。
下面的說明將解釋如何將 off-chain gateway server 與 on-chain token.eth ENS 進行關聯,以便 ethers.js 可以從 off-chain gateway server 成功查詢到對應的 ENS Ethereum 地址。
在本文中,我們假設您已架設好的 off-chain gateway server 資訊及儲存的資料如下:
| payload: 0x30875978000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000011fe4b6ae13d2a6055c8d9cf65c55bac32b5d844000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da10000000000000000000000002f897200a84478e71fd07a9137ee63a0242092e50000000000000000000000002f897200a84478e71fd07a9137ee63a0242092e50000000000000000000000000000000000000000000000000000000000000064332156fabd471fdd1ae4234d1bd54836b23cd1230a7de51368e07458dc5d85720000000000000000000000000000000000000000000000000000000063a6b90500000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006205970d4da01a0290c88db54c37689143b8f81c51cd4f0049c91440405c3921641402176cfae517252ea86b5080c6e237973d9146ac494 |
| // Reference: https://stackoverflow.com/questions/67893318/solidity-how-to-represent-bytes32-as-string | |
| // Excute: forge test -vvv --match-path "contracts/test/Spender.t.sol" --match-test "testSpendFromUser*" | |
| function testSpendFromUser() public { | |
| bytes32 out1 = keccak256( | |
| abi.encodePacked( | |
| "SpendWithPermit(", | |
| "address tokenAddr,", | |
| "address user,", | |
| "address recipient,", |
| // https://chocolatey.org/ | |
| > Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
| :: 驅動 | |
| > choco install -y vmware-tools | |
| > choco install -y nvidia-display-driver | |
| :: APP 指令程式 |
| {"name":"Cardano ADA Pool","ticker":"ADATW","description":"Cardano ADA Pool","homepage":"https://www.facebook.com/groups/ada.tw"} |