https://github.com/digixglobal/aurum
Pre-processor tools for the Solidity contract programming language
https://github.com/digixglobal/aurum
Last synced: 2 months ago
JSON representation
Pre-processor tools for the Solidity contract programming language
- Host: GitHub
- URL: https://github.com/digixglobal/aurum
- Owner: DigixGlobal
- License: mit
- Created: 2015-07-13T01:00:53.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T10:28:41.000Z (almost 11 years ago)
- Last Synced: 2025-10-24T09:47:45.058Z (8 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Aurum
## Pre-processor goodness for Solidity
Aurum is a small tool to simplify Solidity programming.
## Overview and Usage
Aurum adds #include and #require in Solidity code to reference inherited contracts and external contracts.
Turn monolithic contract files like this:
```
contract ExternalContract{function someFunction();}
contract Foobarbaz {
address owner;
uint somevalue;
function Foobarbaz() {
owner = msg.sender;
somevalue = 31337;
}
}
contract Foobar is Foobarbaz {
function callExternal(address eca) {
ExternalContract ec = ExternalContract(eca);
ec.someFunction();
}
}
contract Foobarfizz is Foobarbaz {
}
```
Into this:
**Foobar.aur**
```
#include [Foobarbaz]
#require [ExternalContract]
contract Foobar is Foobarbaz {
function callExternal(address eca) {
ExternalContract ec = ExternalContract(eca);
ec.someFunction();
}
}
```
**Foobarbaz.lau**
```
contract Foobarbaz {
address owner;
uint somevalue;
function Foobarbaz() {
owner = msg.sender;
somevalue = 31337;
}
}
```
**ExternalContract.aur**
```
contract ExternalContract {
function someFunction() {
}
}
```
## Processing
Run the following to generate the Solidity output
```
aurum source_dir target_dir
```