deth ~master

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

TODO

  • [x] ddoc
  • [x] add attributes const, pure, etc
  • [ ] ~~Artifacts and ContractABI improvments~~ moved to dotty:builder
  • [ ] improvements for sending tx(waiter, nonce increment, etc.)
  • [ ] fix decode(add more types)
  • [x] libriry linking
  • [ ] ...
  • [x] ~~Test Template for testing~~ contracts done in [email protected]
  • [ ] ...
  • [ ] ~~Template for testing contracts~~ moved to dotty

Example

import std.stdio;

import deth;

static immutable TokenABI = ContractABI.load!"build/DFT.abi";
alias Token = Contract!TokenABI;

void main()
{
    auto conn = new RPCConnector("http://localhost:8545");
    Token.deployedBytecode = import("build/DFT.bin").convTo!bytes;
    /// don't paste pk in code
    conn.wallet.addPrivateKey("beb75b08049e9316d1375999c7d968f3c23fdf606b296fcdfc9a41cdd7e7347c");

    auto token = new Token(conn, "0x95710DC9F373E58df72692C3459D93Cd1BC2C6C5".convTo!Address);
    token.transfer("0xdddddddd0d0d0d0d0d0d0ddddddddd".convTo!Address, 0xd.wei).send();
}
Authors:
  • tynuk
Sub packages:
deth:devtest, deth:dummydefi
Dependencies:
structjson, silly, tynukrpc, keccak-tiny, 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
Show all 13 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 97 downloads total

Score:
2.2
Short URL:
deth.dub.pm