Skip to content

Commit

Permalink
Merge pull request #158 from tronprotocol/release/3.0.0-beta
Browse files Browse the repository at this point in the history
Release/3.0.0 beta
  • Loading branch information
unicornonea authored Oct 21, 2022
2 parents d3b76ed + 35c5648 commit 28c1a88
Show file tree
Hide file tree
Showing 28 changed files with 1,429 additions and 774 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build
tmp
dist
.idea
.vscode

# for now
CONTRIBUTING.md
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
__3.0.0-beta__
* bump tronweb from 4.0.1 to 4.3.0
* Add support for Solidity compiler 0.8.7 and 0.8.11
* Add `tronWrap.send` function to test environment for supporting [tronbox/tre](https://hub.docker.com/r/tronbox/tre) docker image.
* Add `tre_setAccountBalance` RPC method. The method can set the given account's balance to the specified SUN value.
* Add `tre_setAccountCode` RPC method. The method can set the given account's code to the specified value.
* Add `tre_setAccountStorageAt` RPC method. The method can set the given account's storage slot to the specified data.
* Add `tre_blockTime` RPC method. The method can set the blockTime in seconds for automatic mining. A blockTime of 0 enables "instamine mode", where new executable transactions will be mined instantly.
* Add `tre_mine` RPC method. The method can mine exactly `blocks` number of blocks.
* Add `tre_unlockedAccounts` RPC method. The method can set up any arbitrary account to impersonate during development.

`tre_setAccountBalance`:
```js
const address = "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL";
const balance = "0x3e8";
const result = await tronWrap.send("tre_setAccountBalance", [address, balance]);
console.log(result);
```
`tre_setAccountCode`:
```js
const address = "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL";
const data = "0xbaddad42";
const result = await tronWrap.send("tre_setAccountCode", [address, data]);
console.log(result);
```
`tre_setAccountStorageAt`:
```js
const address = "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL";
const slot = "0x0000000000000000000000000000000000000000000000000000000000000005";
const data = "0xbaddad42";
const result = await tronWrap.send("tre_setAccountStorageAt", [address, slot, data]);
console.log(result);
```
`tre_blockTime`:
```js
const result = await tronWrap.send("tre_blockTime", [3]);
console.log(result);
```
`tre_mine`:
```js
const result = await tronWrap.send("tre_mine", [{ blocks: 5}]);
console.log(result);
```
`tre_unlockedAccounts`:
```js
const result = await tronWrap.send("tre_unlockedAccounts", [["TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL"]]);
console.log(result);
```


__2.7.25__
* bump tronweb from 4.0.0 to 4.0.1

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TronBox v2.7.25
# TronBox v3.0.0-beta
Simple development framework for tronweb
**TronBox is a fork of [Truffle](https://www.trufflesuite.com/truffle) [code](https://github.com/trufflesuite/truffle)**

Expand Down Expand Up @@ -38,7 +38,7 @@ To use TronBox, your dApp has to have a file `tronbox.js` in the source root. Th
module.exports = {
networks: {
development: {
// For trontools/quickstart docker image
// For tronbox/tre docker image
privateKey: 'da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0',
userFeePercentage: 30, // or consume_user_resource_percent
feeLimit: 100000000, // or fee_limit
Expand Down Expand Up @@ -68,7 +68,7 @@ Starting from TronBox 2.1.9, if you are connecting to the same host for full and
module.exports = {
networks: {
development: {
// For trontools/quickstart docker image
// For tronbox/tre docker image
privateKey: 'da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0',
userFeePercentage: 30,
feeLimit: 100000000,
Expand All @@ -87,7 +87,7 @@ module.exports = {
}
};
```
Notice that the example above uses Tron Quickstart >= 1.1.16, which exposes a mononode on port 9090.
Notice that the example above uses TronBox Runtime Environment >= 1.0.0, which exposes a mononode on port 9090.

#### Configure Solc

Expand Down Expand Up @@ -140,6 +140,8 @@ Tron Solidity supported the following versions:
0.7.7
0.8.0
0.8.6
0.8.7
0.8.11
```

more versions details: https://github.com/tronprotocol/solidity/releases
Expand Down
Loading

0 comments on commit 28c1a88

Please sign in to comment.