aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/fees.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-15 06:56:09 +0800
committerobscuren <geffobscura@gmail.com>2014-02-15 06:56:09 +0800
commitf6d1bfe45bf3709d7bad40bf563b5c09228622e3 (patch)
treedf48311a5a494c66c74dcd51f1056cc699f01507 /ethchain/fees.go
parentc2fb9f06ad018d01ce335c82b3542de16045a32d (diff)
downloadgo-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.gz
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.bz2
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.lz
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.xz
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.zst
go-tangerine-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.zip
The great merge
Diffstat (limited to 'ethchain/fees.go')
-rw-r--r--ethchain/fees.go65
1 files changed, 65 insertions, 0 deletions
diff --git a/ethchain/fees.go b/ethchain/fees.go
new file mode 100644
index 000000000..8f1646ab4
--- /dev/null
+++ b/ethchain/fees.go
@@ -0,0 +1,65 @@
+package ethchain
+
+import (
+ "math/big"
+)
+
+var StepFee *big.Int = new(big.Int)
+var TxFeeRat *big.Int = big.NewInt(100000000000000)
+var TxFee *big.Int = big.NewInt(100)
+var ContractFee *big.Int = new(big.Int)
+var MemFee *big.Int = new(big.Int)
+var DataFee *big.Int = new(big.Int)
+var CryptoFee *big.Int = new(big.Int)
+var ExtroFee *big.Int = new(big.Int)
+
+var BlockReward *big.Int = big.NewInt(1500000000000000000)
+var Period1Reward *big.Int = new(big.Int)
+var Period2Reward *big.Int = new(big.Int)
+var Period3Reward *big.Int = new(big.Int)
+var Period4Reward *big.Int = new(big.Int)
+
+func InitFees() {
+ /*
+ // Base for 2**64
+ b60 := new(big.Int)
+ b60.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0))
+ // Base for 2**80
+ b80 := new(big.Int)
+ b80.Exp(big.NewInt(2), big.NewInt(80), big.NewInt(0))
+
+ StepFee.Exp(big.NewInt(10), big.NewInt(16), big.NewInt(0))
+ //StepFee.Div(b60, big.NewInt(64))
+ //fmt.Println("StepFee:", StepFee)
+
+ TxFee.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0))
+ //fmt.Println("TxFee:", TxFee)
+
+ ContractFee.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0))
+ //fmt.Println("ContractFee:", ContractFee)
+
+ MemFee.Div(b60, big.NewInt(4))
+ //fmt.Println("MemFee:", MemFee)
+
+ DataFee.Div(b60, big.NewInt(16))
+ //fmt.Println("DataFee:", DataFee)
+
+ CryptoFee.Div(b60, big.NewInt(16))
+ //fmt.Println("CrytoFee:", CryptoFee)
+
+ ExtroFee.Div(b60, big.NewInt(16))
+ //fmt.Println("ExtroFee:", ExtroFee)
+
+ Period1Reward.Mul(b80, big.NewInt(1024))
+ //fmt.Println("Period1Reward:", Period1Reward)
+
+ Period2Reward.Mul(b80, big.NewInt(512))
+ //fmt.Println("Period2Reward:", Period2Reward)
+
+ Period3Reward.Mul(b80, big.NewInt(256))
+ //fmt.Println("Period3Reward:", Period3Reward)
+
+ Period4Reward.Mul(b80, big.NewInt(128))
+ //fmt.Println("Period4Reward:", Period4Reward)
+ */
+}