aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_transition.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state_transition.go')
-rw-r--r--core/state_transition.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/state_transition.go b/core/state_transition.go
index 1509a5258..d0b2c5d7c 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -57,6 +57,12 @@ type Message interface {
Data() []byte
}
+func AddressFromMessage(msg Message) common.Address {
+ from, _ := msg.From()
+
+ return crypto.CreateAddress(from, msg.Nonce())
+}
+
func MessageCreatesContract(msg Message) bool {
return msg.To() == nil
}