Skip to content

Instantly share code, notes, and snippets.

View tranvictor's full-sized avatar

Victor Tran tranvictor

View GitHub Profile
@tranvictor
tranvictor / gist:840cb51eb40dec87676a1ce7bf655a2b
Last active December 20, 2020 19:38
Instruction to rescue lost WBTC of users in token contract

Dear WBTC Dao members,

There are 9 WBTC, which is worth more than 200k USD, stuck in the token contract because a few users sent them there by mistake. 2 of the users already requested the rescue in this github issue. Kyber, as one of the dao members, would like to propose the following procedure to claim the tokens and send back to users:

  1. the DAO will call 0xca06411bd7a7296d7dbdd0050dfc846e95febeb7.callReclaimToken() to send all WBTC in the WTBC contract to itself as it is the owner of WBTC contract. This needs 11 approvals out of 18 members.
  2. the DAO will call 0xca06411bd7a7296d7dbdd0050dfc846e95febeb7.reclaimToken() to send all WBTC there (as result of the previous operation) to the DAO as the DAO is the owner of 0xca06411bd7a7296d7dbdd0050dfc846e95febeb7. This needs 11 approvals out of 18 members as well.
  3. the DAO will call WBTC.transfer() to transfer the WBTC to 0x4dbbbFb0e68bE9D8F5a377A4654604a62E851e80. This is WBTC mini
[{"inputs":[{"internalType":"address","name":"vat_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"arg1","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg2","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":true,"internalType":"address","name":"own","type":"address"},{"indexed":true,"internalType":"uint256","name":"cdp","type":"uint256"}],"name":"NewCdp","type":"event"},{"constant":false,"inputs":[{"internalType":"uint256","name":"cdp","type":"uint256"},{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"ok","type"
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"bytes32","name":"arg1","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg2","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg3","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":true,"inputs":[],"name":"Line","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"can","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":fal
[{"inputs":[{"internalType":"address","name":"vat_","type":"address"},{"internalType":"address","name":"jar_","type":"address"},{"internalType":"address","name":"spot_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authority","type":"address"}],"name":"LogSetAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"LogSetOwner","type":"event"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"internalType":"contract DSAuthority","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"cdp","type":"uint256"},{"internalType":"uint256","name":"dart","type":"uint256"},{"internalType":"uint256","name":"minInk","type":"uint256"}],"name":"bite","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"func
0x63825c174ab367968EC60f061753D3bbD36A0D8F - FPR
0x4Cb01bd05E4652CbB9F312aE604f4549D2bf2C99 - APR
0x2295fc6BC32cD12fdBb852cFf4014cEAc6d79C10 - Custom (PT)
0x742e8BB8e6bDE9CB2DF5449f8de7510798727fB1 - APR
0x57f8160e1c59D16C01BbE181fD94db4E56b60495 - Utility (WETH)
0x3e9FFBA3C3eB91f501817b031031a71de2d3163B - APR
0x0232Ba609782Cea145Ec3663F52CF7aEb4AC773C - APR
0xa33c7c22d0BB673c2aEa2C048BB883b679fa1BE9 - APR
0x1d57EF26709beB756e026308413f685339A73A9D - APR
0x751Eea622edd1E3D768C18afbCaeC7DcE7750C65 - APR
1) Contract: ConversionRates should get buy rate when compact data has boundary values (-128, 127).:
bad rate
+ expected - actual
-100778143200000000000
+72426017920000000000
at Function.assert.deepEqual (node_modules/truffle/build/cli.bundled.js:216053:32)
at Context.<anonymous> (test/conversionRate.js:434:16)
production.min.js?v=version15:1 Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.
warn @ production.min.js?v=version15:1
production.min.js?v=version15:1 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
production.min.js?v=version15:1 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
(index):1 Failed to decode downloaded font: https://fonts.gstatic.com/stats/Roboto/normal/700
production.min.js?v=version15:1 Object
raw.githubusercontent.com/TrustWallet/tokens/master/tokens/0x79cdfa04e3c4eb58c4f49dae78b322e5b0d38788.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
func (tl *TradeLog) UnmarshalJSON(b []byte) error {
type AliasTradeLog TradeLog
type mask struct {
Timestamp int64 `json:"timestamp"`
*AliasTradeLog
}
m := mask{
Timestamp: 0,
AliasTradeLog: (*AliasTradeLog)(tl),
}
#<Thread:0x00007f84812de530@/Users/victor/.rvm/gems/ruby-2.5.1/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
1: from /Users/victor/.rvm/gems/ruby-2.5.1/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/victor/.rvm/gems/ruby-2.5.1/gems/sshkit-1.16.1/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as ubuntu@54.250.69.110: /home/ubuntu/user_dashboard/rvm1scripts/install-rvm.sh exit status: 2 (SSHKit::Runner::ExecuteError)
/home/ubuntu/user_dashboard/rvm1scripts/install-rvm.sh stdout: Downloading https://github.com/rvm/rvm/archive/1.29.6.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.6/1.29.6.tar.gz.asc
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatu
2018/12/05 11:31:36.186382 reserve_core.go:380: old nonce: <nil>, init price: <nil>, count: 0, err:
2018/12/05 11:31:36.441203 reserve_core.go:409: initial set rate tx, init price: 7000000000
2018/12/05 11:31:40.598151 reserve_core.go:467: Core ----------> Set rates: ==> Result: tx: 0x81348b8ebaa39a27dff9f7bf3c52d8043f6dac785580bac38a6386ed4665edbf, nonce: 230340, price: 7000000000, error: , storing error:
2018/12/05 11:32:46.193758 reserve_core.go:380: old nonce: <nil>, init price: <nil>, count: 0, err:
2018/12/05 11:32:46.450731 reserve_core.go:409: initial set rate tx, init price: 6500000000
2018/12/05 11:32:48.780508 reserve_core.go:467: Core ----------> Set rates: ==> Result: tx: 0x43203d27b244f81c99e587c215f876a1907663935f2d63feeadd50c9329b5dea, nonce: 230341, price: 6500000000, error: , storing error:
2018/12/05 11:33:56.458542 reserve_core.go:380: old nonce: 230341, init price: 6500000000, count: 1, err:
2018/12/05 11:34:02.415530 reserve_core.go:394: Trying to replace old tx with new price: 128763720