Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #51 from eosnetworkfoundation/larryk85/pull_over_f…
Browse files Browse the repository at this point in the history
…or_rc2

Add changes for bug repairs
  • Loading branch information
arhag authored Aug 12, 2022
2 parents dc52e43 + 09de133 commit 2a60889
Show file tree
Hide file tree
Showing 17 changed files with 2,756 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ CDT is a toolchain for WebAssembly (WASM) and a set of tools to facilitate smart
CDT currently supports Linux x86_64 Debian packages.
### Debian Package Install
```sh
wget https://github.com/eosnetworkfoundation/mandel.cdt/releases/download/v3.0.0/cdt_3.0.0_amd64.deb
sudo apt install ./cdt_3.0.0_amd64.deb
wget https://github.com/eosnetworkfoundation/mandel.cdt/releases/download/v3.0.0-rc1/cdt_3.0.0-rc1_amd64.deb
sudo apt install ./cdt_3.0.0-rc1_amd64.deb
```

### Debian Package Uninstall
```sh
sudo apt remove cdt
Expand Down
2 changes: 1 addition & 1 deletion cdt-llvm
Submodule cdt-llvm updated 1 files
+1 −1 tools/lld
110 changes: 110 additions & 0 deletions tests/toolchain/abigen-pass/nested_container.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
"version": "eosio::abi/1.2",
"types": [
{
"new_type_name": "B_map_string_string_E",
"type": "pair_string_string[]"
},
{
"new_type_name": "B_vector_int32_E",
"type": "int32[]"
}
],
"structs": [
{
"name": "map2map",
"base": "",
"fields": [
{
"name": "m",
"type": "pair_string_string[]"
},
{
"name": "m2m",
"type": "pair_string_B_map_string_string_E[]"
}
]
},
{
"name": "pair_string_B_map_string_string_E",
"base": "",
"fields": [
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "B_map_string_string_E"
}
]
},
{
"name": "pair_string_string",
"base": "",
"fields": [
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "string"
}
]
},
{
"name": "settuple2",
"base": "",
"fields": [
{
"name": "user",
"type": "name"
},
{
"name": "tp2",
"type": "tuple_int32_float64_string_B_vector_int32_E"
}
]
},
{
"name": "tuple_int32_float64_string_B_vector_int32_E",
"base": "",
"fields": [
{
"name": "field_0",
"type": "int32"
},
{
"name": "field_1",
"type": "float64"
},
{
"name": "field_2",
"type": "string"
},
{
"name": "field_3",
"type": "B_vector_int32_E"
}
]
}
],
"actions": [
{
"name": "map2map",
"type": "map2map",
"ricardian_contract": ""
},
{
"name": "settuple2",
"type": "settuple2",
"ricardian_contract": ""
}
],
"tables": [],
"ricardian_clauses": [],
"variants": [],
"action_results": []
}
20 changes: 20 additions & 0 deletions tests/toolchain/abigen-pass/nested_container.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <eosio/eosio.hpp>
#include <tuple>
#include <vector>

using namespace eosio;
using std::map;
using std::string;
using std::tuple;
using std::vector;

class [[eosio::contract]] nested_container : public contract {
public:
using contract::contract;

[[eosio::action]]
void map2map(map<string, string> m, map<string, map<string, string>> m2m) {}

[[eosio::action]]
void settuple2(name user, const tuple <int, double, string, vector<int> >& tp2) {}
};
9 changes: 9 additions & 0 deletions tests/toolchain/abigen-pass/nested_container.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tests" : [
{
"expected" : {
"abi-file" : "nested_container.abi"
}
}
]
}
50 changes: 50 additions & 0 deletions tests/toolchain/abigen-pass/using_std_array.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
"version": "eosio::abi/1.2",
"types": [],
"structs": [
{
"name": "greeting",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
},
{
"name": "t",
"type": "int32[32]"
}
]
},
{
"name": "hi",
"base": "",
"fields": [
{
"name": "user",
"type": "name"
}
]
}
],
"actions": [
{
"name": "hi",
"type": "hi",
"ricardian_contract": ""
}
],
"tables": [
{
"name": "greeting",
"type": "greeting",
"index_type": "i64",
"key_names": [],
"key_types": []
}
],
"ricardian_clauses": [],
"variants": [],
"action_results": []
}
24 changes: 24 additions & 0 deletions tests/toolchain/abigen-pass/using_std_array.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <eosio/eosio.hpp>
#include <eosio/print.hpp>
#include <array>

using std::array;
using namespace eosio;

class[[eosio::contract("using_std_array")]] using_std_array : public contract
{
public:
using contract::contract;

[[eosio::action]] void hi(name user) {
require_auth(user);
print("Hello, ", user);
}

struct [[eosio::table]] greeting {
uint64_t id;
array<int, 32> t;
uint64_t primary_key() const { return id; }
};
typedef multi_index<"greeting"_n, greeting> greeting_index;
};
9 changes: 9 additions & 0 deletions tests/toolchain/abigen-pass/using_std_array.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tests" : [
{
"expected" : {
"abi-file" : "using_std_array.abi"
}
}
]
}
Loading

0 comments on commit 2a60889

Please sign in to comment.