deth 0.0.6-alpha
Ethereum stuff for D
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
deth:devtest - Application for test deth features
deth:dummydefi - DummyDefi project
Deth
D library for interacting to contracts
Dependencies
Example
import std.stdio;
import deth;
import structjson : parseJSON;
import secp256k1 : secp256k1;
static immutable TokenABI = import("build/DFT.abi").parseJSON.ContractABI;
alias Token = Contract!TokenABI;
void main()
{
auto conn = new RPCConnector("http://localhost:8545");
Token.deployedBytecode = import("build/DFT.bin").convTo!bytes;
auto pkValue = "beb75b08049e9316d1375999c7d968f3c23fdf606b296fcdfc9a41cdd7e7347c"
.convTo!bytes;
auto pk = new secp256k1(pkValue[0 .. 32]);
conn.wallet[pk.address] = pk;
auto token = new Token(conn, "0x95710DC9F373E58df72692C3459D93Cd1BC2C6C5".convTo!Address);
token.transfer("0xdddddddd0d0d0d0d0d0d0ddddddddd".convTo!Address, 0xd.wei).send();
}
- Registered by Volodymyr Drozd
- 0.0.6-alpha released 2 years ago
- d-eth/deth
- MIT
- Copyright © 2021, tynuk
- Authors:
- Sub packages:
- deth:devtest, deth:dummydefi
- Dependencies:
- structjson, tynukrpc, secp256k1
- Versions:
-
0.0.10 2023-Jun-01 0.0.9 2023-May-20 0.0.8 2023-Apr-28 0.0.7-alpha 2022-Jul-28 0.0.6-alpha 2022-Feb-19 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
97 downloads total
-
- Score:
- 2.2
- Short URL:
- deth.dub.pm