wip
This commit is contained in:
parent
c50a45c822
commit
831b88ae19
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
29
.idea/watcherTasks.xml
Normal file
29
.idea/watcherTasks.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectTasksOptions">
|
||||
<TaskOptions isEnabled="true">
|
||||
<option name="arguments" value="-w $FilePath$" />
|
||||
<option name="checkSyntaxErrors" value="true" />
|
||||
<option name="description" />
|
||||
<option name="exitCodeBehavior" value="ERROR" />
|
||||
<option name="fileExtension" value="go" />
|
||||
<option name="immediateSync" value="false" />
|
||||
<option name="name" value="goimports" />
|
||||
<option name="output" value="$FilePath$" />
|
||||
<option name="outputFilters">
|
||||
<array />
|
||||
</option>
|
||||
<option name="outputFromStdout" value="false" />
|
||||
<option name="program" value="goimports.exe" />
|
||||
<option name="runOnExternalChanges" value="false" />
|
||||
<option name="scopeName" value="Project Files" />
|
||||
<option name="trackOnlyRoot" value="true" />
|
||||
<option name="workingDir" value="$ProjectFileDir$" />
|
||||
<envs>
|
||||
<env name="GOROOT" value="$GOROOT$" />
|
||||
<env name="GOPATH" value="$GOPATH$" />
|
||||
<env name="PATH" value="$GoBinDirs$" />
|
||||
</envs>
|
||||
</TaskOptions>
|
||||
</component>
|
||||
</project>
|
30
bsc/client.go
Normal file
30
bsc/client.go
Normal file
@ -0,0 +1,30 @@
|
||||
package bsc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
BinanceRpcUrl = "https://bsc-dataseed.binance.org/"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
evm.Client
|
||||
}
|
||||
|
||||
func NewClientWithUrl(ctx context.Context, rpcurl string, privatekey string, options ...evm.ClientOption) (*Client, error) {
|
||||
ethclient, err := evm.NewClient(ctx, rpcurl, privatekey, NewTokenMapper(), options...)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "creating ethereum client")
|
||||
}
|
||||
return &Client{
|
||||
ethclient,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func NewClient(ctx context.Context, privatekey string, options ...evm.ClientOption) (*Client, error) {
|
||||
return NewClientWithUrl(ctx, BinanceRpcUrl, privatekey, options...)
|
||||
}
|
1
bsc/contracts/wbnb.abi
Normal file
1
bsc/contracts/wbnb.abi
Normal file
@ -0,0 +1 @@
|
||||
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"},{"name":"wad","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"guy","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"}]
|
1090
bsc/contracts/wbnb.go
Normal file
1090
bsc/contracts/wbnb.go
Normal file
File diff suppressed because it is too large
Load Diff
309
bsc/tokenmapper.go
Normal file
309
bsc/tokenmapper.go
Normal file
@ -0,0 +1,309 @@
|
||||
package bsc
|
||||
|
||||
import (
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
var tokens = map[string]string{
|
||||
"$DG": "0x9fdc3ae5c814b79dca2556564047c5e7e5449c19",
|
||||
"1INCH": "0x111111111117dc0aa78b770fa6a738034120c302",
|
||||
"2LC": "0x11f6ecc9e2658627e0876212f1078b9f84d3196e",
|
||||
"7UP": "0x29f350b3822f51dc29619c583adbc9628646e315",
|
||||
"ACS": "0x4197c6ef3879a08cd51e5560da5064b773aa1d29",
|
||||
"ADA": "0x3ee2200efb3400fabb9aacf31297cbdd1d435d47",
|
||||
"ADX": "0x6bff4fb161347ad7de4a625ae5aa3a1ca7077819",
|
||||
"ALICE": "0xac51066d7bec65dc4589368da368b212745d63e8",
|
||||
"ALPACA": "0x8f0528ce5ef7b51152a59745befdd91d97091d2f",
|
||||
"ALPHA": "0xa1faa113cbe53436df28ff0aee54275c13b40975",
|
||||
"ANDX": "0xb63a911ae7dc40510e7bb552b7fcb94c198bbe2d",
|
||||
"ANKR": "0xf307910a4c7bbc79691fd374889b36d8531b08e3",
|
||||
"ANY": "0xf68c9df95a18b2a5a5fa1124d79eeeffbad0b6fa",
|
||||
"ARGON": "0x851f7a700c5d67db59612b871338a85526752c25",
|
||||
"ATA": "0xa2120b9e674d3fc3875f415a7df52e382f141225",
|
||||
"ATOM": "0x0eb3a705fc54725037cc9e008bdede697f62f335",
|
||||
"AUTO": "0xa184088a740c695e156f91f5cc086a06bb78b827",
|
||||
"AVAX": "0x1ce0c2827e2ef14d5c4f29a091d735a204794041",
|
||||
"AXS": "0x715d400f88c167884bbcc41c5fea407ed4d2f8a0",
|
||||
"BAKE": "0xE02dF9e3e622DeBdD69fb838bB799E3F168902c5",
|
||||
"BAND": "0xad6caeb32cd2c308980a548bd0bc5aa4306c6c18",
|
||||
"BAT": "0x101d82428437127bf1608f699cd651e6abf9766e",
|
||||
"BCH": "0x8ff795a6f4d97e7887c79bea79aba5cc76444adf",
|
||||
"BCHA": "0xd475c9c934dcd6d5f1cac530585aa5ba14185b92",
|
||||
"BELT": "0xe0e514c71282b6f4e823703a39374cf58dc3ea4f",
|
||||
"BETH": "0x250632378e573c6be1ac2f97fcdf00515d0aa91b",
|
||||
"BGOV": "0xf8e026dc4c0860771f691ecffbbdfe2fa51c77cf",
|
||||
"BHC": "0x6fd7c98458a943f469e1cf4ea85b173f5cd342f4",
|
||||
"BIDR": "0x9a2f5556e9a637e8fbce886d8e3cf8b316a1d8a2",
|
||||
"BIFI": "0xCa3F508B8e4Dd382eE878A314789373D80A5190A",
|
||||
"BNT": "0xa069008a669e2af00a86673d9d584cfb524a42cc",
|
||||
"BOG": "0xb09fe1613fe03e7361319d2a43edc17422f36b09",
|
||||
"BPAY": "0xebc76079da0c245fae7225b58a57a54809b40618",
|
||||
"BRY": "0xf859Bf77cBe8699013d6Dbc7C2b926Aaf307F830",
|
||||
"BSC-USD": "0x55d398326f99059ff775485246999027b3197955",
|
||||
"BSCX": "0x5ac52ee5b2a633895292ff6d8a89bb9190451587",
|
||||
"BTCB": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",
|
||||
"BTCST": "0x78650b139471520656b9e7aa7a5e9276814a38e9",
|
||||
"BTD": "0xd1102332a213e21faf78b69c03572031f3552c33",
|
||||
"BTS": "0xc2e1acef50ae55661855e8dcb72adb182a3cc259",
|
||||
"BTT": "0x8595f9da7b868b1822194faed312235e43007b49",
|
||||
"BUNI": "0x0e7beec376099429b85639eb3abe7cf22694ed49",
|
||||
"BUNNY": "0xc9849e6fdb743d08faee3e34dd2d1bc69ea11a51",
|
||||
"BURGER": "0xae9269f27437f0fcbc232d39ec814844a51d6b8f",
|
||||
"BUSD": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
|
||||
"BUX": "0x211ffbe424b90e25a15531ca322adf1559779e45",
|
||||
"BZRX": "0x4b87642aedf10b642be4663db842ecc5a88bf5ba",
|
||||
"BabyFlokiCoin": "0x808fac147a9c02723d0be300ac4753eaf93c0e1f",
|
||||
"C98": "0xaec945e04baf28b135fa7c640f624f8d90f1c3a6",
|
||||
"CAN": "0x007ea5c0ea75a8df45d288a4debdd5bb633f9e56",
|
||||
"CAR": "0x176a25637e5078519230a4d80a7a47350940264a",
|
||||
"CARS": "0x1228Fb5eF4C98CaBd696Ba1BD4819e050389D21A",
|
||||
"CBIX": "0x34681c1035f97e1edcccec5f142e02ff81a3a230",
|
||||
"CELR": "0x1f9f6a696c6fd109cd3956f45dc709d2b3902163",
|
||||
"CHESS": "0x20de22029ab63cf9a7cf5feb2b737ca1ee4c82a6",
|
||||
"CHI": "0x0000000000004946c0e9f43f4dee607b0ef1fa1c",
|
||||
"CHS": "0xadd8a06fd58761a5047426e160b2b88ad3b9d464",
|
||||
"CMCX": "0xb2343143f814639c9b1f42961c698247171df34a",
|
||||
"COMP": "0x52ce071bd9b1c4b00a0b92d298c512478cad67e8",
|
||||
"COS": "0x96dd399f9c3afda1f194182f71600f1b65946501",
|
||||
"COTI": "0xadbaf88b39d37dc68775ed1541f1bf83a5a45feb",
|
||||
"COVAC": "0x2ADfe76173F7e7DAef1463A83BA4d06171fAc454",
|
||||
"CREAM": "0xd4cb328a82bdf5f03eb737f37fa6b370aef3e888",
|
||||
"CRP": "0x1ad8d89074afa789a027b9a31d0bd14e254711d0",
|
||||
"CTI": "0x3f670f65b9ce89b82e82121fd68c340ac22c08d6",
|
||||
"CTK": "0xa8c2b8eec3d368c0253ad3dae65a5f2bbb89c929",
|
||||
"CTSI": "0x8da443f84fea710266c8eb6bc34b71702d033ef2",
|
||||
"CYT": "0xd9025e25bb6cf39f8c926a704039d2dd51088063",
|
||||
"Cake": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
|
||||
"D100": "0x9d8aac497a4b8fe697dd63101d793f0c6a6eebb6",
|
||||
"DAI": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",
|
||||
"DARA": "0x0255af6c9f86f6b0543357bacefa262a2664f80f",
|
||||
"DDIM": "0xc9132c76060f6b319764ea075973a650a1a53bc9",
|
||||
"DES": "0xb38b3c34e4bb6144c1e5283af720E046Ee833a2a",
|
||||
"DF": "0x4a9a2b2b04549c3927dd2c9668a5ef3fca473623",
|
||||
"DFY": "0xd98560689c6e748dc37bc410b4d3096b1aa3d8c2",
|
||||
"DGN": "0x72f28c09be1342447fa01ebc76ef508473d08c5c",
|
||||
"DGSTB": "0x5aa638c6777e2f041951a3d539a32cac83503441",
|
||||
"DITTO": "0x233d91a0713155003fc4dce0afa871b508b3b715",
|
||||
"DODO": "0x67ee3cb086f8a16f34bee3ca72fad36f7db929e2",
|
||||
"DOGE": "0xba2ae424d960c26247dd6c32edc70b295c744c43",
|
||||
"DOGGY": "0x74926b3d118a63f6958922d3dc05eb9c6e6e00c6",
|
||||
"DOS": "0xdc0f0a5719c39764b011edd02811bd228296887c",
|
||||
"DOT": "0x7083609fce4d1d8dc0c979aab8c869ea2c873402",
|
||||
"DYT": "0x740623d2c797b7d8d1ecb98e9b4afcf99ec31e14",
|
||||
"EGG": "0xf952fc3ca7325cc27d15885d37117676d25bfda6",
|
||||
"EGLD": "0xbf7c81fff98bbe61b40ed186e4afd6ddd01337fe",
|
||||
"ELF": "0xa3f020a5c92e15be13caf0ee5c95cf79585eecc9",
|
||||
"ELTB": "0x380291a9a8593b39f123cf39cc1cc47463330b1f",
|
||||
"EMS": "0x8444bd389e5db8ceaad7b95466a0b8a1939af1a9",
|
||||
"EOS": "0x56b6fb708fc5732dec1afc8d8556423a2edccbd6",
|
||||
"EPS": "0xa7f552078dcc247c2684336020c03648500c6d9f",
|
||||
"ETC": "0x3d6545b08693dae087e957cb1180ee38b9e3c25e",
|
||||
"ETH": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
|
||||
"EVAI": "0x233302a38fdbdd2b3f6ee19a66d7e47c4a64fe46",
|
||||
"EXF": "0x6306e883493824ccf606d90e25f68a28e47b98a3",
|
||||
"EZ": "0x5512014efa6cd57764fa743756f7a6ce3358cc83",
|
||||
"FEG": "0xacfc95585d80ab62f67a14c566c1b7a49fe91167",
|
||||
"FINE": "0x4e6415a5727ea08aae4580057187923aec331227",
|
||||
"FIRO": "0xd5d0322b6bab6a762c79f8c81a0b674778e13aed",
|
||||
"FLOW": "0xc943c5320b9c18c153d1e2d12cc3074bebfb31a2",
|
||||
"FNX": "0xdfd9e2a17596cad6295ecffda42d9b6f63f7b5d5",
|
||||
"FOMO": "0x329016b785f138cd931c673ea59d0113526321d4",
|
||||
"FOR": "0x658a109c5900bc6d2357c87549b651670e5b0539",
|
||||
"FRAX": "0x90c97f71e18723b0cf0dfa30ee176ab653e89f40",
|
||||
"FREE": "0x12e34cdf6a031a10fe241864c32fb03a4fdad739",
|
||||
"FRIES": "0x393b312c01048b3ed2720bf1b090084c09e408a1",
|
||||
"FRONT": "0x928e55dab735aa8260af3cedada18b5f70c72f1b",
|
||||
"FSXU": "0xa94b7a842aadb617a0b08fa744e033c6de2f7595",
|
||||
"FTM": "0xad29abb318791d579433d831ed122afeaf29dcfe",
|
||||
"FUSE": "0x5857c96dae9cf8511b08cb07f85753c472d36ea3",
|
||||
"FUSII": "0x3a50d6daacc82f17a2434184fe904fc45542a734",
|
||||
"FXS": "0xe48a3d7d0bc88d552f730b62c006bc925eadb9ee",
|
||||
"Fuel": "0x2090c8295769791ab7a3cf1cc6e0aa19f35e441a",
|
||||
"GALA": "0x7ddee176f665cd201f93eede625770e2fd911990",
|
||||
"GBYTE": "0xeb34de0c4b2955ce0ff1526cdf735c9e6d249d09",
|
||||
"GENA": "0x7f4959528D4C9c7379b3437C7Eea40376fD96B8a",
|
||||
"GFCE": "0x5f136383e230f972739fae2e81e7e774afe64c66",
|
||||
"GFX": "0xe4fa3c576c31696322e8d7165c5965d5a1f6a1a5",
|
||||
"GOFI": "0x6b8227a0e18bd35a10849601db194b24aab2c8ea",
|
||||
"GTON": "0x64d5baf5ac030e2b7c435add967f787ae94d0205",
|
||||
"GUM": "0xc53708664b99df348dd27c3ac0759d2da9c40462",
|
||||
"HAKKA": "0x1d1eb8e8293222e1a29d2c0e4ce6c0acfd89aaac",
|
||||
"HE": "0x20d39a5130f799b95b55a930e5b7ebc589ea9ed8",
|
||||
"HOTCROSS": "0x4fa7163e153419e0e1064e418dd7a99314ed27b6",
|
||||
"HPS": "0xeda21b525ac789eab1a08ef2404dd8505ffb973d",
|
||||
"HTB": "0x4e840aadd28da189b9906674b4afcb77c128d9ea",
|
||||
"HUP": "0x375a7b6a6f74a5acb86c420c53c4ce8cf1d51b4d",
|
||||
"Helmet": "0x948d2a81086a075b3130bac19e4c6dee1d2e3fe8",
|
||||
"INNBC": "0xdf1f0026374d4bcc490be5e316963cf6df2fff19",
|
||||
"IOTA": "0xd944f1d1e9d5f9bb90b62f9d45e447d989580782",
|
||||
"IOTX": "0x9678e42cebeb63f23197d726b29b1cb20d0064e5",
|
||||
"JNTR": "0x5f2caa99fc378248ac02cbbaac27e3fa155ed2c4",
|
||||
"JST": "0xea998d307aca04d4f0a3b3036aba84ae2e409c0a",
|
||||
"JulD": "0x5a41f637c3f7553dba6ddc2d3ca92641096577ea",
|
||||
"KHP": "0x15B3d410fCd0d695E1bbe4F717F8E1B6D0Fb2D0C",
|
||||
"KIWI": "0xcfdf8a80fecaeecc144fa74c0df8691bfd0e26e3",
|
||||
"KMD": "0x2003f7ba57ea956b05b85c60b4b2ceea9b111256",
|
||||
"KNC": "0xfe56d5892bdffc7bf58f2e84be1b2c32d21c308b",
|
||||
"KOGE": "0xe6df05ce8c8301223373cf5b969afcb1498c5528",
|
||||
"KP3RB": "0x5ea29eee799aa7cc379fde5cf370bc24f2ea7c81",
|
||||
"L99": "0x033c90840F27C83B1Aa0Ffe6Db65C954BF6ABbdd",
|
||||
"LAUNCH": "0xb5389a679151c4b8621b1098c6e0961a3cfee8d4",
|
||||
"LINA": "0x762539b45a1dcce3d36d080f74d1aed37844b878",
|
||||
"LINK": "0xf8a0bf9cf54bb92f17374d9e9a321e6a111a51bd",
|
||||
"LIT": "0xb59490ab09a0f526cc7305822ac65f2ab12f9723",
|
||||
"LMT": "0x9617857e191354dbea0b714d78bc59e57c411087",
|
||||
"LTC": "0x4338665cbb7b2485a8855a139b75d5e34ab0db94",
|
||||
"LTO": "0x857b222fc79e1cbbf8ca5f78cb133d1b7cf34bbd",
|
||||
"MATH": "0xf218184af829cf2b0019f8e6f0b2423498a36983",
|
||||
"MATTER": "0x1c9491865a1de77c5b6e19d2e6a5f1d7a6f2b25f",
|
||||
"MDA": "0xd72aa9e1cddc2f6d6e0444580002170fba1f8eed",
|
||||
"MDT": "0x668db7aa38eac6b40c9d13dbe61361dc4c4611d1",
|
||||
"MILK": "0x8e9f5173e16ff93f81579d73a7f9723324d6b6af",
|
||||
"MIR": "0x5b6dcf557e2abe2323c48445e8cc948910d8c2c9",
|
||||
"MKR": "0x5f0da599bb2cccfcf6fdfd7d81743b6020864350",
|
||||
"MLTPX": "0x9d7c580e0bc4ea441db96eebc7e1440d264bce51",
|
||||
"MONSTA": "0x8a5d7fcd4c90421d21d30fcc4435948ac3618b2f",
|
||||
"MoonX": "0x053f574b35eb29deb6817bd8b3f8c848c6abbe53",
|
||||
"N1CE": "0xc14df1e2fff3708816495e7364ff274aceecad91",
|
||||
"NEAR": "0x1fa4a73a3f0133f0025378af00236f3abdee5d63",
|
||||
"NFT": "0x1fc9004ec7e5722891f5f38bae7678efcb11d34d",
|
||||
"NMX": "0xd32d01a43c869edcd1117c640fbdcfcfd97d9d65",
|
||||
"NPXB": "0xd8cb4c2369db13c94c90c7fd3bebc9757900ee6b",
|
||||
"NUTS": "0x8893d5fa71389673c5c4b9b3cb4ee1ba71207556",
|
||||
"NWC": "0x968f6f898a6df937fc1859b323ac2f14643e3fed",
|
||||
"OCT": "0x49277cc5be56b519901e561096bfd416277b4f6d",
|
||||
"OM": "0xf78d2e7936f5fe18308a3b2951a93b6c4a41f5e2",
|
||||
"ONT": "0xfd7b3a77848f1c2d67e05e54d78d174a0c850335",
|
||||
"ORE": "0x93d5a19a993d195cfc75acdd736a994428290a59",
|
||||
"ORI": "0x3045d1a840364c3657b8df6c6f86a4359c23472b",
|
||||
"OVR": "0x7e35d0e9180bf3a1fc47b0d110be7a21a10b41fe",
|
||||
"PASTA": "0xab9d0fae6eb062f2698c2d429a1be9185a5d4f6e",
|
||||
"PAX": "0xb7f8cd00c5a06c0537e2abff0b58033d02e5e094",
|
||||
"PAXG": "0x7950865a9140cb519342433146ed5b40c6f210f7",
|
||||
"PEARL": "0x118b60763002f3ba7603a3c17f946a0c7dab789f",
|
||||
"PERL": "0x0f9e4d49f25de22c2202af916b681fbb3790497b",
|
||||
"PHA": "0x0112e557d400474717056c4e6d40edd846f38351",
|
||||
"PHO": "0xb9784c1633ef3b839563b988c323798634714368",
|
||||
"PIZZA": "0x2cc26dd730f548dc4ac291ae7d84a0c96980d2cb",
|
||||
"POLS": "0x7e624fa0e1c4abfd309cc15719b7e2580887f570",
|
||||
"POSI": "0x5ca42204cdaa70d5c773946e69de942b85ca6706",
|
||||
"PPAY": "0xfb288d60d3b66f9c3e231a9a39ed3f158a4269aa",
|
||||
"PROM": "0xaf53d56ff99f1322515e54fdde93ff8b3b7dafd5",
|
||||
"PROPEL": "0x9b44df3318972be845d83f961735609137c4c23c",
|
||||
"PVU": "0x31471e0791fcdbe82fbf4c44943255e923f1b794",
|
||||
"QANX": "0xaaa7a10a8ee237ea61e8ac46c50a8db8bcc1baaa",
|
||||
"RAVEN": "0xcd7c5025753a49f1881b31c48caa7c517bb46308",
|
||||
"RBS": "0x95336aC5f7E840e7716781313e1607F7C9D6BE25",
|
||||
"RBT": "0x891e4554227385c5c740f9b483e935e3cbc29f01",
|
||||
"RBW": "0x4cc23264e1ef8dd8173e4ec07e6a01cc7476d997",
|
||||
"REEF": "0xf21768ccbc73ea5b6fd3c687208a7c2def2d966e",
|
||||
"RFOX": "0x0a3a21356793b49154fd3bbe91cbc2a16c0457f5",
|
||||
"RGP": "0xfa262f303aa244f9cc66f312f0755d89c3793192",
|
||||
"RHYTHM": "0xe4318f2acf2b9c3f518a3a03b5412f4999970ddb",
|
||||
"RISE": "0xc7d43f2b51f44f09fbb8a691a0451e8ffcf36c0a",
|
||||
"RPG": "0x01E0d17a533E5930A349C2BB71304F04F20AB12B",
|
||||
"Ramen": "0x4f47a0d15c1e53f3d94c069c7d16977c29f9cb6b",
|
||||
"SAFEMOON": "0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3",
|
||||
"SAKE": "0x8bd778b12b15416359a227f0533ce2d91844e1ed",
|
||||
"SATT": "0x448bee2d93be708b54ee6353a7cc35c4933f1156",
|
||||
"SBS": "0xc1d99537392084cc02d3f52386729b79d01035ce",
|
||||
"SEEDS": "0xefb94d158206dfa5cb8c30950001713106440928",
|
||||
"SFP": "0xd41fdb03ba84762dd66a0af1a6c8540ff1ba5dfb",
|
||||
"SHARD": "0xd8a1734945b9ba38eb19a291b475e31f49e59877",
|
||||
"SHIB": "0x2859e4544c4bb03966803b044a93563bd2d0dd4d",
|
||||
"SHIELD": "0x60b3bc37593853c04410c4f07fe4d6748245bf77",
|
||||
"SKILL": "0x154a9f9cbd3449ad22fdae23044319d6ef2a1fab",
|
||||
"SLP": "0x070a08beef8d36734dd67a491202ff35a6a16d97",
|
||||
"SNX": "0x9ac983826058b8a9c7aa1c9171441191232e8404",
|
||||
"SPARTA": "0x3910db0600ea925f63c36ddb1351ab6e2c6eb102",
|
||||
"SPORE": "0x77f6a5f1b7a2b6d6c322af8581317d6bb0a52689",
|
||||
"START": "0x31d0a7ada4d4c131eb612db48861211f63e57610",
|
||||
"STAX": "0x0da6ed8b13214ff28e9ca979dd37439e8a88f6c4",
|
||||
"STM": "0x90df11a8cce420675e73922419e3f4f3fe13cccb",
|
||||
"SUN": "0xa1e6c58d503e4eee986167f45a063853cefe08c3",
|
||||
"SWFTC": "0xe64e30276c2f826febd3784958d6da7b55dfbad3",
|
||||
"SWTH": "0x250b211ee44459dad5cd3bca803dd6a7ecb5d46c",
|
||||
"SXP": "0x47bead2563dcbf3bf2c9407fea4dc236faba485a",
|
||||
"SYL": "0x7e52a123ed6db6ac872a875552935fbbd2544c86",
|
||||
"TACO": "0x9066e87Bac891409D690cfEfA41379b34af06391",
|
||||
"TCT": "0xca0a9df6a8cad800046c1ddc5755810718b65c44",
|
||||
"THUGS": "0xe10e9822a5de22f8761919310dda35cd997d63c0",
|
||||
"TKO": "0x9f589e3eabe42ebc94a44727b3f3531c0c877809",
|
||||
"TLM": "0x2222227e22102fe3322098e4cbfe18cfebd57c95",
|
||||
"TLOS": "0xb6c53431608e626ac81a9776ac3e999c5556717c",
|
||||
"TORN": "0x1ba8d3c4c219b124d351f603060663bd1bcd9bbf",
|
||||
"TOZ": "0xcf0bea8b08fd28e339eff49f717a828f79f7f5ec",
|
||||
"TREE": "0x9bd547446ea13c0c13df2c1885e1f5b019a77441",
|
||||
"TRX": "0x85eac5ac2f758618dfa09bdbe0cf174e7d574d5b",
|
||||
"TUSD": "0x14016e85a25aeb13065688cafb43044c2ef86784",
|
||||
"TWIN": "0xaf83f292fced83032f52ced45ef7dbddb586441a",
|
||||
"TWT": "0x4b0f1812e5df2a09796481ff14017e6005508003",
|
||||
"UBU": "0xd2ddfba7bb12f6e70c2aab6b6bf9edaef42ed22f",
|
||||
"UFT": "0x2645d5f59d952ef2317c8e0aaa5a61c392ccd44d",
|
||||
"UNI": "0xbf5140a22578168fd562dccf235e5d43a02ce9b1",
|
||||
"USDC": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
|
||||
"USDP": "0xb3c11196a4f3b1da7c23d9fb0a3dde9c6340934f",
|
||||
"USELESS": "0x2cd2664ce5639e46c6a3125257361e01d0213657",
|
||||
"UST": "0x23396cf899ca06c4472205fc903bdb4de249d6fc",
|
||||
"VAI": "0x4bd17003473389a42daf6a0a729f6fdb328bbbd7",
|
||||
"VANCII": "0x8f9b482b74afc0b7e8aefc704f1f04df208ee332",
|
||||
"VFOX": "0x4d61577d8fd2208a0afb814ea089fdeae19ed202",
|
||||
"VLTY": "0x38A5cbe2FB53d1d407Dd5A22C4362daF48EB8526",
|
||||
"VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883",
|
||||
"WANA": "0x339c72829ab7dd45c3c52f965e7abe358dd8761e",
|
||||
"WBNB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
||||
"WE": "0x0dd3a140346a94d403ac62385daaf5a86b50e752",
|
||||
"WIN": "0xaef0d72a118ce24fee3cd1d43d383897d05b4e99",
|
||||
"WINGS": "0x0487b824c8261462f88940f97053e65bdb498446",
|
||||
"WQT": "0xe89508D74579A06A65B907c91F697CF4F8D9Fac7",
|
||||
"WRX": "0x8e17ed70334c87ece574c9d537bc153d8609e2a3",
|
||||
"WSPP": "0x46d502fac9aea7c5bc7b13c8ec9d02378c33d36f",
|
||||
"Weather": "0xbe3e4cfd929156f612df36042d79201ecf5344d7",
|
||||
"XCUR": "0x708c671aa997da536869b50b6c67fa0c32ce80b2",
|
||||
"XEC": "0x0ef2e7602add1733bfdb17ac3094d0421b502ca3",
|
||||
"XP": "0x6a0b045ea1cbc87946ee6ca4d118dc0b5c152455",
|
||||
"XRP": "0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe",
|
||||
"XTF": "0x0377facbddbee59d40869808bb67fa741038bc67",
|
||||
"XTM": "0x3f526a5a8811cc1812d923d5dbb20e4b1c6028db",
|
||||
"XTZ": "0x16939ef78684453bfdfb47825f8a5f714f12623a",
|
||||
"XVS": "0xcf6bb5389c92bdda8a3747ddb454cb7a64626c63",
|
||||
"Xpose": "0xcc10c8afd683c5aa86b1d170d75b555bce5a2c37",
|
||||
"YFI": "0x88f1a5ae2a3bf98aeaf342d26b30a79438c9142e",
|
||||
"YFII": "0x7f70642d88cf1c4a3a7abb072b53b929b653eda5",
|
||||
"ZEC": "0x1ba42e5193dfa8b03d15dd1b86a3113bbbef8eeb",
|
||||
"ZIL": "0xb86abcb37c3a4b64f74f59301aff131a1becc787",
|
||||
"ZMN": "0xfcb8a4b1a0b645e08064e05b98e9cc6f48d2aa57",
|
||||
"bCFX": "0x045c4324039dA91c52C55DF5D785385Aab073DcF",
|
||||
"bMXX": "0x4131b87f74415190425ccd873048c708f8005823",
|
||||
"bROOBEE": "0xe64f5cb844946c1f102bd25bbd87a5ab4ae89fbe",
|
||||
"crADA": "0x81c15d3e956e55e77e1f3f257f0a65bd2725fc55",
|
||||
"iDNA": "0x0de08c1abe5fb86dd7fd2ac90400ace305138d5b",
|
||||
"vADA": "0x9a0af7fdb2065ce470d72664de73cae409da28ec",
|
||||
"vBCH": "0x5f0388ebc2b94fa8e123f404b79ccf5f40b29176",
|
||||
"vBETH": "0x972207a639cc1b374b893cc33fa251b55ceb7c07",
|
||||
"vBSWAP": "0x4f0ed527e8a95ecaa132af214dfd41f30b361600",
|
||||
"vBTC": "0x882c173bc7ff3b7786ca16dfed3dfffb9ee7847b",
|
||||
"vBUSD": "0x95c78222b3d6e262426483d42cfa53685a67ab9d",
|
||||
"vDAI": "0x334b3ecb4dca3593bccc3c7ebd1a1c1d1780fbf1",
|
||||
"vDOGE": "0xec3422ef92b2fb59e84c8b02ba73f1fe84ed8d71",
|
||||
"vDOT": "0x1610bc33319e9398de5f57b33a5b184c806ad217",
|
||||
"vETH": "0xf508fcd89b8bd15579dc79a6827cb4686a3592c8",
|
||||
"vFIL": "0xf91d58b5ae142dacc749f58a49fcbac340cb0343",
|
||||
"vLINK": "0x650b940a1033b8a1b1873f78730fcfc73ec11f1f",
|
||||
"vLTC": "0x57a5297f2cb2c0aac9d554660acd6d385ab50c6b",
|
||||
"vSXP": "0x2ff3d0f6990a40261c66e1ff2017acbc282eb6d0",
|
||||
"vUSDC": "0xeca88125a5adbe82614ffc12d0db554e2e2867c8",
|
||||
"vUSDT": "0xfd5840cd36d94d7229439859c0112a4185bc0255",
|
||||
"vXRP": "0xb248a295732e0225acd3337607cc01068e3b9c10",
|
||||
"vXVS": "0x151b1e2635a717bcdc836ecd6fbb62b674fe3e1d",
|
||||
"xMARK": "0x26a5dfab467d4f58fb266648cae769503cec9580",
|
||||
}
|
||||
|
||||
func NewTokenMapper() evm.TokenMapper {
|
||||
tm := evm.NewTokenMapper()
|
||||
for s, s2 := range tokens {
|
||||
tm.AddToken(s, common.HexToAddress(s2))
|
||||
}
|
||||
return tm
|
||||
}
|
41
bsc/wbnb.go
Normal file
41
bsc/wbnb.go
Normal file
@ -0,0 +1,41 @@
|
||||
package bsc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"git.lehouerou.net/laurent/evm/bsc/contracts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type WBNB struct {
|
||||
evm.Token
|
||||
client evm.Client
|
||||
contract *contracts.WBnb
|
||||
}
|
||||
|
||||
func NewWBNB(address string, client evm.Client) (*WBNB, error) {
|
||||
t, err := evm.NewToken(client, common.HexToAddress(address))
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init token contract")
|
||||
}
|
||||
c, err := contracts.NewWBnb(common.HexToAddress(address), client)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init wbnb contract")
|
||||
}
|
||||
|
||||
return &WBNB{
|
||||
Token: t,
|
||||
client: client,
|
||||
contract: c,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (w *WBNB) UnwrapWBNB(ctx context.Context, amount decimal.Decimal) (evm.Transaction, error) {
|
||||
return w.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) {
|
||||
return w.contract.Withdraw(opts.TransactOpts, w.ValueToBigInt(amount))
|
||||
})
|
||||
}
|
202
client.go
Normal file
202
client.go
Normal file
@ -0,0 +1,202 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/ecdsa"
|
||||
"math/big"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type Client interface {
|
||||
bind.ContractBackend
|
||||
PublicAddress() common.Address
|
||||
PublicAddressAsHexString() string
|
||||
PendingNonce(context.Context) (uint64, error)
|
||||
NewTransactor() (*bind.TransactOpts, error)
|
||||
Execute(context.Context, func(context.Context, *TransactOpts) (*types.Transaction, error)) (Transaction, error)
|
||||
NativeTokenBalance(context.Context) (decimal.Decimal, error)
|
||||
CurrentBlockNumber(context.Context) (uint64, error)
|
||||
CurrentBlock(context.Context) (*types.Block, error)
|
||||
SetPendingTransactionCheckPeriod(duration time.Duration)
|
||||
TransactionByHash(context.Context, common.Hash) (*types.Transaction, bool, error)
|
||||
|
||||
TokenService() TokenService
|
||||
}
|
||||
|
||||
type ClientOption func(c Client) (Client, error)
|
||||
|
||||
func WithPendingTransactionWaitResolution(duration time.Duration) ClientOption {
|
||||
return func(c Client) (Client, error) {
|
||||
c.SetPendingTransactionCheckPeriod(duration)
|
||||
return c, nil
|
||||
}
|
||||
}
|
||||
|
||||
type client struct {
|
||||
*ethclient.Client
|
||||
ts TokenService
|
||||
pendingTransactionCheckPeriod time.Duration
|
||||
fromAddress common.Address
|
||||
transactionlock *sync.Mutex
|
||||
privateKey *ecdsa.PrivateKey
|
||||
chainId *big.Int
|
||||
|
||||
defaultTimeout time.Duration
|
||||
}
|
||||
|
||||
func (c *client) TokenService() TokenService {
|
||||
return c.ts
|
||||
}
|
||||
|
||||
func NewClient(ctx context.Context, rpcurl string, privatekey string, tm TokenMapper, options ...ClientOption) (Client, error) {
|
||||
c, err := ethclient.Dial(rpcurl)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "dialing rpc url %s", rpcurl)
|
||||
}
|
||||
|
||||
ecdsaprivatekey, publicaddress, err := GetPrivateKeyAndPublicAddressFromString(privatekey)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "reading private key")
|
||||
}
|
||||
|
||||
res := &client{
|
||||
Client: c,
|
||||
|
||||
pendingTransactionCheckPeriod: 2 * time.Second,
|
||||
privateKey: ecdsaprivatekey,
|
||||
fromAddress: publicaddress,
|
||||
transactionlock: &sync.Mutex{},
|
||||
|
||||
defaultTimeout: 15 * time.Minute,
|
||||
}
|
||||
res.ts = NewTokenService(res, tm)
|
||||
res.chainId, err = c.ChainID(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "retrieving chain id")
|
||||
}
|
||||
|
||||
ires := Client(res)
|
||||
for _, option := range options {
|
||||
ires, err = option(ires)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "applying option")
|
||||
}
|
||||
}
|
||||
return ires, nil
|
||||
}
|
||||
|
||||
func (c *client) PublicAddress() common.Address {
|
||||
return c.fromAddress
|
||||
}
|
||||
|
||||
func (c *client) SetPendingTransactionCheckPeriod(period time.Duration) {
|
||||
c.pendingTransactionCheckPeriod = period
|
||||
}
|
||||
|
||||
func (c *client) PendingNonce(ctx context.Context) (uint64, error) {
|
||||
return c.PendingNonceAt(ctx, c.PublicAddress())
|
||||
}
|
||||
|
||||
func (c *client) PublicAddressAsHexString() string {
|
||||
return c.PublicAddress().Hex()
|
||||
}
|
||||
|
||||
func (c *client) NewTransactor() (*bind.TransactOpts, error) {
|
||||
return bind.NewKeyedTransactorWithChainID(c.privateKey, c.chainId)
|
||||
}
|
||||
|
||||
func (c *client) Execute(ctx context.Context, action func(context.Context, *TransactOpts) (*types.Transaction, error)) (Transaction, error) {
|
||||
c.transactionlock.Lock()
|
||||
defer c.transactionlock.Unlock()
|
||||
localctx, cancel := context.WithTimeout(ctx, c.defaultTimeout)
|
||||
defer cancel()
|
||||
auth, err := NewTransactOpts(localctx, c)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init transaction options")
|
||||
}
|
||||
tx, err := action(localctx, auth)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "executing waitable action")
|
||||
}
|
||||
log.Debug().Msgf("//TX// tx started / hash: %s / gasprice: %s / gaslimit: %d", tx.Hash().Hex(), decimal.NewFromBigInt(tx.GasPrice(), -9), tx.Gas())
|
||||
return NewTransaction(localctx, c, c.pendingTransactionCheckPeriod, tx), nil
|
||||
}
|
||||
|
||||
func (c *client) GetTransactionsForAddressInBlock(ctx context.Context, a string, b int64) {
|
||||
block, err := c.BlockByNumber(ctx, big.NewInt(b))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
txcount, err := c.TransactionCount(ctx, block.Hash())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for i := 0; i < int(txcount); i++ {
|
||||
tx, err := c.TransactionInBlock(ctx, block.Hash(), uint(i))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if strings.ToLower(tx.To().Hex()) == strings.ToLower(a) {
|
||||
log.Debug().Msgf("%d // %s // %s -> %s", b, decimal.NewFromBigInt(tx.Value(), -18), "", tx.To())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (c *client) SuggestGasPrice(ctx context.Context) (*big.Int, error) {
|
||||
return c.Client.SuggestGasPrice(ctx)
|
||||
}
|
||||
|
||||
func (c *client) CurrentBlockNumber(ctx context.Context) (uint64, error) {
|
||||
block, err := c.BlockNumber(ctx)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return block, nil
|
||||
}
|
||||
|
||||
func (c *client) CurrentBlock(ctx context.Context) (*types.Block, error) {
|
||||
number, err := c.CurrentBlockNumber(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting current block number")
|
||||
}
|
||||
block, err := c.BlockByNumber(ctx, big.NewInt(int64(number)))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "getting block %d", number)
|
||||
}
|
||||
return block, nil
|
||||
}
|
||||
|
||||
func (c *client) NativeTokenBalance(ctx context.Context) (decimal.Decimal, error) {
|
||||
return c.BalanceFromAddress(ctx, c.PublicAddress())
|
||||
}
|
||||
|
||||
func (c *client) BalanceFromAddress(ctx context.Context, address common.Address) (decimal.Decimal, error) {
|
||||
b, err := c.PendingBalanceAt(ctx, address)
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "getting balance")
|
||||
}
|
||||
return decimal.NewFromBigInt(b, -18), nil
|
||||
}
|
||||
|
||||
func GetPrivateKeyAndPublicAddressFromString(privatekey string) (*ecdsa.PrivateKey, common.Address, error) {
|
||||
privateKeyECDSA, err := crypto.HexToECDSA(privatekey)
|
||||
if err != nil {
|
||||
return nil, common.Address{}, errors.Wrap(err, "converting hex private key to ecdsa")
|
||||
}
|
||||
publicKeyECDSA, ok := privateKeyECDSA.Public().(*ecdsa.PublicKey)
|
||||
if !ok {
|
||||
return nil, common.Address{}, errors.New("cannot assert type: publicKey is not of type *ecdsa.PublicKey")
|
||||
}
|
||||
return privateKeyECDSA, crypto.PubkeyToAddress(*publicKeyECDSA), nil
|
||||
}
|
1
contracts/token.abi
Normal file
1
contracts/token.abi
Normal file
@ -0,0 +1 @@
|
||||
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
|
400
contracts/token.go
Normal file
400
contracts/token.go
Normal file
@ -0,0 +1,400 @@
|
||||
// Code generated - DO NOT EDIT.
|
||||
// This file is a generated binding and any manual changes will be lost.
|
||||
|
||||
package contracts
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"strings"
|
||||
|
||||
ethereum "github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var (
|
||||
_ = big.NewInt
|
||||
_ = strings.NewReader
|
||||
_ = ethereum.NotFound
|
||||
_ = bind.Bind
|
||||
_ = common.Big1
|
||||
_ = types.BloomLookup
|
||||
_ = event.NewSubscription
|
||||
)
|
||||
|
||||
// TokenABI is the input ABI used to generate the binding from.
|
||||
const TokenABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
|
||||
|
||||
// Token is an auto generated Go binding around an Ethereum contract.
|
||||
type Token struct {
|
||||
TokenCaller // Read-only binding to the contract
|
||||
TokenTransactor // Write-only binding to the contract
|
||||
TokenFilterer // Log filterer for contract events
|
||||
}
|
||||
|
||||
// TokenCaller is an auto generated read-only Go binding around an Ethereum contract.
|
||||
type TokenCaller struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
||||
type TokenTransactor struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
||||
type TokenFilterer struct {
|
||||
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||||
}
|
||||
|
||||
// TokenSession is an auto generated Go binding around an Ethereum contract,
|
||||
// with pre-set call and transact options.
|
||||
type TokenSession struct {
|
||||
Contract *Token // Generic contract binding to set the session for
|
||||
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||
}
|
||||
|
||||
// TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
||||
// with pre-set call options.
|
||||
type TokenCallerSession struct {
|
||||
Contract *TokenCaller // Generic contract caller binding to set the session for
|
||||
CallOpts bind.CallOpts // Call options to use throughout this session
|
||||
}
|
||||
|
||||
// TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
||||
// with pre-set transact options.
|
||||
type TokenTransactorSession struct {
|
||||
Contract *TokenTransactor // Generic contract transactor binding to set the session for
|
||||
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||||
}
|
||||
|
||||
// TokenRaw is an auto generated low-level Go binding around an Ethereum contract.
|
||||
type TokenRaw struct {
|
||||
Contract *Token // Generic contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
||||
type TokenCallerRaw struct {
|
||||
Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
||||
type TokenTransactorRaw struct {
|
||||
Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
|
||||
}
|
||||
|
||||
// NewToken creates a new instance of Token, bound to a specific deployed contract.
|
||||
func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) {
|
||||
contract, err := bindToken(address, backend, backend, backend)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil
|
||||
}
|
||||
|
||||
// NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.
|
||||
func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) {
|
||||
contract, err := bindToken(address, caller, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &TokenCaller{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.
|
||||
func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) {
|
||||
contract, err := bindToken(address, nil, transactor, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &TokenTransactor{contract: contract}, nil
|
||||
}
|
||||
|
||||
// NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract.
|
||||
func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) {
|
||||
contract, err := bindToken(address, nil, nil, filterer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &TokenFilterer{contract: contract}, nil
|
||||
}
|
||||
|
||||
// bindToken binds a generic wrapper to an already deployed contract.
|
||||
func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
||||
parsed, err := abi.JSON(strings.NewReader(TokenABI))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
|
||||
}
|
||||
|
||||
// Call invokes the (constant) contract method with params as input values and
|
||||
// sets the output to result. The result type might be a single field for simple
|
||||
// returns, a slice of interfaces for anonymous returns and a struct for named
|
||||
// returns.
|
||||
func (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _Token.Contract.TokenCaller.contract.Call(opts, result, method, params...)
|
||||
}
|
||||
|
||||
// Transfer initiates a plain transaction to move funds to the contract, calling
|
||||
// its default method if one is available.
|
||||
func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _Token.Contract.TokenTransactor.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _Token.Contract.TokenTransactor.contract.Transact(opts, method, params...)
|
||||
}
|
||||
|
||||
// Call invokes the (constant) contract method with params as input values and
|
||||
// sets the output to result. The result type might be a single field for simple
|
||||
// returns, a slice of interfaces for anonymous returns and a struct for named
|
||||
// returns.
|
||||
func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||||
return _Token.Contract.contract.Call(opts, result, method, params...)
|
||||
}
|
||||
|
||||
// Transfer initiates a plain transaction to move funds to the contract, calling
|
||||
// its default method if one is available.
|
||||
func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||||
return _Token.Contract.contract.Transfer(opts)
|
||||
}
|
||||
|
||||
// Transact invokes the (paid) contract method with params as input values.
|
||||
func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||||
return _Token.Contract.contract.Transact(opts, method, params...)
|
||||
}
|
||||
|
||||
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
||||
//
|
||||
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
||||
func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "allowance", owner, spender)
|
||||
|
||||
if err != nil {
|
||||
return *new(*big.Int), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
||||
//
|
||||
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
||||
func (_Token *TokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
|
||||
return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender)
|
||||
}
|
||||
|
||||
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
||||
//
|
||||
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
||||
func (_Token *TokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
|
||||
return _Token.Contract.Allowance(&_Token.CallOpts, owner, spender)
|
||||
}
|
||||
|
||||
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
||||
//
|
||||
// Solidity: function balanceOf(address owner) view returns(uint256)
|
||||
func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "balanceOf", owner)
|
||||
|
||||
if err != nil {
|
||||
return *new(*big.Int), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
||||
//
|
||||
// Solidity: function balanceOf(address owner) view returns(uint256)
|
||||
func (_Token *TokenSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
||||
return _Token.Contract.BalanceOf(&_Token.CallOpts, owner)
|
||||
}
|
||||
|
||||
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
||||
//
|
||||
// Solidity: function balanceOf(address owner) view returns(uint256)
|
||||
func (_Token *TokenCallerSession) BalanceOf(owner common.Address) (*big.Int, error) {
|
||||
return _Token.Contract.BalanceOf(&_Token.CallOpts, owner)
|
||||
}
|
||||
|
||||
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
||||
//
|
||||
// Solidity: function decimals() view returns(uint8)
|
||||
func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "decimals")
|
||||
|
||||
if err != nil {
|
||||
return *new(uint8), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
||||
//
|
||||
// Solidity: function decimals() view returns(uint8)
|
||||
func (_Token *TokenSession) Decimals() (uint8, error) {
|
||||
return _Token.Contract.Decimals(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
||||
//
|
||||
// Solidity: function decimals() view returns(uint8)
|
||||
func (_Token *TokenCallerSession) Decimals() (uint8, error) {
|
||||
return _Token.Contract.Decimals(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
||||
//
|
||||
// Solidity: function name() view returns(string)
|
||||
func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "name")
|
||||
|
||||
if err != nil {
|
||||
return *new(string), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
||||
//
|
||||
// Solidity: function name() view returns(string)
|
||||
func (_Token *TokenSession) Name() (string, error) {
|
||||
return _Token.Contract.Name(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
||||
//
|
||||
// Solidity: function name() view returns(string)
|
||||
func (_Token *TokenCallerSession) Name() (string, error) {
|
||||
return _Token.Contract.Name(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
||||
//
|
||||
// Solidity: function symbol() view returns(string)
|
||||
func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "symbol")
|
||||
|
||||
if err != nil {
|
||||
return *new(string), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
||||
//
|
||||
// Solidity: function symbol() view returns(string)
|
||||
func (_Token *TokenSession) Symbol() (string, error) {
|
||||
return _Token.Contract.Symbol(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
||||
//
|
||||
// Solidity: function symbol() view returns(string)
|
||||
func (_Token *TokenCallerSession) Symbol() (string, error) {
|
||||
return _Token.Contract.Symbol(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
||||
//
|
||||
// Solidity: function totalSupply() view returns(uint256)
|
||||
func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
||||
var out []interface{}
|
||||
err := _Token.contract.Call(opts, &out, "totalSupply")
|
||||
|
||||
if err != nil {
|
||||
return *new(*big.Int), err
|
||||
}
|
||||
|
||||
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
||||
|
||||
return out0, err
|
||||
|
||||
}
|
||||
|
||||
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
||||
//
|
||||
// Solidity: function totalSupply() view returns(uint256)
|
||||
func (_Token *TokenSession) TotalSupply() (*big.Int, error) {
|
||||
return _Token.Contract.TotalSupply(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
||||
//
|
||||
// Solidity: function totalSupply() view returns(uint256)
|
||||
func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) {
|
||||
return _Token.Contract.TotalSupply(&_Token.CallOpts)
|
||||
}
|
||||
|
||||
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
||||
//
|
||||
// Solidity: function approve(address spender, uint256 value) returns(bool)
|
||||
func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.contract.Transact(opts, "approve", spender, value)
|
||||
}
|
||||
|
||||
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
||||
//
|
||||
// Solidity: function approve(address spender, uint256 value) returns(bool)
|
||||
func (_Token *TokenSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.Contract.Approve(&_Token.TransactOpts, spender, value)
|
||||
}
|
||||
|
||||
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
||||
//
|
||||
// Solidity: function approve(address spender, uint256 value) returns(bool)
|
||||
func (_Token *TokenTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.Contract.Approve(&_Token.TransactOpts, spender, value)
|
||||
}
|
||||
|
||||
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
||||
//
|
||||
// Solidity: function transfer(address to, uint256 value) returns(bool)
|
||||
func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.contract.Transact(opts, "transfer", to, value)
|
||||
}
|
||||
|
||||
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
||||
//
|
||||
// Solidity: function transfer(address to, uint256 value) returns(bool)
|
||||
func (_Token *TokenSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.Contract.Transfer(&_Token.TransactOpts, to, value)
|
||||
}
|
||||
|
||||
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
||||
//
|
||||
// Solidity: function transfer(address to, uint256 value) returns(bool)
|
||||
func (_Token *TokenTransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) {
|
||||
return _Token.Contract.Transfer(&_Token.TransactOpts, to, value)
|
||||
}
|
12
contracts/token.sol
Normal file
12
contracts/token.sol
Normal file
@ -0,0 +1,12 @@
|
||||
pragma solidity >=0.6.0;
|
||||
|
||||
interface Token {
|
||||
function name() external view returns (string memory);
|
||||
function symbol() external view returns (string memory);
|
||||
function decimals() external view returns (uint8);
|
||||
function totalSupply() external view returns (uint);
|
||||
function balanceOf(address owner) external view returns (uint);
|
||||
function allowance(address owner, address spender) external view returns (uint);
|
||||
function approve(address spender, uint value) external returns (bool);
|
||||
function transfer(address to, uint value) external returns (bool);
|
||||
}
|
24
go.mod
24
go.mod
@ -1,3 +1,27 @@
|
||||
module git.lehouerou.net/laurent/evm
|
||||
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/ethereum/go-ethereum v1.10.12
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rs/zerolog v1.26.0
|
||||
github.com/shopspring/decimal v1.3.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
||||
github.com/btcsuite/btcd v0.20.1-beta // indirect
|
||||
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect
|
||||
github.com/go-ole/go-ole v1.2.1 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/google/uuid v1.1.5 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/rjeczalik/notify v0.9.1 // indirect
|
||||
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.5 // indirect
|
||||
github.com/tklauser/numcpus v0.2.2 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
|
||||
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||
)
|
||||
|
617
go.sum
Normal file
617
go.sum
Normal file
@ -0,0 +1,617 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||
collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
|
||||
github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=
|
||||
github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
||||
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o=
|
||||
github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw=
|
||||
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||
github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=
|
||||
github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8=
|
||||
github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM=
|
||||
github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=
|
||||
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
||||
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
|
||||
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304=
|
||||
github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=
|
||||
github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
|
||||
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0=
|
||||
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
|
||||
github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M=
|
||||
github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=
|
||||
github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=
|
||||
github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts=
|
||||
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4=
|
||||
github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=
|
||||
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
|
||||
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
|
||||
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
|
||||
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
|
||||
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E=
|
||||
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
|
||||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I=
|
||||
github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=
|
||||
github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE=
|
||||
github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=
|
||||
github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM=
|
||||
github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI=
|
||||
github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM=
|
||||
github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY=
|
||||
github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI=
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8=
|
||||
github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=
|
||||
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE=
|
||||
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
|
||||
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
|
||||
github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8=
|
||||
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
|
||||
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
|
||||
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
|
||||
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA=
|
||||
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
|
||||
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
|
||||
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0=
|
||||
github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg=
|
||||
github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
|
||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A=
|
||||
github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=
|
||||
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE=
|
||||
github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
|
||||
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
|
||||
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc=
|
||||
github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=
|
||||
github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE=
|
||||
github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
|
||||
github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=
|
||||
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg=
|
||||
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
|
||||
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4=
|
||||
github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI=
|
||||
github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA=
|
||||
github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM=
|
||||
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4=
|
||||
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
|
||||
github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU=
|
||||
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=
|
||||
gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=
|
||||
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
|
||||
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
1
pancakeswap/contracts/masterchef.abi
Normal file
1
pancakeswap/contracts/masterchef.abi
Normal file
File diff suppressed because one or more lines are too long
1582
pancakeswap/contracts/masterchef.go
Normal file
1582
pancakeswap/contracts/masterchef.go
Normal file
File diff suppressed because one or more lines are too long
1
pancakeswap/contracts/nftmarket.abi
Normal file
1
pancakeswap/contracts/nftmarket.abi
Normal file
File diff suppressed because one or more lines are too long
3014
pancakeswap/contracts/nftmarket.go
Normal file
3014
pancakeswap/contracts/nftmarket.go
Normal file
File diff suppressed because one or more lines are too long
1
pancakeswap/contracts/router.abi
Normal file
1
pancakeswap/contracts/router.abi
Normal file
File diff suppressed because one or more lines are too long
767
pancakeswap/contracts/router.go
Normal file
767
pancakeswap/contracts/router.go
Normal file
File diff suppressed because one or more lines are too long
69
pancakeswap/masterchef.go
Normal file
69
pancakeswap/masterchef.go
Normal file
@ -0,0 +1,69 @@
|
||||
package pancakeswap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/big"
|
||||
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"git.lehouerou.net/laurent/evm/pancakeswap/contracts"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
const MasterChefAddress = "0x73feaa1eE314F8c655E354234017bE2193C9E24E"
|
||||
|
||||
type MasterChef struct {
|
||||
client evm.Client
|
||||
contract *contracts.MasterChef
|
||||
|
||||
cake evm.Token
|
||||
}
|
||||
|
||||
func NewMasterChef(client evm.Client) (*MasterChef, error) {
|
||||
c, err := contracts.NewMasterChef(common.HexToAddress(MasterChefAddress), client)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init contract")
|
||||
}
|
||||
cake, err := client.TokenService().TokenBySymbol("CAKE")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "finding cake token")
|
||||
}
|
||||
return &MasterChef{
|
||||
contract: c,
|
||||
client: client,
|
||||
cake: cake,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (m *MasterChef) PendingCake(pid int64) (decimal.Decimal, error) {
|
||||
return m.PendingCakeOfAddress(pid, m.client.PublicAddress())
|
||||
}
|
||||
|
||||
func (m *MasterChef) PendingCakeOfAddress(pid int64, address common.Address) (decimal.Decimal, error) {
|
||||
raw, err := m.contract.PendingCake(&bind.CallOpts{}, big.NewInt(pid), address)
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "calling contract")
|
||||
}
|
||||
return m.cake.ValueFromBigInt(raw), nil
|
||||
}
|
||||
|
||||
func (m *MasterChef) EnterStaking(ctx context.Context, amount decimal.Decimal) (evm.Transaction, error) {
|
||||
return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) {
|
||||
return m.contract.EnterStaking(opts.TransactOpts, m.cake.ValueToBigInt(amount))
|
||||
})
|
||||
}
|
||||
|
||||
func (m *MasterChef) CompoundAndAddCakeBalance(ctx context.Context) (evm.Transaction, error) {
|
||||
pending, err := m.PendingCake(0)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting pending cake reward")
|
||||
}
|
||||
balance, err := m.cake.Balance()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting cake balance")
|
||||
}
|
||||
return m.EnterStaking(ctx, pending.Add(balance))
|
||||
}
|
75
pancakeswap/nftmarket.go
Normal file
75
pancakeswap/nftmarket.go
Normal file
@ -0,0 +1,75 @@
|
||||
package pancakeswap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/big"
|
||||
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"git.lehouerou.net/laurent/evm/pancakeswap/contracts"
|
||||
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
const (
|
||||
MarketAddress = "0x17539cCa21C7933Df5c980172d22659B8C345C5A"
|
||||
)
|
||||
|
||||
type NftMarket struct {
|
||||
client evm.Client
|
||||
contract *contracts.NftMarket
|
||||
wbnb evm.Token
|
||||
}
|
||||
|
||||
func NewNftMarket(client evm.Client) (*NftMarket, error) {
|
||||
contract, err := contracts.NewNftMarket(common.HexToAddress(MarketAddress), client)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init contract")
|
||||
}
|
||||
wbnb, err := client.TokenService().TokenBySymbol("WBNB")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init wbnb contract")
|
||||
}
|
||||
return &NftMarket{
|
||||
client: client,
|
||||
contract: contract,
|
||||
wbnb: wbnb,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (m *NftMarket) GetAskPriceForToken(collection common.Address, tokenid int) (decimal.Decimal, error) {
|
||||
res, err := m.contract.ViewAsksByCollectionAndTokenIds(&bind.CallOpts{}, collection, []*big.Int{big.NewInt(int64(tokenid))})
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "calling contract")
|
||||
}
|
||||
if len(res.AskInfo) == 0 {
|
||||
return decimal.Zero, errors.New("no info found for this token")
|
||||
}
|
||||
return m.wbnb.ValueFromBigInt(res.AskInfo[0].Price), nil
|
||||
}
|
||||
|
||||
func (m *NftMarket) BuyTokenWithBNB(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal, gas decimal.Decimal) (evm.Transaction, error) {
|
||||
return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) {
|
||||
opts.SetValue(price)
|
||||
opts.SetGasPrice(gas)
|
||||
opts.SetGasLimit(1000000)
|
||||
return m.contract.BuyTokenUsingBNB(opts.TransactOpts, collection, big.NewInt(int64(tokenid)))
|
||||
})
|
||||
}
|
||||
|
||||
func (m *NftMarket) BuyTokenWithWBNB(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal, gas decimal.Decimal) (evm.Transaction, error) {
|
||||
return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) {
|
||||
opts.SetGasPrice(gas)
|
||||
opts.SetGasLimit(1000000)
|
||||
return m.contract.BuyTokenUsingWBNB(opts.TransactOpts, collection, big.NewInt(int64(tokenid)), m.wbnb.ValueToBigInt(price))
|
||||
})
|
||||
}
|
||||
|
||||
func (m *NftMarket) CreateAskOrder(ctx context.Context, collection common.Address, tokenid int, price decimal.Decimal) (evm.Transaction, error) {
|
||||
return m.client.Execute(ctx, func(ctx context.Context, opts *evm.TransactOpts) (*types.Transaction, error) {
|
||||
return m.contract.CreateAskOrder(opts.TransactOpts, collection, big.NewInt(int64(tokenid)), m.wbnb.ValueToBigInt(price))
|
||||
})
|
||||
}
|
20
pancakeswap/router.go
Normal file
20
pancakeswap/router.go
Normal file
@ -0,0 +1,20 @@
|
||||
package pancakeswap
|
||||
|
||||
import (
|
||||
"git.lehouerou.net/laurent/evm"
|
||||
"git.lehouerou.net/laurent/evm/pancakeswap/contracts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
RouterAddress = "0x10ED43C718714eb63d5aA57B78B54704E256024E"
|
||||
)
|
||||
|
||||
func NewRouter(client evm.Client) (*evm.UniswapRouter, error) {
|
||||
contract, err := contracts.NewRouter(common.HexToAddress(RouterAddress), client)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "init contract")
|
||||
}
|
||||
return evm.NewUniswapRouter("pancakeswap", client, contract), nil
|
||||
}
|
134
token.go
Normal file
134
token.go
Normal file
@ -0,0 +1,134 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/big"
|
||||
|
||||
"git.lehouerou.net/laurent/evm/contracts"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type Token interface {
|
||||
Address() common.Address
|
||||
Name() string
|
||||
Symbol() string
|
||||
Decimals() uint8
|
||||
TotalSupply() (decimal.Decimal, error)
|
||||
BalanceOf(common.Address) (decimal.Decimal, error)
|
||||
Balance() (decimal.Decimal, error)
|
||||
Allowance(owner common.Address, spender common.Address) (decimal.Decimal, error)
|
||||
Approve(ctx context.Context, spender common.Address, value decimal.Decimal) (Transaction, error)
|
||||
Transfer(ctx context.Context, to common.Address, value decimal.Decimal) (Transaction, error)
|
||||
|
||||
ValueToBigInt(value decimal.Decimal) *big.Int
|
||||
ValueFromBigInt(value *big.Int) decimal.Decimal
|
||||
}
|
||||
|
||||
type baseToken struct {
|
||||
client Client
|
||||
contract *contracts.Token
|
||||
|
||||
address common.Address
|
||||
name string
|
||||
symbol string
|
||||
decimals uint8
|
||||
}
|
||||
|
||||
func NewToken(client Client, address common.Address) (Token, error) {
|
||||
contract, err := contracts.NewToken(address, client)
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
name, err := contract.Name(&bind.CallOpts{})
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
symbol, err := contract.Symbol(&bind.CallOpts{})
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
decimals, err := contract.Decimals(&bind.CallOpts{})
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
return &baseToken{
|
||||
address: address,
|
||||
name: name,
|
||||
symbol: symbol,
|
||||
decimals: decimals,
|
||||
client: client,
|
||||
contract: contract,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (t *baseToken) TotalSupply() (decimal.Decimal, error) {
|
||||
s, err := t.contract.TotalSupply(&bind.CallOpts{})
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "calling contract")
|
||||
}
|
||||
return t.ValueFromBigInt(s), nil
|
||||
}
|
||||
|
||||
func (t *baseToken) BalanceOf(address common.Address) (decimal.Decimal, error) {
|
||||
b, err := t.contract.BalanceOf(&bind.CallOpts{}, address)
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "getting balance from contract")
|
||||
}
|
||||
return t.ValueFromBigInt(b), nil
|
||||
}
|
||||
|
||||
func (t *baseToken) Allowance(owner common.Address, spender common.Address) (decimal.Decimal, error) {
|
||||
a, err := t.contract.Allowance(&bind.CallOpts{}, owner, spender)
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "calling contract")
|
||||
}
|
||||
return t.ValueFromBigInt(a), nil
|
||||
}
|
||||
|
||||
func (t *baseToken) Approve(ctx context.Context, spender common.Address, value decimal.Decimal) (Transaction, error) {
|
||||
return t.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) {
|
||||
return t.contract.Approve(options.TransactOpts, spender, t.ValueToBigInt(value))
|
||||
})
|
||||
}
|
||||
|
||||
func (t *baseToken) Transfer(ctx context.Context, to common.Address, value decimal.Decimal) (Transaction, error) {
|
||||
return t.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) {
|
||||
return t.contract.Transfer(options.TransactOpts, to, t.ValueToBigInt(value))
|
||||
})
|
||||
}
|
||||
|
||||
func (t *baseToken) Address() common.Address {
|
||||
return t.address
|
||||
}
|
||||
|
||||
func (t *baseToken) Name() string {
|
||||
return t.name
|
||||
}
|
||||
|
||||
func (t *baseToken) Symbol() string {
|
||||
return t.symbol
|
||||
}
|
||||
|
||||
func (t *baseToken) Decimals() uint8 {
|
||||
return t.decimals
|
||||
}
|
||||
|
||||
func (t *baseToken) DecimalsAsInt32() int32 {
|
||||
return int32(t.decimals)
|
||||
}
|
||||
|
||||
func (t *baseToken) ValueFromBigInt(val *big.Int) decimal.Decimal {
|
||||
return decimal.NewFromBigInt(val, -t.DecimalsAsInt32())
|
||||
}
|
||||
|
||||
func (t *baseToken) ValueToBigInt(val decimal.Decimal) *big.Int {
|
||||
return val.Shift(t.DecimalsAsInt32()).BigInt()
|
||||
}
|
||||
|
||||
func (t *baseToken) Balance() (decimal.Decimal, error) {
|
||||
return t.BalanceOf(t.client.PublicAddress())
|
||||
}
|
60
tokenmapper.go
Normal file
60
tokenmapper.go
Normal file
@ -0,0 +1,60 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type TokenMapper interface {
|
||||
AddToken(symbol string, address common.Address)
|
||||
AddAlias(alias string, symbol string)
|
||||
GetTokenAddress(symbol string) (common.Address, error)
|
||||
}
|
||||
|
||||
type tokenMapper struct {
|
||||
aliases map[string]string
|
||||
tokens map[string]common.Address
|
||||
lock *sync.Mutex
|
||||
}
|
||||
|
||||
func NewTokenMapper() TokenMapper {
|
||||
return &tokenMapper{
|
||||
aliases: make(map[string]string),
|
||||
tokens: make(map[string]common.Address),
|
||||
lock: &sync.Mutex{},
|
||||
}
|
||||
}
|
||||
|
||||
func (t *tokenMapper) AddToken(symbol string, address common.Address) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
t.tokens[strings.ToUpper(symbol)] = address
|
||||
}
|
||||
func (t *tokenMapper) AddAlias(alias string, symbol string) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
t.aliases[strings.ToUpper(alias)] = strings.ToUpper(symbol)
|
||||
}
|
||||
|
||||
func (t *tokenMapper) GetTokenAddress(symbol string) (common.Address, error) {
|
||||
t.lock.Lock()
|
||||
defer t.lock.Unlock()
|
||||
symbol = strings.ToUpper(symbol)
|
||||
lsymbol := symbol
|
||||
if alias, ok := t.aliases[symbol]; ok {
|
||||
lsymbol = alias
|
||||
}
|
||||
address, ok := t.tokens[lsymbol]
|
||||
if !ok {
|
||||
aliasmsg := ""
|
||||
if lsymbol != symbol {
|
||||
aliasmsg = fmt.Sprintf(" (alias of %s", symbol)
|
||||
}
|
||||
return common.Address{}, errors.Errorf("no address registered for symbol %s%s", lsymbol, aliasmsg)
|
||||
}
|
||||
return address, nil
|
||||
}
|
57
tokenservice.go
Normal file
57
tokenservice.go
Normal file
@ -0,0 +1,57 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type TokenService interface {
|
||||
TokenBySymbol(symbol string) (Token, error)
|
||||
TokenAddressBySymbol(symbol string) (common.Address, error)
|
||||
TokenByAddress(address common.Address) (Token, error)
|
||||
}
|
||||
|
||||
type tokenService struct {
|
||||
client Client
|
||||
cache map[common.Address]Token
|
||||
cachelock *sync.Mutex
|
||||
tokenmapper TokenMapper
|
||||
}
|
||||
|
||||
func NewTokenService(client Client, tm TokenMapper) TokenService {
|
||||
return &tokenService{
|
||||
client: client,
|
||||
cache: make(map[common.Address]Token),
|
||||
cachelock: &sync.Mutex{},
|
||||
tokenmapper: tm,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *tokenService) TokenBySymbol(symbol string) (Token, error) {
|
||||
address, err := s.tokenmapper.GetTokenAddress(symbol)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "getting address for symbol %s", symbol)
|
||||
}
|
||||
return s.TokenByAddress(address)
|
||||
}
|
||||
|
||||
func (s *tokenService) TokenAddressBySymbol(symbol string) (common.Address, error) {
|
||||
return s.tokenmapper.GetTokenAddress(symbol)
|
||||
}
|
||||
|
||||
func (s *tokenService) TokenByAddress(address common.Address) (Token, error) {
|
||||
s.cachelock.Lock()
|
||||
defer s.cachelock.Unlock()
|
||||
if t, ok := s.cache[address]; ok {
|
||||
return t, nil
|
||||
}
|
||||
t, err := NewToken(s.client, address)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting token from blockchain")
|
||||
}
|
||||
s.cache[address] = t
|
||||
return t, nil
|
||||
|
||||
}
|
59
transaction.go
Normal file
59
transaction.go
Normal file
@ -0,0 +1,59 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type Transaction interface {
|
||||
Wait() error
|
||||
}
|
||||
|
||||
type transaction struct {
|
||||
*types.Transaction
|
||||
ctx context.Context
|
||||
client Client
|
||||
pendingCheckPeriod time.Duration
|
||||
}
|
||||
|
||||
func NewTransaction(ctx context.Context, client Client, pendingCheckPeriod time.Duration, tx *types.Transaction) Transaction {
|
||||
return &transaction{
|
||||
Transaction: tx,
|
||||
ctx: ctx,
|
||||
client: client,
|
||||
pendingCheckPeriod: pendingCheckPeriod,
|
||||
}
|
||||
}
|
||||
|
||||
func (t *transaction) Wait() error {
|
||||
hash := t.Hash()
|
||||
notfoundmax := 10
|
||||
notfoundcount := 0
|
||||
ticker := time.NewTicker(t.pendingCheckPeriod)
|
||||
for {
|
||||
select {
|
||||
case <-t.ctx.Done():
|
||||
return errors.New("context canceled")
|
||||
case <-ticker.C:
|
||||
_, pending, err := t.client.TransactionByHash(t.ctx, hash)
|
||||
if err != nil {
|
||||
if err == ethereum.NotFound && notfoundcount < notfoundmax {
|
||||
notfoundcount++
|
||||
log.Debug().Msgf("%d/%d - tx not found %s", notfoundcount, notfoundmax, hash)
|
||||
continue
|
||||
}
|
||||
return errors.Wrapf(err, "retrieving transaction state for hash %s", hash)
|
||||
}
|
||||
if pending {
|
||||
continue
|
||||
}
|
||||
log.Debug().Msg("//TX// tx done")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
39
transactionoptions.go
Normal file
39
transactionoptions.go
Normal file
@ -0,0 +1,39 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type TransactOpts struct {
|
||||
*bind.TransactOpts
|
||||
}
|
||||
|
||||
func NewTransactOpts(ctx context.Context, client Client) (*TransactOpts, error) {
|
||||
auth, err := client.NewTransactor()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
auth.Context = ctx
|
||||
|
||||
return &TransactOpts{
|
||||
auth,
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
||||
func (o *TransactOpts) SetValue(value decimal.Decimal) *TransactOpts {
|
||||
o.Value = value.Shift(18).BigInt()
|
||||
return o
|
||||
}
|
||||
|
||||
func (o *TransactOpts) SetGasLimit(limit uint64) *TransactOpts {
|
||||
o.GasLimit = limit
|
||||
return o
|
||||
}
|
||||
|
||||
func (o *TransactOpts) SetGasPrice(gasprice decimal.Decimal) *TransactOpts {
|
||||
o.GasPrice = gasprice.Shift(9).BigInt()
|
||||
return o
|
||||
}
|
150
uniswaprouter.go
Normal file
150
uniswaprouter.go
Normal file
@ -0,0 +1,150 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type UniswapRouterContract interface {
|
||||
SwapExactTokensForTokens(opts *bind.TransactOpts, amountIn *big.Int, amountOutMin *big.Int, path []common.Address, to common.Address, deadline *big.Int) (*types.Transaction, error)
|
||||
GetAmountsOut(opts *bind.CallOpts, amountIn *big.Int, path []common.Address) ([]*big.Int, error)
|
||||
AddLiquidity(opts *bind.TransactOpts, tokenA common.Address, tokenB common.Address, amountADesired *big.Int, amountBDesired *big.Int, amountAMin *big.Int, amountBMin *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error)
|
||||
}
|
||||
|
||||
type UniswapRouter struct {
|
||||
name string
|
||||
client Client
|
||||
contract UniswapRouterContract
|
||||
|
||||
deadline time.Duration
|
||||
}
|
||||
|
||||
type UniswapRouterOption func(s *UniswapRouter) *UniswapRouter
|
||||
|
||||
func (s *UniswapRouter) WithOperationDeadline(deadline time.Duration) UniswapRouterOption {
|
||||
return func(s *UniswapRouter) *UniswapRouter {
|
||||
s.deadline = deadline
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
func NewUniswapRouter(name string, client Client, contract UniswapRouterContract) *UniswapRouter {
|
||||
return &UniswapRouter{
|
||||
name: name,
|
||||
client: client,
|
||||
contract: contract,
|
||||
deadline: 15 * time.Minute,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) Name() string {
|
||||
return s.name
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) SwapTokenToToken(ctx context.Context, path []common.Address, amount decimal.Decimal, slippage decimal.Decimal) (Transaction, error) {
|
||||
if len(path) < 2 {
|
||||
return nil, errors.Errorf("swap path must contain at least 2 addresses, currently %d", len(path))
|
||||
}
|
||||
|
||||
tokenInput, err := s.client.TokenService().TokenByAddress(path[0])
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
tokenOutput, err := s.client.TokenService().TokenByAddress(path[len(path)-1])
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
log.Debug().Msgf("[SWAP] swaping %s %s to %s with path %v", amount, tokenInput.Symbol(), tokenOutput.Symbol(), path)
|
||||
|
||||
inputBalance, err := tokenInput.Balance()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting from token balance")
|
||||
}
|
||||
|
||||
log.Debug().Msgf("[SWAP] balance of token to swap : %s", inputBalance)
|
||||
if inputBalance.LessThan(amount) {
|
||||
return nil, errors.Errorf("token balance %s is less than swap amount asked %s", inputBalance, amount)
|
||||
}
|
||||
|
||||
expectedout, err := s.contract.GetAmountsOut(&bind.CallOpts{}, tokenInput.ValueToBigInt(amount), path)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "getting expected amount in target token")
|
||||
}
|
||||
decexp := tokenOutput.ValueFromBigInt(expectedout[len(expectedout)-1])
|
||||
expectedwithslippage := decexp.Sub(decexp.Mul(slippage).Div(decimal.NewFromInt(100)))
|
||||
log.Debug().Msgf("[SWAP] expected amounts : %v", expectedout)
|
||||
log.Debug().Msgf("[SWAP] expected ratio : %s", decexp.Div(amount))
|
||||
log.Debug().Msgf("[SWAP] expected out with slippage : %s (slippage %s%%)", expectedwithslippage, slippage)
|
||||
log.Debug().Msgf("[SWAP] swaping...")
|
||||
tx, err := s.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) {
|
||||
return s.contract.SwapExactTokensForTokens(
|
||||
options.TransactOpts,
|
||||
tokenInput.ValueToBigInt(amount),
|
||||
tokenOutput.ValueToBigInt(expectedwithslippage),
|
||||
path,
|
||||
s.client.PublicAddress(),
|
||||
s.getDeadline())
|
||||
})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "swaping")
|
||||
}
|
||||
log.Debug().Msgf("[SWAP] swaping done")
|
||||
|
||||
return tx, nil
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) getDeadline() *big.Int {
|
||||
return big.NewInt(time.Now().Add(s.deadline).Unix())
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) GetPriceInUSDC(token Token) (decimal.Decimal, error) {
|
||||
return s.GetTokenQuoteInUSDC(token, decimal.NewFromInt(1))
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) GetTokenQuoteInUSDC(token Token, amount decimal.Decimal) (decimal.Decimal, error) {
|
||||
usdc, err := s.client.TokenService().TokenBySymbol("USDC")
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "getting usdc token")
|
||||
}
|
||||
return s.GetAmountRate(token, usdc, amount)
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) GetRate(token0 Token, token1 Token) (decimal.Decimal, error) {
|
||||
return s.GetAmountRate(token0, token1, decimal.NewFromInt(1))
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) GetAmountRate(token0 Token, token1 Token, amount decimal.Decimal) (decimal.Decimal, error) {
|
||||
if amount.LessThanOrEqual(decimal.Zero) {
|
||||
return decimal.Zero, nil
|
||||
}
|
||||
expectedout, err := s.contract.GetAmountsOut(&bind.CallOpts{}, token0.ValueToBigInt(amount), []common.Address{token0.Address(), token1.Address()})
|
||||
if err != nil {
|
||||
return decimal.Zero, errors.Wrap(err, "getting expected amount in quote token")
|
||||
}
|
||||
return token1.ValueFromBigInt(expectedout[len(expectedout)-1]), nil
|
||||
}
|
||||
|
||||
func (s *UniswapRouter) AddLiquidity(ctx context.Context, token1 Token, token2 Token, amounttoken1 decimal.Decimal, amounttoken2 decimal.Decimal) (Transaction, error) {
|
||||
return s.client.Execute(ctx, func(ctx context.Context, options *TransactOpts) (*types.Transaction, error) {
|
||||
return s.contract.AddLiquidity(
|
||||
options.TransactOpts,
|
||||
token1.Address(),
|
||||
token2.Address(),
|
||||
token1.ValueToBigInt(amounttoken1),
|
||||
token2.ValueToBigInt(amounttoken2),
|
||||
token1.ValueToBigInt(amounttoken1.Sub(amounttoken1.Mul(decimal.NewFromFloat(0.01)))),
|
||||
token2.ValueToBigInt(amounttoken2.Sub(amounttoken2.Mul(decimal.NewFromFloat(0.01)))),
|
||||
s.client.PublicAddress(),
|
||||
s.getDeadline())
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user